Skip to main content
QUICK REVIEW

[论文解读] Extrapolating Large Language Models to Non-English by Aligning Languages

Wenhao Zhu, Yunzhe Lv|arXiv (Cornell University)|Aug 9, 2023
Topic Modeling被引用 7
一句话总结

本文提出跨语言指令微调(CoIT)和多语言指令微调(MuIT),通过使用翻译和多语言指令数据对齐跨语言语义空间,以增强 LLaMA-7B 等大语言模型的非英语能力。在非英语问答任务上,其性能相比英语微调的 Alpaca-7B 平均提升 27.83%,在翻译任务上提升 18.89%。m-LLaMA 展现出强大的多语言指令遵循能力,并在中间层实现对齐的语义表征。

ABSTRACT

Existing large language models show disparate capability across different languages, due to the imbalance in the training data. Their performances on English tasks are often stronger than on tasks of other languages. In this paper, we empower pre-trained LLMs on non-English languages by building semantic alignment across languages. We start from targeting individual languages by performing cross-lingual instruction-tuning (CoIT) on LLaMA, i.e. tuning it with translation task data and cross-lingual general task data to obtain cross-lingual models (x-LLaMAs), and formulate underlying scaling laws to investigate the advantages of using scalable translation data. Then we perform multilingual instruction-tuning (MuIT) with mixed resources to build multilingual m-LLaMA. We also illustrate how we leverage the scaling laws to optimize data allocation in a resource-constrained setting. Experiment results on cross-lingual benchmarks XQUAD and MLQA show that x-LLaMAs surpass the English instruction-tuned counterpart (Alpaca) by an average of 27.83% across six non-English languages. Evaluation results on translation dataset Flores-101 show that x-LLaMAs outperform previous LLaMA-based models by an average of 18.89%. Encouragingly, m-LLaMA achieves comparable performance to x-LLaMAs on individual languages and demonstrates the ability to follow multilingual instructions. Further analysis on response content and representation space reveals the alignment of the multilingual semantic space within the middle layers of m-LLaMA.

研究动机与目标

  • 为解决大语言模型在不同语言间性能失衡的问题,特别是针对与英语在字母表上差异较大的非英语语言。
  • 在无需大量持续预训练的情况下,提升预训练大语言模型在零样本和少样本设置下的非英语能力。
  • 开发一种可扩展、数据高效的多语言指令微调方法,将英语语言模型能力推广至多种低资源语言。
  • 制定跨语言指令微调的缩放定律,并在资源受限条件下优化数据分配策略。
  • 证明多语言指令微调可生成能够遵循多语言指令并生成对齐多语言响应的模型。

提出的方法

  • 提出跨语言指令微调(CoIT),通过在翻译任务和跨语言通用任务上联合微调 LLaMA-7B,构建语言特定的 x-LLaMA 模型。
  • 使用混合多语言指令数据进行多语言指令微调(MuIT),训练单一的 m-LLaMA 模型,使其能够处理多种语言。
  • 基于数据量和模型性能,制定 CoIT 的缩放定律,以指导资源受限环境下的最优数据分配。
  • 采用非线性规划方法,在固定数据预算下,优化跨语言的数据分配,以最大化平均多语言性能。
  • 通过分析表征空间和响应一致性,验证多语言模型中语义对齐情况,特别是 m-LLaMA 中间层的表现。
  • 避免对非英语语言进行词汇扩展,以降低复杂度,转而依赖字节级分词和跨语言对齐机制。

实验结果

研究问题

  • RQ1在翻译任务和通用跨语言任务上联合进行指令微调,能否显著提升大语言模型在非英语语言上的性能?
  • RQ2语言特定的 x-LLaMA 模型在非英语基准测试中,与英语微调模型(如 Alpaca)相比表现如何?
  • RQ3单一多语言模型(m-LLaMA)是否能在支持多语言指令遵循的同时,达到与专用 x-LLaMA 模型相当的性能?
  • RQ4m-LLaMA 的语义空间在多大程度上实现了跨语言对齐,特别是在中间层?
  • RQ5所制定的缩放定律能否在数据预算有限的条件下,有效指导多语言指令微调中的数据分配?

主要发现

  • x-LLaMA 在 XQUAD 和 MLQA 基准测试中,于六种非英语语言上平均优于 Alpaca-7B 27.83%。
  • x-LLaMA 在 Flores-101 翻译基准测试中,平均优于先前基于 LLaMA 的模型 18.89%。
  • m-LLaMA 在单个语言上的性能可与强大的 x-LLaMA 相媲美,并展现出遵循多语言指令的能力。
  • 分析表明,m-LLaMA 中的多语言语义空间在中间层实现对齐,表明其具备有效的跨语言表征学习能力。
  • 基于缩放定律优化的数据分配策略,相比均匀分配,显著提升了多语言性能,尤其在较高数据预算下(如 120 万 token)效果更明显。
  • 对比缩放定律表明,使用平行(翻译)数据在实现语义对齐方面远优于单语持续预训练,效率更高。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。