プロキシによる言語モデルのチューニング
Tuning Language Models by Proxy
January 16, 2024
著者: Alisa Liu, Xiaochuang Han, Yizhong Wang, Yulia Tsvetkov, Yejin Choi, Noah A. Smith
cs.AI
要旨
大規模な事前学習済み言語モデルは一般的な能力を有しているものの、所望の振る舞いをより良く達成するためには、さらなる適応が一貫して有効である。しかし、これらのモデルのチューニングはますますリソース集約的になっており、モデルの重みが非公開の場合には不可能となっている。本論文では、ブラックボックス型の言語モデルの上で動作する軽量なデコード時アルゴリズムであるプロキシチューニングを提案する。この手法は、モデルを直接チューニングした場合と同等の結果を達成するが、出力語彙に対する予測のみにアクセスすることで実現する。具体的には、より小さな言語モデルをチューニングし、チューニング済みと未チューニングの言語モデルの予測の差分を利用して、ベースモデルの予測をチューニングの方向にシフトさせる。これにより、大規模な事前学習の利点を維持しつつ、所望の振る舞いを実現する。実験では、Llama2-70Bに対して7Bサイズのプロキシモデルを用いてプロキシチューニングを適用した場合、知識、推論、安全性のベンチマークにおいて、Llama2-70Bとその完全にチューニングされたチャット版とのギャップの88%を埋めることができた。興味深いことに、TruthfulQAでテストした場合、プロキシチューニングされたモデルは直接チューニングされたモデルよりも実際に真実性が高く、これはデコード時のガイダンスがモデルの事実知識をより良く保持するためと考えられる。さらに、コードのドメイン適応や、質問応答および数学問題に対するタスク固有のファインチューニングにプロキシチューニングを適用することで、その汎用性を実証する。本研究は、小さなチューニング済み言語モデルを用いて、大規模な、潜在的にプロプライエタリな言語モデルをデコード時のガイダンスを通じて効率的にカスタマイズする可能性を示している。
English
Despite the general capabilities of large pretrained language models, they
consistently benefit from further adaptation to better achieve desired
behaviors. However, tuning these models has become increasingly
resource-intensive, or impossible when model weights are private. We introduce
proxy-tuning, a lightweight decoding-time algorithm that operates on top of
black-box LMs to achieve the result of directly tuning the model, but by
accessing only its prediction over the output vocabulary. Our method instead
tunes a smaller LM, then applies the difference between the predictions of the
small tuned and untuned LMs to shift the original predictions of the base model
in the direction of tuning, while retaining the benefits of larger scale
pretraining. In experiments, when we apply proxy-tuning to Llama2-70B using
proxies of only 7B size, we can close 88% of the gap between Llama2-70B and its
truly-tuned chat version, when evaluated across knowledge, reasoning, and
safety benchmarks. Interestingly, when tested on TruthfulQA, proxy-tuned models
are actually more truthful than directly tuned models, possibly because
decoding-time guidance better retains the model's factual knowledge. We then
demonstrate the generality of proxy-tuning by applying it for domain adaptation
on code, and task-specific finetuning on question-answering and math problems.
Our work demonstrates the promise of using small tuned LMs to efficiently
customize large, potentially proprietary LMs through decoding-time guidance.