|
Frontiers of Information Technology & Electronic Engineering
ISSN 2095-9184 (print), ISSN 2095-9230 (online)
2025 Vol.26 No.8 P.1341-1355
Building accurate translation-tailored large language models with language-aware instruction tuning
Abstract: Large language models (LLMs) exhibit remarkable capabilities in various natural language processing tasks, such as machine translation. However, the large number of LLM parameters incurs significant costs during inference. Previous studies have attempted to train translation-tailored LLMs with moderately sized models by fine-tuning them on the translation data. Nevertheless, when performing translations in zero-shot directions that are absent from the fine-tuning data, the problem of ignoring instructions and thus producing translations in the wrong language (i.e., the off-target translation issue) remains unresolved. In this work, we design a two-stage fine-tuning algorithm to improve the instruction-following ability of translation-tailored LLMs, particularly for maintaining accurate translation directions. We first fine-tune LLMs on the translation data to elicit basic translation capabilities. At the second stage, we construct instruction-conflicting samples by randomly replacing the instructions with the incorrect ones. Then, we introduce an extra unlikelihood loss to reduce the probability assigned to those samples. Experiments on two benchmarks using the LLaMA 2 and LLaMA 3 models, spanning 16 zero-shot directions, demonstrate that, compared to the competitive baseline—translation-finetuned LLaMA, our method could effectively reduce the off-target translation ratio (up to -62.4 percentage points), thus improving translation quality (up to +9.7 bilingual evaluation understudy). Analysis shows that our method can preserve the model’s performance on other tasks, such as supervised translation and general tasks. Code is released at https://github.com/alphadl/LanguageAware_Tuning.
Key words: Zero-shot machine translation; Off-target issue; Large language model; Language-aware instruction tuning; Instruction-conflicting sample
1中国石油大学(华东)控制科学与工程学院,中国青岛市,266580
2悉尼大学计算机科学学院,澳大利亚新南威尔士州,2006
3京东集团京东探索研究院,中国北京市,100101
4中山大学深圳校区网络空间安全学院,中国深圳市,518107
摘要:大语言模型(LLM)在诸如机器翻译等自然语言处理任务中展现出了卓越的能力。然而,大语言模型庞大的参数规模在推理过程中会带来显著的计算成本。先前研究尝试通过在翻译数据上对中等规模的模型进行微调,来训练翻译定制的大语言模型。然而,在处理未包含在微调数据集内的零样本翻译方向时,模型往往会忽视指令要求,从而将内容翻译成错误的目标语言,即出现翻译脱靶问题。为此,本文提出一种两阶段的微调算法,以提高翻译定制大语言模型的指令遵循能力,尤其是保持翻译方向的准确性。首先在翻译数据集上对模型进行微调,以激发其基本的翻译能力。在第二阶段,通过将指令随机替换为错误的指令,构建指令冲突样本。随后,引入额外的非似然损失,以降低模型对这些样本的分配概率。针对16个零样本翻译方向,使用LLaMA 2和LLaMA 3模型在两个基线数据集上进行的实验结果表明,与强基线(翻译数据微调的大模型LLaMA)相比,本文的方法能显著降低翻译偏离目标语种的比例(最高可降低62.4个百分点),从而提升翻译质量(双语评估替补指标最高可提高9.7)。分析表明,本文的方法能在其他任务(如监督翻译和通用任务)中保持优异性能。代码可在以下网址获取:https://github.com/alphadl/LanguageAware_Tuning。
关键词组:
References:
Open peer comments: Debate/Discuss/Question/Opinion
<1>
DOI:
10.1631/FITEE.2400458
CLC number:
TP391
Download Full Text:
Downloaded:
1517
Download summary:
<Click Here>Downloaded:
209Clicked:
1059
Cited:
0
On-line Access:
2025-06-04
Received:
2024-03-30
Revision Accepted:
2024-11-27
Crosschecked:
2025-09-04