Giraffe: Adventures in Expanding Context Lengths in LLMs

要約

アテンション メカニズムに依存する最新の大規模言語モデル (LLM) は、通常、固定コンテキスト長でトレーニングされ、評価時に処理できる入力シーケンスの長さの上限が強制されます。
トレーニング時のコンテキスト長よりも長いシーケンスでこれらのモデルを使用するには、成長を続けるコンテキスト長外挿手法のファミリーからの手法を使用する可能性があります。そのほとんどは、トークンがどこにあるかを示すためにアテンション メカニズムで使用される位置エンコーディングのシステムを変更することに焦点を当てています。
または、アクティベーションが入力シーケンス内にあります。
私たちは、ベース LLaMA または LLaMA 2 モデル上でコンテキスト長外挿の既存の方法を幅広く調査し、独自の設計の一部も導入しています。特に、位置エンコーディングの基礎を変更するための新しい切り捨て戦略です。
私たちは、3 つの新しい評価タスク (FreeFormQA、AlteredNumericQA、および LongChat-Lines) とパープレキシティを使用してこれらのメソッドをテストします。パープレキシティは、LLM のロング コンテキスト パフォーマンスの尺度としてはあまり細分化されていないことがわかります。
3 つのタスクを HuggingFace のデータセットとして公開します。
線形スケーリングがコンテキストの長さを拡張するための最良の方法であることを発見し、評価時により長いスケールを使用することでさらなる利益が達成できることを示します。
また、切り捨てられた基底で有望な外挿機能も発見しました。
この分野のさらなる研究をサポートするために、Giraffe と呼ばれる 3 つの新しい 13B パラメーターのロングコンテキスト モデルをリリースします。ベース LLaMA-13B からトレーニングされた 4k および 16k コンテキスト モデルと、ベース LLaMA2-13B からトレーニングされた 32k コンテキスト モデルです。
結果を再現するコードもリリースします。

要約(オリジナル)

Modern large language models (LLMs) that rely on attention mechanisms are typically trained with fixed context lengths which enforce upper limits on the length of input sequences that they can handle at evaluation time. To use these models on sequences longer than the train-time context length, one might employ techniques from the growing family of context length extrapolation methods — most of which focus on modifying the system of positional encodings used in the attention mechanism to indicate where tokens or activations are located in the input sequence. We conduct a wide survey of existing methods of context length extrapolation on a base LLaMA or LLaMA 2 model, and introduce some of our own design as well — in particular, a new truncation strategy for modifying the basis for the position encoding. We test these methods using three new evaluation tasks (FreeFormQA, AlteredNumericQA, and LongChat-Lines) as well as perplexity, which we find to be less fine-grained as a measure of long context performance of LLMs. We release the three tasks publicly as datasets on HuggingFace. We discover that linear scaling is the best method for extending context length, and show that further gains can be achieved by using longer scales at evaluation time. We also discover promising extrapolation capabilities in the truncated basis. To support further research in this area, we release three new 13B parameter long-context models which we call Giraffe: 4k and 16k context models trained from base LLaMA-13B, and a 32k context model trained from base LLaMA2-13B. We also release the code to replicate our results.

arxiv情報

著者 Arka Pal,Deep Karkhanis,Manley Roberts,Samuel Dooley,Arvind Sundararajan,Siddartha Naidu
発行日 2023-08-21 17:30:16+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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