SeKV: 長文脈LLM推論のための解像度適応型KVキャッシュと階層的意味記憶
SeKV: Resolution-Adaptive KV Cache with Hierarchical Semantic Memory for Long-Context LLM Inference
June 30, 2026
著者: Amirhossein Abaskohi, Giuseppe Carenini, Peter West, Yuhang He
cs.AI
要旨
大規模言語モデルはますます長いコンテクストを扱うようになっており、KVキャッシュがメモリの支配的なボトルネックとなっている。そのサイズはシーケンス長に比例して増加し、デコード中は保持され続けるため、圧縮なしではGPUへの完全なキャッシュは法外に高価になる。既存のKVキャッシュ圧縮手法は、効率性と忠実なコンテクスト保存のバランスを取るのに苦慮している。トークン削除は情報を破棄し、意味的グループ化はプリフィル時に圧縮の決定を固定する。どちらも、生成中に圧縮されたスパンが関連性を持つようになった後で、トークンレベルの詳細を復元することはできない。本稿では、この問題に対する解決策としてSeKVを提案する。SeKVは解像度適応型の意味的KVキャッシュであり、コンテクストをエントロピー誘導型の意味的スパンに整理し、情報を破棄することなくGPU-CPUメモリ階層に格納する。各スパンは、GPU上に軽量なサマリーベクトル(粗いルーティング用)と、CPU上に低ランクSVD基底(オンデマンドのトークンレベル再構成用)を保持する。訓練されたズームインメカニズムは、デコード中にクエリに関連するスパンを選択的に拡大し、フルKVキャッシュをGPU上に具現化することなく精密な検索を可能にする。SeKVは、ベースとなる大規模言語モデルを完全に凍結したまま、0.05%未満の学習可能パラメータを追加するだけで、適応的なトークンレベル再構成を実現する。4つのベンチマークにおいて、SeKVは最強の意味的圧縮ベースラインを平均5.9%上回り、128KコンテクストにおいてフルKVキャッシュと比較してGPUメモリを53.3%削減する。コードはhttps://github.com/AmirAbaskohi/SeKVで公開されている。
English
Large language models increasingly operate over long contexts, where the KV cache becomes a dominant memory bottleneck: its size grows linearly with sequence length and must be retained throughout decoding, making full GPU caching prohibitively expensive without compression. Existing KV cache compression methods struggle to balance efficiency with faithful context preservation. Token eviction discards information, while semantic grouping fixes compression decisions at prefill time; neither can recover token-level detail from a compressed span once it becomes relevant during generation. As a solution, we propose SeKV, a resolution-adaptive semantic KV cache that organizes context into entropy-guided semantic spans and stores them across a GPU-CPU memory hierarchy without discarding information. Each span keeps a lightweight summary vector on GPU for coarse routing and a low-rank SVD basis on CPU for on-demand token-level reconstruction. A trained zoom-in mechanism selectively expands query-relevant spans during decoding, enabling precise retrieval without materializing the full KV cache on GPU. SeKV enables adaptive token-level reconstruction while keeping the base LLM fully frozen and adding fewer than 0.05% trainable parameters. Across four benchmarks, SeKV improves over the strongest semantic compression baseline by 5.9% on average while reducing GPU memory by 53.3% versus full KV caching at 128K context. Code is available on https://github.com/AmirAbaskohi/SeKV.