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

초록

모델 병합, 예를 들어 모델 스프,은 같은 구조를 가진 다른 모델들을 추가적인 학습 없이 결합하는 실천법입니다. 본 연구에서는 비영어권 언어에서 대상 작업을 위한 대규모 언어 모델(LLM)을 세밀하게 조정하는 어려움을 다루는 모델 병합 방법론을 제시합니다. 여기서 대상 언어에는 종종 작업별 데이터가 없는 경우가 있습니다. 우리는 수학적 추론에 초점을 맞추며, 언어와 수학 능력을 결합하여 언어 간 전이를 용이하게 합니다. 동일한 사전 학습 모델에서 시작하여, 우리는 영어로 된 수학 지시 데이터와 대상 언어의 일반 지시 데이터에 대해 별도의 "전문가"를 세밀하게 조정합니다. 그런 다음 수학 전문가의 상위 및 하위 트랜스포머 레이어를 언어 전문가의 레이어로 직접 교체하여 결과적으로 대상 언어에서 수학 성능을 향상시킵니다. 결과적으로 얻어진 병합된 모델은 수학 벤치마크 MGSM에서 다른 개별 전문가 및 다른 병합 방법을 10% 상회하는 성능을 보여줍니다. 이는 수학 지시 데이터가 부족한 네 가지 주요 언어에서 이루어집니다. 또한, 이 레이어 교체는 해석적 분석을 기반으로 하기 때문에 간단하고 비용이 적게 들며 직관적입니다. 이 방법은 각 전문가의 세밀한 조정 중 가장 중요한 매개변수 변경을 분석하여 이루어집니다. 이러한 방식으로 LLM을 성공적으로 재구성하여 언어 간 전이를 수행할 수 있는 능력은 모델 전문성을 결합하고 모듈식 솔루션을 만들며, 언어 간 추론 능력을 사후에 모두 전달하는 미래 가능성을 엽니다.
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