arXiv:2410.16006cs.CL2024-10中稿 · ACL

让大模型持续学新语言,不丢旧能力。

Exploring Continual Fine-Tuning for Enhancing Language Ability in Large Language Model

  • 分两阶段连续微调,先练任务能力,再学多语言
  • 新旧任务相似时,性能不下降;不相似则任务能力受损
  • 冻结层或生成回放可防遗忘,适合多语言部署场景

大型语言模型(LLM)在持续学习新语言时,常面临损害已有语言能力的问题。本文研究通过持续微调(CFT)提升模型的语言适应性。提出两阶段CFT流程:第一阶段为仅英语端到端微调,强化任务能力;第二阶段在包含新语言任务数据的多语言数据集上继续微调,侧重语言能力。实验发现,若两阶段任务相似,模型在第二阶段不会出现任务能力退化;反之则会显著下降。我们在开源的 extit{Mistral} 与 extit{Llama} 模型上验证了多种数据组合。针对退化问题,分析了层冻结和生成回放两种改进方法,结果表明其能有效增强语言能力并保持任务性能,优于基线方法。

原文摘要 · Abstract (English)

A common challenge towards the adaptability of Large Language Models (LLMs) is their ability to learn new languages over time without hampering the model's performance on languages in which the model is already proficient (usually English). Continual fine-tuning (CFT) is the process of sequentially fine-tuning an LLM to enable the model to adapt to downstream tasks with varying data distributions and time shifts. This paper focuses on the language adaptability of LLMs through CFT. We study a two-phase CFT process in which an English-only end-to-end fine-tuned LLM from Phase 1 (predominantly Task Ability) is sequentially fine-tuned on a multilingual dataset -- comprising task data in new languages -- in Phase 2 (predominantly Language Ability). We observe that the ``similarity'' of Phase 2 tasks with Phase 1 determines the LLM's adaptability. For similar phase-wise datasets, the LLM after Phase 2 does not show deterioration in task ability. In contrast, when the phase-wise datasets are not similar, the LLM's task ability deteriorates. We test our hypothesis on the open-source \mis\ and \llm\ models with multiple phase-wise dataset pairs. To address the deterioration, we analyze tailored variants of two CFT methods: layer freezing and generative replay. Our findings demonstrate their effectiveness in enhancing the language ability of LLMs while preserving task performance, in comparison to relevant baselines.

持续学习多语言微调

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。