Focused Transformer: Contrastive Training for Context Scaling

要約

大規模な言語モデルには、状況に応じて新しい情報を組み込む優れた機能があります。
ただし、有効なコンテキストの長さの制限により、このようなアプローチの可能性を最大限に発揮できないことがよくあります。
この問題に対する 1 つの解決策は、(キー、値) ペアで構成される外部メモリへのアクセスをアテンション層に与えることです。
しかし、ドキュメントの数が増加するにつれて、関連するキーと無関係なキーの割合が減少し、モデルは無関係なキーにさらに重点を置くようになります。
私たちは、異なるセマンティック値に関連付けられたキーが重複して区別することが困難になる可能性がある、注意散漫の問題と呼ばれる重大な課題を特定しました。
この問題に取り組むために、対照学習からインスピレーションを得たトレーニング プロセスを採用する手法である Focused Transformer (FoT) を導入します。
この新しいアプローチは、(キー、値) 空間の構造を強化し、コンテキストの長さの拡張を可能にします。
私たちの方法では、既存の大規模モデルを微調整して、その効果的なコンテキストを長くすることができます。
これは、$3B$ および $7B$ OpenLLaMA チェックポイントの微調整によって実証されています。
私たちが LongLLaMA と名付けた結果のモデルは、長いコンテキストを必要とするタスクにおいて進歩を示します。
さらに、LongLLaMA モデルがパスキー取得のために $256 k$ のコンテキスト長を適切に管理していることを示します。

要約(オリジナル)

Large language models have an exceptional capability to incorporate new information in a contextual manner. However, the full potential of such an approach is often restrained due to a limitation in the effective context length. One solution to this issue is to endow an attention layer with access to an external memory, which comprises of (key, value) pairs. Yet, as the number of documents increases, the proportion of relevant keys to irrelevant ones decreases, leading the model to focus more on the irrelevant keys. We identify a significant challenge, dubbed the distraction issue, where keys linked to different semantic values might overlap, making them hard to distinguish. To tackle this problem, we introduce the Focused Transformer (FoT), a technique that employs a training process inspired by contrastive learning. This novel approach enhances the structure of the (key, value) space, enabling an extension of the context length. Our method allows for fine-tuning pre-existing, large-scale models to lengthen their effective context. This is demonstrated by our fine-tuning of $3B$ and $7B$ OpenLLaMA checkpoints. The resulting models, which we name LongLLaMA, exhibit advancements in tasks requiring a long context. We further illustrate that our LongLLaMA models adeptly manage a $256 k$ context length for passkey retrieval.

arxiv情報

著者 Szymon Tworkowski,Konrad Staniszewski,Mikołaj Pacek,Yuhuai Wu,Henryk Michalewski,Piotr Miłoś
発行日 2023-11-30 17:15:34+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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