要約
この研究では、大規模な言語モデル(LLM)内の注意に基づいた情報の流れが、長いコンテキスト処理のために顕著なパターンを通じて集約されているかどうかを調査します。
私たちの観察結果は、LLMSが、注意が下層層に広く散乱し、特定のコンテキスト内で徐々に統合され、最終的にはより高い層の重要なトークン(別名の大規模なアクティベーションまたは注意シンク)に焦点を当てているピラミッド情報情報のファンネルを通じて情報を集約することを明らかにしています。
これらの洞察に動機付けられて、私たちは斬新で効果的なKVキャッシュ圧縮法であるPyramidkvを開発しました。
このアプローチは、異なるレイヤーにわたってKVキャッシュサイズを動的に調整し、下層層でより多くのキャッシュを割り当て、より高いレイヤーでより少ないキャッシュを割り当て、均一なKVキャッシュサイズを維持する従来の方法から分岐します。
ロングベンチベンチマークを利用する実験的評価は、PyramidKVがKVキャッシュの12%のみを保持しながら、モデルのパフォーマンスと完全なKVキャッシュと一致し、メモリの使用量を大幅に削減することを示しています。
KVキャッシュの0.7%のみが維持されているメモリ効率を強調するシナリオでは、PyramidKVは他のKVキャッシュ圧縮技術を上回り、TRECデータセットで最大20.5の絶対精度改善を達成します。
ヘイスタックの針実験では、PyramidkvはLLMSでの長いコンテキストの理解を維持する際の競合する方法よりも優れています。
特に、わずか128 kVのキャッシュエントリを保持すると、Llama-3-70Bモデルが100.0 ACCを達成できるようになります。
パフォーマンス。
要約(オリジナル)
In this study, we investigate whether attention-based information flow inside large language models (LLMs) is aggregated through noticeable patterns for long context processing. Our observations reveal that LLMs aggregate information through Pyramidal Information Funneling where attention is scattering widely in lower layers, progressively consolidating within specific contexts, and ultimately focusing on critical tokens (a.k.a massive activation or attention sink) in higher layers. Motivated by these insights, we developed PyramidKV, a novel and effective KV cache compression method. This approach dynamically adjusts the KV cache size across different layers, allocating more cache in lower layers and less in higher ones, diverging from traditional methods that maintain a uniform KV cache size. Our experimental evaluations, utilizing the LongBench benchmark, show that PyramidKV matches the performance of models with a full KV cache while retaining only 12% of the KV cache, thus significantly reducing memory usage. In scenarios emphasizing memory efficiency, where only 0.7% of the KV cache is maintained, PyramidKV surpasses other KV cache compression techniques, achieving up to a 20.5 absolute accuracy improvement on TREC dataset. In the Needle-in-a-Haystack experiment, PyramidKV outperforms competing methods in maintaining long-context comprehension in LLMs; notably, retaining just 128 KV cache entries enables the LLAMA-3-70B model to achieve 100.0 Acc. performance.
arxiv情報
著者 | Zefan Cai,Yichi Zhang,Bofei Gao,Yuliang Liu,Yucheng Li,Tianyu Liu,Keming Lu,Wayne Xiong,Yue Dong,Junjie Hu,Wen Xiao |
発行日 | 2025-05-15 17:18:12+00:00 |
arxivサイト | arxiv_id(pdf) |
提供元, 利用サービス
arxiv.jp, Google