跳到正文
arXiv (AI + Vision + Imaging)· Kewei Lian, Jiayi Zhai, Anji Liu·· 1 天前AI 评分48

RefineKV:基于注意力误差上界的查询自适应KV缓存压缩方法

RefineKV: Query-Adaptive KV Cache Compression via Attention-Error Bounds

AI 导读

Kewei Lian、Jiayi Zhai、Anji Liu 提出 RefineKV,一种解码阶段的查询自适应 KV 缓存压缩方法,依据注意力输出误差上界推导出重要性与失真两项选择准则,对误差可忽略的簇用紧凑代表表示、其余簇展开为原始 KV 条目。在两个模型和三个基准上,该方法保持接近全注意力质量,注意力阶段最高提速 7.6x,解码提速 1.66x。

正文 · 原文

arXiv:2611.28171v1 Announce Type: new Abstract: Repeatedly accessing the full key--value (KV) cache is a major bottleneck in long-context language model decoding. We find that small query-specific subsets can accurately approximate full attention, yet their union covers nearly the entire cache, motivating query-adaptive access for the KV cache. A natural approach is to split the KV cache into clusters, using compact representatives for clusters that incur negligible error while expanding the rest to their original KV entries. We derive a selection criterion from an upper bound on attention-output error, which reveals two complementary factors governing the error: importance measures the impact of a cluster, while distortion measures how faithfully the cluster can be represented. Based on this criterion, we propose RefineKV, a decoding-time query-adaptive KV compression method. Experiments on two models and three benchmarks demonstrate that RefineKV retains near-full-attention quality while achieving up to 7.6x speedup in the attention phase and 1.66x faster decoding, establishing a new quality-latency Pareto frontier.

来源:arXiv (AI + Vision + Imaging) · arxiv.org