无需重训即可持续添加新语言,解决多语言模型扩展难题
Continually Adding New Languages to Multilingual Language Models
- 仅用目标语言数据,通过分层选择性适配实现增量学习
- 在保留旧语言能力的同时,新语言性能接近传统微调方法
- 适用于无法获取原始训练数据的场景,适合模型部署与维护
多语言语言模型通常在固定语种集上训练,新增语言需从头再训练,成本高昂且难以实现,因模型开发者通常不公开预训练数据。简单继续预训练易引发灾难性遗忘;而经验回放等缓解策略因缺乏原始数据无法应用。本文研究在仅访问目标语言预训练数据的前提下,持续为多语言模型增加新语言的问题。提出层选择性低秩适配(LayRA),仅在初始和末尾层添加低秩适配器(LoRA),其余部分冻结。该方法基于两个洞察:(1)LoRA可减轻遗忘;(2)多语言模型在初始层编码源语言输入,中间层以英语推理,末尾层转回源语言输出。实验在加利西亚语、斯瓦希里语、乌尔都语组合中验证,评估多种任务表现。结果表明,LayRA在保持原有语言能力的同时,新语言性能优于多数现有方法。此外,通过模型算术,即使无目标语言指令数据,也可赋予模型强指令遵循能力。
原文摘要 · Abstract (English)
Multilingual language models are trained on a fixed set of languages, and to support new languages, the models need to be retrained from scratch. This is an expensive endeavor and is often infeasible, as model developers tend not to release their pre-training data. Naive approaches, such as continued pretraining, suffer from catastrophic forgetting; however, mitigation strategies like experience replay cannot be applied due to the lack of original pretraining data. In this work, we investigate the problem of continually adding new languages to a multilingual model, assuming access to pretraining data in only the target languages. We explore multiple approaches to address this problem and propose Layer-Selective LoRA (LayRA), which adds Low-Rank Adapters (LoRA) to selected initial and final layers while keeping the rest of the model frozen. LayRA builds on two insights: (1) LoRA reduces forgetting, and (2) multilingual models encode inputs in the source language in the initial layers, reason in English in intermediate layers, and translate back to the source language in final layers. We experiment with adding multiple combinations of Galician, Swahili, and Urdu to pretrained language models and evaluate each method on diverse multilingual tasks. We find that LayRA provides the overall best tradeoff between preserving models' capabilities in previously supported languages, while being competitive with existing approaches such as LoRA in learning new languages. We also demonstrate that using model arithmetic, the adapted models can be equipped with strong instruction following abilities without access to any instruction tuning data in the target languages.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。