PoSE: Efficient Context Window Extension of LLMs via Positional Skip-wise Training

要約

この論文では、大規模言語モデル (LLM) を非常に長いコンテキスト ウィンドウに効率的に適応させるための Positional Skip-wisE (PoSE) トレーニングを紹介します。
PoSE は、トレーニング中に位置インデックスを操作した固定コンテキスト ウィンドウを使用して長い入力をシミュレートすることで、ターゲット コンテキスト ウィンドウのサイズからトレーニングの長さを切り離します。
具体的には、長い入力シーケンスからいくつかの短いチャンクを選択し、個別のスキッピング バイアス項を導入して各チャンクの位置インデックスを変更します。
これらのバイアス項は、各チャンクの長さに加えて、トレーニング例ごとに変更されるため、全長の入力でトレーニングしなくても、モデルがターゲット コンテキスト ウィンドウ内のすべての位置に適応できるようになります。
実験によると、全長の微調整と比較して、PoSE はパフォーマンスへの影響を最小限に抑えながら、メモリと時間のオーバーヘッドを大幅に削減します。
この利点を活用して、LLaMA モデルを 128,000 トークンまで拡張することに成功しました。
さらに、PoSE がすべての RoPE ベースの LLM およびさまざまな位置補間戦略と互換性があることを経験的に確認しています。
特に、ターゲット コンテキスト ウィンドウから長さの微調整を切り離すことにより、PoSE は推論のためのメモリ使用量によってのみ制約され、理論的にはコンテキスト ウィンドウを無限に拡張できます。
効率的な推論のための継続的な進歩により、PoSE はコンテキスト ウィンドウをさらに拡大する大きな可能性を秘めていると私たちは信じています。

要約(オリジナル)

In this paper, we introduce Positional Skip-wisE (PoSE) training for efficient adaptation of large language models~(LLMs) to extremely long context windows. PoSE decouples train length from target context window size by simulating long inputs using a fixed context window with manipulated position indices during training. Concretely, we select several short chunks from a long input sequence, and introduce distinct skipping bias terms to modify the position indices of each chunk. These bias terms, along with the length of each chunk, are altered for each training example, allowing the model to adapt to all positions within the target context window without training on full length inputs. Experiments show that, compared with fine-tuning on the full length, PoSE greatly reduces memory and time overhead with minimal impact on performance. Leveraging this advantage, we have successfully extended the LLaMA model to 128k tokens. Furthermore, we empirically confirm that PoSE is compatible with all RoPE-based LLMs and various position interpolation strategies. Notably, by decoupling fine-tuning length from target context window, PoSE can theoretically extend the context window infinitely, constrained only by memory usage for inference. With ongoing advancements for efficient inference, we believe PoSE holds great promise for scaling the context window even further.

arxiv情報

著者 Dawei Zhu,Nan Yang,Liang Wang,Yifan Song,Wenhao Wu,Furu Wei,Sujian Li
発行日 2023-09-19 08:03:38+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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