要約
大規模な言語モデル(LLM)が進歩し続けるにつれて、さまざまなアプリケーションにわたる長いコンテキストの高品質で高速な処理の需要が増加しています。
KVキャッシュは、以前に生成されたキーおよびバリュートークンを保存し、推論中の冗長な計算を効果的に削減するため、広く採用されています。
ただし、メモリオーバーヘッドが重大な懸念になるにつれて、KVキャッシュの効率的な圧縮により注目が高まっています。
ほとんどの既存の方法は、重要なトークンの識別と圧縮戦略の設計という2つの視点から圧縮を実行します。
ただし、これらのアプローチは、累積注意スコアまたは位置エンコーディングの影響により、多くの場合、重要なトークンの偏った分布を生成します。
さらに、彼らは異なる頭のスパース性と冗長性を見落としているため、頭レベルで最も効果的な情報を維持するのが難しくなります。
この目的のために、EMSにこれらの制限を克服することを提案し、極端な圧縮比下でより良いKVキャッシュ圧縮を達成します。
具体的には、トークンの重要性をよりよく識別するために、グローバルおよびローカルKVトークンの両方から蓄積された注意スコアを組み合わせたグローバルローカルスコアを導入します。
圧縮戦略のために、私たちは、異なるヘッドにわたるKVトークンのスパース性と冗長性を説明する、適応的で統一された統合された均一なフレームワークを設計します。
さらに、効率を高めるためにゼロクラスのメカニズムを介してヘッドワイズパラレル圧縮を実装します。
広範な実験では、極端な圧縮比下でもSOTAのパフォーマンスが示されています。
EMSは一貫して最も低い困惑を達成し、256キャッシュ予算の下でロングベンチで4 LLMにわたって1.28ポイントを超えるスコアを改善し、キャッシュ予算で95%の検索精度を保持し、ヘイスタックの針タスクのコンテキスト長の2%未満です。
要約(オリジナル)
As large language models (LLMs) continue to advance, the demand for higher quality and faster processing of long contexts across various applications is growing. KV cache is widely adopted as it stores previously generated key and value tokens, effectively reducing redundant computations during inference. However, as memory overhead becomes a significant concern, efficient compression of KV cache has gained increasing attention. Most existing methods perform compression from two perspectives: identifying important tokens and designing compression strategies. However, these approaches often produce biased distributions of important tokens due to the influence of accumulated attention scores or positional encoding. Furthermore, they overlook the sparsity and redundancy across different heads, which leads to difficulties in preserving the most effective information at the head level. To this end, we propose EMS to overcome these limitations, while achieving better KV cache compression under extreme compression ratios. Specifically, we introduce a Global-Local score that combines accumulated attention scores from both global and local KV tokens to better identify the token importance. For the compression strategy, we design an adaptive and unified Evict-then-Merge framework that accounts for the sparsity and redundancy of KV tokens across different heads. Additionally, we implement the head-wise parallel compression through a zero-class mechanism to enhance efficiency. Extensive experiments demonstrate our SOTA performance even under extreme compression ratios. EMS consistently achieves the lowest perplexity, improves scores by over 1.28 points across four LLMs on LongBench under a 256 cache budget, and preserves 95% retrieval accuracy with a cache budget less than 2% of the context length in the Needle-in-a-Haystack task.
arxiv情報
著者 | Yingxin Li,Ye Li,Yuan Meng,Xinzhu Ma,Zihan Geng,Shutao Xia,Zhi Wang |
発行日 | 2025-02-27 15:29:03+00:00 |
arxivサイト | arxiv_id(pdf) |
提供元, 利用サービス
arxiv.jp, Google