ChatPaper.aiChatPaper

KVzip: コンテキスト再構築によるクエリ非依存なKVキャッシュ圧縮

KVzip: Query-Agnostic KV Cache Compression with Context Reconstruction

May 29, 2025
著者: Jang-Hyun Kim, Jinuk Kim, Sangwoo Kwon, Jae W. Lee, Sangdoo Yun, Hyun Oh Song
cs.AI

要旨

Transformerベースの大規模言語モデル(LLM)は、推論中にキー・バリュー(KV)ペアとしてコンテキストをキャッシュします。コンテキストの長さが増えるにつれて、KVキャッシュのサイズも拡大し、メモリのオーバーヘッドが増大し、アテンションのレイテンシも増加します。本論文では、KVzipを紹介します。これは、クエリに依存しないKVキャッシュの削除方法であり、多様なクエリ間で圧縮されたKVキャッシュを効果的に再利用することを可能にします。KVzipは、基盤となるLLMを使用してキャッシュされたKVペアから元のコンテキストを再構築することで、KVペアの重要度を定量化し、重要度の低いペアを削除します。広範な実証評価により、KVzipがKVキャッシュサイズを3~4倍に削減し、FlashAttentionのデコードレイテンシを約2倍に短縮することが示されました。これにより、質問応答、検索、推論、コード理解タスクにおいて、性能の低下はほとんどありませんでした。評価には、LLaMA3.1-8B、Qwen2.5-14B、Gemma3-12Bなどのさまざまなモデルが含まれており、コンテキストの長さは最大170Kトークンに達しました。KVzipは、既存のクエリ依存型KV削除方法を大幅に上回り、特にマルチクエリシナリオにおいて90%のキャッシュ予算比率でも性能低下を招く既存手法に対して優れた結果を示しました。
English
Transformer-based large language models (LLMs) cache context as key-value (KV) pairs during inference. As context length grows, KV cache sizes expand, leading to substantial memory overhead and increased attention latency. This paper introduces KVzip, a query-agnostic KV cache eviction method enabling effective reuse of compressed KV caches across diverse queries. KVzip quantifies the importance of a KV pair using the underlying LLM to reconstruct original contexts from cached KV pairs, subsequently evicting pairs with lower importance. Extensive empirical evaluations demonstrate that KVzip reduces KV cache size by 3-4times and FlashAttention decoding latency by approximately 2times, with negligible performance loss in question-answering, retrieval, reasoning, and code comprehension tasks. Evaluations include various models such as LLaMA3.1-8B, Qwen2.5-14B, and Gemma3-12B, with context lengths reaching up to 170K tokens. KVzip significantly outperforms existing query-aware KV eviction methods, which suffer from performance degradation even at a 90% cache budget ratio under multi-query scenarios.

Summary

AI-Generated Summary

PDF92May 30, 2025