ChatPaper.aiChatPaper

小型言語モデルを用いた大規模言語モデルのファインチューニングのためのエミュレータ

An Emulator for Fine-Tuning Large Language Models using Small Language Models

October 19, 2023
著者: Eric Mitchell, Rafael Rafailov, Archit Sharma, Chelsea Finn, Christopher D. Manning
cs.AI

要旨

広く使用されている言語モデル(LM)は、通常、2段階のトレーニングパイプラインをスケールアップして構築されます。その第一段階は、非常に大規模で多様なテキストデータセットを使用した事前学習であり、第二段階は、目的の動作を指定したターゲット例やその他の仕様を使用したファインチューニング(場合によっては「アライメント」)です。知識とスキルは事前学習から得られ、ファインチューニングは主にその知識とスキルセットをフィルタリングするものであると仮説が立てられていますが、この直感は広範に検証されていません。これを支援するため、我々はこれら2つの段階で得られる知識とスキルを分離する新しい技術を導入し、「大規模モデルが事前学習中に獲得した知識と、小規模モデルがファインチューニング中に獲得した知識を組み合わせた場合(またはその逆の場合)、何が起こるか?」という問いに直接答えることを可能にします。人間の選好から学ぶ最近の進展に基づいたRLベースのフレームワークを使用して、我々はエミュレーテッド・ファインチューニング(EFT)を導入します。これは、異なるスケールでの事前学習とファインチューニングの結果を近似(または「エミュレート」)する分布からサンプリングするための原理的で実用的な方法です。EFTを用いた実験では、ファインチューニングをスケールアップすると有用性が向上する傾向があり、事前学習をスケールアップすると事実性が向上する傾向があることが示されました。スケールの分離を超えて、EFTは追加のトレーニングなしに、有用性と無害性といった競合する行動特性をテスト時に調整することを可能にします。最後に、エミュレーテッド・ファインチューニングの特殊なケースとして、我々がLMアップスケーリングと呼ぶ方法は、大規模な事前学習モデルのリソース集約的なファインチューニングを回避し、小規模なファインチューニングモデルとアンサンブルすることで、大規模な事前学習モデルをファインチューニングした結果を本質的にエミュレートします。アップスケーリングは、Llama、Llama-2、Falconファミリーの指示追従モデルの有用性と事実性を、追加のハイパーパラメータやトレーニングなしに一貫して向上させます。
English
Widely used language models (LMs) are typically built by scaling up a two-stage training pipeline: a pre-training stage that uses a very large, diverse dataset of text and a fine-tuning (sometimes, 'alignment') stage that uses targeted examples or other specifications of desired behaviors. While it has been hypothesized that knowledge and skills come from pre-training, and fine-tuning mostly filters this knowledge and skillset, this intuition has not been extensively tested. To aid in doing so, we introduce a novel technique for decoupling the knowledge and skills gained in these two stages, enabling a direct answer to the question, "What would happen if we combined the knowledge learned by a large model during pre-training with the knowledge learned by a small model during fine-tuning (or vice versa)?" Using an RL-based framework derived from recent developments in learning from human preferences, we introduce emulated fine-tuning (EFT), a principled and practical method for sampling from a distribution that approximates (or 'emulates') the result of pre-training and fine-tuning at different scales. Our experiments with EFT show that scaling up fine-tuning tends to improve helpfulness, while scaling up pre-training tends to improve factuality. Beyond decoupling scale, we show that EFT enables test-time adjustment of competing behavioral traits like helpfulness and harmlessness without additional training. Finally, a special case of emulated fine-tuning, which we call LM up-scaling, avoids resource-intensive fine-tuning of large pre-trained models by ensembling them with small fine-tuned models, essentially emulating the result of fine-tuning the large pre-trained model. Up-scaling consistently improves helpfulness and factuality of instruction-following models in the Llama, Llama-2, and Falcon families, without additional hyperparameters or training.
PDF131December 15, 2024