arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2403.14399cs.CLcs.AI
收藏

构建具有语言感知指令微调的精准翻译定制大语言模型

Building Accurate Translation-Tailored LLMs with Language Aware Instruction Tuning

China University of Petroleum (East China)(中国石油大学(华东));The University of Sydney(悉尼大学);JD Explore Academy(京东探索研究院);Nanyang Technological University(南洋理工大学)

Changtong Zan, Liang Ding, Li Shen, Yibing Zhen, Weifeng Liu, Dacheng Tao

AI总结:

针对LLM翻译中的脱靶问题,提出两阶段微调算法,通过最大似然估计与非似然损失学习指令冲突样本,有效提升翻译方向遵循能力与翻译质量,同时保持通用性能。

摘要:

翻译定制的大语言模型(LLMs)展现出卓越的翻译能力,甚至能与有监督训练的商业翻译系统相竞争。然而,脱靶翻译仍是一个未解决的问题,尤其是在低资源语言中,这阻碍了我们开发准确的基于LLMs的翻译模型。为了缓解脱靶翻译问题并提升LLMs在翻译上的表现,近期的工作要么设计了高级的提示策略来突出翻译指令的功能,要么通过输入少样本示例来利用LLMs的上下文学习能力。然而,这些方法本质上并未改善LLM遵循翻译指令的能力,尤其是语言方向信息。在这项工作中,我们设计了一种两阶段微调算法,以提升LLM遵循指令的能力(尤其是翻译方向)。具体而言,我们首先在翻译数据集上使用最大似然估计损失微调LLM,以激发其基本翻译能力。在第二阶段,我们通过在指令中随机将翻译方向替换为错误方向,构建了指令冲突样本,随后引入额外的非似然损失来学习这些样本。在IWSLT和WMT基准上,针对涵盖16个零样本方向的LLaMA模型进行的实验表明,与具有竞争力的基线——翻译微调的LLaMA相比,我们的方法能有效降低脱靶翻译率(平均-53.3%),从而提升翻译质量,平均SacreBLEU增加5.7,BLEURT增加16.4。分析表明,我们的方法能在AlpacaEval上保持模型的通用任务性能。代码和模型将发布在 https://github.com/alphadl/LanguageAware_Tuning。

英文摘要:

Translation-tailored Large language models (LLMs) exhibit remarkable translation capabilities, even competing with supervised-trained commercial translation systems. However, off-target translation remains an unsolved problem, especially for low-resource languages, hindering us from developing accurate LLMs-based translation models. To mitigate the off-target translation problem and enhance the performance of LLMs on translation, recent works have either designed advanced prompting strategies to highlight the functionality of translation instructions or exploited the in-context learning ability of LLMs by feeding few-shot demonstrations. However, these methods essentially do not improve LLM's ability to follow translation instructions, especially the language direction information. In this work, we design a two-stage fine-tuning algorithm to improve the instruction-following ability (especially the translation direction) of LLMs. Specifically, we first tune LLMs with the maximum likelihood estimation loss on the translation dataset to elicit the basic translation capabilities. In the second stage, we construct instruction-conflicting samples by randomly replacing the translation directions with a wrong one within the instruction, and then introduce an extra unlikelihood loss to learn those samples. Experiments on IWSLT and WMT benchmarks upon the LLaMA model spanning 16 zero-shot directions show that, compared to the competitive baseline -- translation-finetuned LLama, our method could effectively reduce the off-target translation ratio (averagely -53.3\%), thus improving translation quality with average +5.7 SacreBLEU and +16.4 BLEURT. Analysis shows that our method could preserve the model's general task performance on AlpacaEval. Code and models will be released at \url{https://github.com/alphadl/LanguageAware_Tuning}.

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

↑