Open-sourced large language models (LLMs) have demonstrated remarkable efficacy in various tasks with instruction tuning. However, these models can sometimes struggle with tasks that require more specialized knowledge such as translation. One possible reason for such deficiency is that instruction tuning aims to generate fluent and coherent text that continues from a given instruction without being constrained by any task-specific requirements. Moreover, it can be more challenging for tuning smaller LLMs with lower-quality training data. To address this issue, we propose a novel framework using examples in comparison to teach LLMs to learn translation. Our approach involves presenting the model with examples of correct and incorrect translations and using a preference loss to guide the model's learning. We evaluate our method on WMT2022 test sets and show that it outperforms existing methods. Our findings offer a new perspective on fine-tuning LLMs for translation tasks and provide a promising solution for generating high-quality translations. Please refer to Github for more details: https://github.com/lemon0830/TIM.
翻译:开源大型语言模型(LLMs)在基于指令微调的各种任务中展现出显著效能。然而,这些模型在处理需要更多专业知识的任务(如翻译)时可能遇到困难。造成该缺陷的可能原因之一是:指令微调旨在生成从给定指令延续的流畅连贯文本,而非受任何特定任务要求的约束。此外,在训练数据质量较低的情况下微调较小规模的LLMs会更具挑战性。针对此问题,我们提出了一种利用比较示例来教学LLMs学习翻译的新框架。该方法通过向模型展示正确与错误翻译的示例,并采用偏好损失函数引导模型学习。我们在WMT2022测试集上评估了该方法,结果表明其性能优于现有方法。我们的发现为LLMs在翻译任务上的微调提供了新视角,并为生成高质量翻译提供了具有前景的解决方案。更多详情请参阅GitHub:https://github.com/lemon0830/TIM。