arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2310.13448cs.CL
收藏

通过微调与上下文学习引导大语言模型进行机器翻译

Steering Large Language Models for Machine Translation with Finetuning and In-Context Learning

Duarte M. Alves, Nuno M. Guerreiro, João Alves, José Pombal, Ricardo Rei, José G. C. de Souza, Pierre Colombo, André F. T. Martins

AI总结:

针对大语言模型机器翻译中少样本提示脆弱及传统微调成本高且削弱上下文学习能力的问题,提出在LoRA微调中结合少样本示例的方法,在10个语言对上既恢复了少样本适应能力又保留了微调优势。

摘要:

大语言模型(LLMs)是机器翻译(MT)的一个有前景的方向。然而,当前基于LLM的MT系统很脆弱:其有效性高度依赖于少样本示例的选择,并且由于过度生成,通常需要额外的后处理。诸如在翻译指令上进行微调等替代方案计算成本高昂,并且由于过度专业化,可能会削弱上下文学习能力。在本文中,我们深入探讨了这一问题。我们首先表明,使用LoRA进行基于适配器的微调,在将训练参数减少50倍的同时,能够匹配传统微调的性能。该方法还优于少样本提示,并消除了对后处理或上下文示例的需求。然而,我们表明微调通常会降低少样本性能,从而阻碍适应能力。最后,为了兼顾两者的优势,我们提出了一种在微调过程中结合少样本示例的简单方法。在10个语言对上的实验表明,我们提出的方法恢复了原始的少样本能力,同时保留了微调带来的额外收益。

英文摘要:

Large language models (LLMs) are a promising avenue for machine translation (MT). However, current LLM-based MT systems are brittle: their effectiveness highly depends on the choice of few-shot examples and they often require extra post-processing due to overgeneration. Alternatives such as finetuning on translation instructions are computationally expensive and may weaken in-context learning capabilities, due to overspecialization. In this paper, we provide a closer look at this problem. We start by showing that adapter-based finetuning with LoRA matches the performance of traditional finetuning while reducing the number of training parameters by a factor of 50. This method also outperforms few-shot prompting and eliminates the need for post-processing or in-context examples. However, we show that finetuning generally degrades few-shot performance, hindering adaptation capabilities. Finally, to obtain the best of both worlds, we propose a simple approach that incorporates few-shot examples during finetuning. Experiments on 10 language pairs show that our proposed approach recovers the original few-shot capabilities while keeping the added benefits of finetuning.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑