ChatPaper.aiChatPaper

大規模言語モデルの知識蒸留

Knowledge Distillation of Large Language Models

June 14, 2023
著者: Yuxian Gu, Li Dong, Furu Wei, Minlie Huang
cs.AI

要旨

知識蒸留(KD)は、大規模言語モデル(LLM)の高い計算需要を削減するための有望な技術です。しかし、従来のKD手法は主にホワイトボックスの分類モデルに適用されるか、ChatGPTのようなブラックボックスモデルAPIを模倣するために小さなモデルを訓練するために使用されてきました。ホワイトボックスの生成型LLMから効果的に知識を蒸留する方法はまだ十分に検討されておらず、LLMの普及に伴い、その重要性が高まっています。本研究では、生成型の大規模言語モデルから小さな言語モデルを蒸留するMiniLLMを提案します。まず、標準的なKDアプローチにおける順方向のカルバック・ライブラー・ダイバージェンス(KLD)目的関数を、生成型言語モデルに適した逆方向KLDに置き換え、学生モデルが教師分布の低確率領域を過大評価するのを防ぎます。次に、この目的関数を学習するための効果的な最適化手法を導出します。命令追従設定での広範な実験により、MiniLLMモデルがより正確な応答を生成し、全体的な品質が高く、露出バイアスが低く、キャリブレーションが良好で、長文生成性能が高いことが示されました。また、120Mから13Bパラメータまでの異なるモデルファミリーに対してスケーラブルであることも確認しました。コードとモデルチェックポイントはhttps://aka.ms/MiniLLMで公開予定です。
English
Knowledge Distillation (KD) is a promising technique for reducing the high computational demand of large language models (LLMs). However, previous KD methods are primarily applied to white-box classification models or training small models to imitate black-box model APIs like ChatGPT. How to effectively distill the knowledge from white-box generative LLMs is still under-explored, which becomes more and more important with the prosperity of LLMs. In this work, we propose MiniLLM that distills smaller language models from generative larger language models. We first replace the forward Kullback-Leibler divergence (KLD) objective in the standard KD approaches with reverse KLD, which is more suitable for KD on generative language models, to prevent the student model from overestimating the low-probability regions of the teacher distribution. Then, we derive an effective optimization approach to learn this objective. Extensive experiments in the instruction-following setting show that the MiniLLM models generate more precise responses with the higher overall quality, lower exposure bias, better calibration, and higher long-text generation performance. Our method is also scalable for different model families with 120M to 13B parameters. We will release our code and model checkpoints at https://aka.ms/MiniLLM.
PDF200December 15, 2024