日本フィジカルAI新聞

世界のフィジカルAIを、日本語で。

LLMコンテキスト拡張arXiv:2611.10141

既存言語モデルへの無制限コンテキスト後付け手法

Retrofitting Unbounded Context onto Stock Language Models

シェア:XThreadsFacebookLINEはてブBluesky

重みを変更せずに、既存の言語モデルの注意機構の幾何学的性質を利用して、事実上無制限のコンテキストを扱えるようにする手法を提案した論文。

詳しい要約

1. どんなもの?

本論文は、学習済みの重みを変更せずに、stock language model へ実質的に無制限の context を後付けする手法を提案する。 - 対象は Mistral-7B と Llama-3.1-8B で、llama.cpp 上に実装。 - Rotary attention の遅い plane が遠方 key のアドレスを担い、速い plane が近傍 span 内の token 順序を担うという幾何的性質を利用。 - 遠方では位置がぼやけ、attention は sequence ではなく bag として読むという観察に基づく。 - 近傍 8K token は真の位置のまま保持し、それ以遠を prompt 側で操作する。

2. 先行研究と比べてどこがすごい?

従来の長文脈手法は再学習や重み変更を要することが多いが、本手法は unmodified weights で stock model に無制限 context を付与する点が新しい。 - 遠方 attention を『履歴そのもの』ではなく『予測前に設置できるもの』と捉える発想が先行研究と異なる。 - 遠方 span は query の handle word に対して可視な場合のみ読まれ、description 経由の読みは 70B を含む全モデルで遠距離では失敗するという知見を示す。 - 実装上の速度面でも stock 比で prefill 1.85 倍、decode 1.65〜1.68 倍を達成。

3. 技術・手法の肝は?

Rotary attention の plane ごとの回転速度差を利用し、遠方 key/value を host に正確に配置する。 - 近傍 8K token は元の位置で保持。 - 遠方の全 key/value を host exact に送り、word index で request の rare word が指す unit を検索。 - 学習済み範囲内の far window slots にそれらを保持したまま request を encode。 - 生成中に rare word が出たら、その unit を one exact re-encode で mid-generation に fetch。 - これにより遠方 span を『単語』単位で競合下でも読ませる。

4. どうやって有効だと検証した?

llama.cpp 上の Mistral-7B と Llama-3.1-8B で評価。 - planted single needle を 32K〜1M token で 100 問中 99〜100 正解。 - three-key discrimination を 100 問中 88〜100 正解。 - RULER で Llama-3.1-8B 128K は 70.8(dense attention 69.9)、Mistral-7B 32K は 67.8(同 75.5)。 - 128K で prefill 1.85 倍、decode 1.65〜1.68 倍の stock 比速度。

5. 議論はある?

遠方 attention が bag 的に読まれるため、description 経由の読みは距離で失敗するという限界が示される。 - 70B を含む測定モデル全てでこの失敗が確認された。 - Mistral-7B の 32K RULER では dense attention に劣る(67.8 vs 75.5)など、モデル・条件による性能差がある。 - 近傍 8K の窓や far window slots の設計、rare word 依存の fetch 機構の一般性については要旨からは不明。

6. 次に読むべき論文は?

要旨で直接参照・比較されているのは dense attention と RULER ベンチマーク。 - 関連手法として Rotary attention(RoPE)の plane 回転特性、stock language model、llama.cpp 実装が挙げられる。 - 同分野の定番として long-context 評価の RULER、needle-in-a-haystack 系の評価、dense attention との比較論文を次に読むべき。

※ AIが要旨から生成した要約です。正確性は原文をご確認ください。

著者: Mark Oskin

分類: cs.CL, cs.LG

原文アブストラクト

A language model that never had to forget would keep every document it has read and every turn it has spoken, and answer from any of it. This paper shows that two stock models can do that on unmodified weights by manipulating their geometry. Rotary attention turns each pair of key dimensions, a plane, at its own rate. The slow planes turn once in thousands of tokens and carry the address a query matches when it reads a far key; the fast planes turn once in a few tokens, and the order of the tokens inside a span is already written into its keys and values by the time the span leaves the near window. At distance the position blurs, and what attention reads is a bag rather than a sequence. A far span is read by its words: under competition it is read only if it is visible at the query of the question's own handle word, and a read through a description rather than a word fails at distance in every model measured, a 70B included. These facts allow a trick. What sits in the far part of attention does not have to be the history as it was; it can be installed ahead of the prediction. The design keeps a near window of 8K tokens at their true positions and changes what lies beyond it with the prompt: every far key and value goes to the host exact, a word index finds the units the request's rare words name, a far window of slots inside the trained range holds them while the request is encoded, and a rare word the model generates fetches its units mid-generation with one exact re-encode. Implemented in llama.cpp on Mistral-7B and Llama-3.1-8B, the design reads planted single needles at 99 to 100 of 100 and three-key discrimination at 88 to 100 of 100 from 32K to one million tokens, scores 70.8 on RULER against 69.9 for dense attention on Llama-3.1-8B at 128K and 67.8 against 75.5 on Mistral-7B at 32K, and at 128K prefills at 1.85 times and decodes at 1.65 to 1.68 times stock speed.

  1. 1パナソニックHDら、ロボット操作AI「T-Rex」を共同開発 12タスクで平均成功率65%研究・技術
  2. 2Hugging Face、ロボット学習基盤「LeRobot v0.7.0」を公開 対話操作と大規模データ学習に対応新製品・発表
  3. 3NVIDIA、Vera CPUのエージェント処理性能を公表 x86比で速度・電力効率を比較半導体・GPU
  4. 4Agility、SPAC合併でナスダック上場資金調達
  5. 5智元、清華大学などとCELを発表 96台のロボットで群体学習を検証研究・技術
PR本紙発行元 EmplifAI