ChatPaper.aiChatPaper

大規模言語モデルにおけるゼロショットクロスリンガル転送のためのレイヤー交換

Layer Swapping for Zero-Shot Cross-Lingual Transfer in Large Language Models

October 2, 2024
著者: Lucas Bandarkar, Benjamin Muller, Pritish Yuvraj, Rui Hou, Nayan Singhal, Hongjiang Lv, Bing Liu
cs.AI

要旨

モデルのマージング、例えばモデルの統合は、同じアーキテクチャを持つ異なるモデルを、追加のトレーニングなしに組み合わせる実践です。この研究では、非英語圏のターゲットタスクに対して大規模言語モデル(LLMs)を微調整する際の困難に取り組むモデルのマージング手法を提案します。ここでは、数学的推論に焦点を当て、言語と数学の能力を組み合わせることで、言語間および数学間の転移を容易にします。同じ事前学習済みモデルから始め、英語の数学指導データと対象言語の一般的な指導データに基づいてそれぞれ別個の「専門家」を微調整します。その後、数学専門家のトランスフォーマーレイヤーの上位と下位を、言語専門家のレイヤーと直接置き換えることで、結果として対象言語での数学パフォーマンスが向上します。結果として得られるマージドモデルは、数学ベンチマークであるMGSMにおいて、数学指導データが不足している4つの主要言語で、他の専門家や他のマージング手法よりも10%優れています。さらに、このレイヤーの交換は、各専門家の微調整中に最も重要なパラメータの変更を解釈的に分析することに基づいているため、シンプルでコストがかからず直感的です。この方法でLLMsを再構成して言語間転移を成功させる能力は、将来的にモデルの専門知識を組み合わせ、モジュラーソリューションを作成し、言語間で推論能力を後から転送する可能性を開くものです。
English
Model merging, such as model souping, is the practice of combining different models with the same architecture together without further training. In this work, we present a model merging methodology that addresses the difficulty of fine-tuning Large Language Models (LLMs) for target tasks in non-English languages, where task-specific data is often unavailable. We focus on mathematical reasoning and without in-language math data, facilitate cross-lingual transfer by composing language and math capabilities. Starting from the same pretrained model, we fine-tune separate "experts" on math instruction data in English and on generic instruction data in the target language. We then replace the top and bottom transformer layers of the math expert directly with layers from the language expert, which consequently enhances math performance in the target language. The resulting merged models outperform the individual experts and other merging methods on the math benchmark, MGSM, by 10% across four major languages where math instruction data is scarce. In addition, this layer swapping is simple, inexpensive, and intuitive, as it is based on an interpretative analysis of the most important parameter changes during the fine-tuning of each expert. The ability to successfully re-compose LLMs for cross-lingual transfer in this manner opens up future possibilities to combine model expertise, create modular solutions, and transfer reasoning capabilities across languages all post hoc.

Summary

AI-Generated Summary

PDF53November 16, 2024