[论文解读] Fine-tuning Large Language Models for Domain-specific Machine Translation
这篇论文提出 LlamaIT,一种面向提示的微调方法,使用 LoRA 将通用大型语言模型(Llama2-7B)适应为领域特定的机器翻译,并通过领域词汇提示和混合领域数据来提升并保留零-shot 机器翻译能力。
Large language models (LLMs) have shown great potential in domain-specific machine translation (MT). However, one major issue is that LLMs pre-trained on general domain corpus might not generalize well to specific domains due to the lack of domain-specific knowledge. To address this issue, this paper focuses on enhancing the domain-specific MT capability of LLMs, by providing high-quality training datasets and proposing a novel fine-tuning framework denoted by DragFT. DragFT augments LLMs via three techniques: (i) Dictionary-enhanced prompting integrates dictionary information into prompts to improve the translation of domain-specific terminology.; (ii) RAG-based few-shot example selection provides high-quality examples that simulate both the domain and style characteristics; (iii) Fine-tuning with few-shot examples further enhances performance when using in-domain examples. We deploy DragFT on three well-known LLM backbones with 13B training parameters to validate its effectiveness. The results on three domain-specific datasets show that DragFT achieves a significant performance boost and shows superior performance compared to advanced models such as GPT-3.5 and GPT-4o. The drastic performance improvement of DragFT over existing LLMs can be attributed to incorporating relevant knowledge while mitigating noise.
研究动机与目标
- 激发对改进领域特定 MT 的动力,解决上下文学习的低效和微调带来的过度特化。
- 提出一种轻量级微调方法(LoRA),以自然语言翻译指令为引导。
- 利用自构 IT 领域数据集和领域词汇来提升罕见词翻译。
- 证明混合领域训练在提升领域特定 MT 的同时可保留零-shot MT 能力。
- 展示基于词典的提示在处理领域术语方面优于“逐字典链式提示”。
提出的方法
- 通过对齐中英 IT 文档来创建 IT 领域的双语数据集,并由一个零-shot 翻译器进行验证。
- 用英文生成翻译任务的指令描述,并在该数据集上使用 LoRA 进行微调,以在推理时实现零-shot 翻译。
- 通过基于词典的提示(词典改述 Dictionary-Rephrasing 和 词典链 Chain-of-Dictionary 变体)用一个大型 IT 双语词典来扩充训练。
- 构建一个最终的混合领域数据集,将领域特定数据与通用领域数据结合,以恢复零-shot MT 能力并防止过度专用化。
- 评估提示模板,以确定最有效的英文指令风格用于 MT 提示。
- 将高效参数微调(LoRA)与全量微调进行比较,以评估训练效率。
实验结果
研究问题
- RQ1使用 LoRA 的面向提示微调是否能在避免后处理和依赖上下文示例的前提下改善领域特定 MT?
- RQ2通过基于词典的提示加入领域特定词汇是否能提升对罕见领域术语的翻译?
- RQ3在领域特定和通用领域数据混合训练是否能保持零-shot MT 能力,同时提升领域 MT?
- RQ4翻译指令模板对 MT 性能有何影响?
主要发现
- 面向提示的微调(LlamaIT)在 IT 领域翻译任务上显著提升了领域特定 MT,相较于基础 LLMs。
- 基于词典的提示(Dictionary-Rephrasing)在处理领域术语方面优于词典链提示(Chain-of-Dictionary)。
- 使用LoRA进行微调在领域 MT 上取得巨大提升,且可训练参数显著减少,训练时间也比全量微调更短。
- 混合领域训练有助于修复通用领域的零-shot MT 能力,同时保持强大的领域 MT 性能。
- 使用英文指令模板的零-shot 提示在所有测试模板中平均 MT 性能最佳。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。