Controlled Text Generation via Language Model Arithmetic

要約

大規模言語モデル (LLM) がより広範囲に展開されるにつれて、語彙、スタイル、文字に関するカスタマイズがより重要になります。
この研究では、モデルの (再) トレーニングや高度に特殊なデータセットを必要とせずに LLM を構成およびバイアスするための新しい推論フレームワークであるモデル演算を紹介します。
さらに、このフレームワークにより、直接プロンプトや以前の制御されたテキスト生成 (CTG) 技術よりも、生成されたテキストをより正確に制御できます。
モデル演算を使用すると、以前の CTG テクニックを単純な式として表現し、それを新しいより効果的な式に自然に拡張できます。
さらに、効率的な LLM サンプリングの手法である投機的サンプリングがこの設定にも適用されることを示します。
これにより、単一モデルに比べてわずかなオーバーヘッドのみで、複数の合成モデルを使用した高効率のテキスト生成が可能になります。
私たちの経験的評価は、モデル演算により、生成されたテキストのきめ細かい制御が可能であると同時に、毒性低減のタスクにおいて最先端のパフォーマンスを上回っていることを示しています。
私たちは、フレームワークのオープンソースの使いやすい実装を https://github.com/eth-sri/ language-model-arithmetic でリリースします。

要約(オリジナル)

As Large Language Models (LLMs) are deployed more widely, customization with respect to vocabulary, style, and character becomes more important. In this work, we introduce model arithmetic, a novel inference framework for composing and biasing LLMs without the need for model (re)training or highly specific datasets. In addition, the framework allows for more precise control of generated text than direct prompting and prior controlled text generation (CTG) techniques. Using model arithmetic, we can express prior CTG techniques as simple formulas and naturally extend them to new and more effective formulations. Further, we show that speculative sampling, a technique for efficient LLM sampling, extends to our setting. This enables highly efficient text generation with multiple composed models with only marginal overhead over a single model. Our empirical evaluation demonstrates that model arithmetic allows fine-grained control of generated text while outperforming state-of-the-art on the task of toxicity reduction. We release an open source easy-to-use implementation of our framework at https://github.com/eth-sri/language-model-arithmetic.

arxiv情報

著者 Jasper Dekoninck,Marc Fischer,Luca Beurer-Kellner,Martin Vechev
発行日 2024-03-06 09:36:54+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.CL パーマリンク