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.
翻译:开源大语言模型通过指令微调在各种任务中展现出显著效能,但在翻译等需要专业知识的任务中可能表现不足。这种缺陷的可能原因在于,指令微调旨在生成从给定指令延续的流畅连贯文本,不受特定任务要求的约束。此外,对数据质量较低的较小大语言模型进行微调更具挑战性。为解决此问题,我们提出了一种新颖框架,通过使用比较示例来教导大语言模型学习翻译。我们的方法包括向模型展示正确和错误翻译的示例,并利用偏好损失引导模型学习。我们在WMT2022测试集上评估了该方法,结果显示其优于现有方法。我们的发现为针对翻译任务微调大语言模型提供了新视角,并为生成高质量翻译提供了有前景的解决方案。更多详情请参考GitHub:https://github.com/lemon0830/TIM。