VestigeKV: The NoPE-MLA KV Cache Carries Its Own Eviction Signal in a Vestigial Branch

LLM MQIA Long Context ML Transformer
问题所在:长生命周期的键值(KV)缓存必须在后续将要读取它的查询出现之前即完成压缩;而基于已观测注意力机制进行缓存选择的方法(如 H2O、SnapKV)在此场景下完全失效(在无位置编码(NoPE)的多头线性注意力(MLA)模型上,“针在 haystack 中”检索任务的准确率仅为 0.00–0.33),原因在于此时某 token 的重要性尚未被实际观察到。 方法设计:在 Kimi Linear 模型上,VestigeKV 利用缓存自身已携带的、与查询无关的信号进行逐行淘汰——即 64 维解耦分支(decoupled branch)。该分支本是 RoPE 旋转位置编码遗留下来的结构,在 NoPE 训练过程中被重新赋予功能,转化为一种表征 token 显著性(salience)的专用通道。该方法仅读取每行 KV 缓存中 11% 的数据,据此对缓存进行划分:得分最高的前 m 行保留在“活跃访问层”(attended tier);其余所有行则被精确迁移(而非删除)至一个驻留于 GPU 显存中的归档区(archive),该归档区可在每个推理步中通过经验证的触发机制即时访问。整个过程无需额外训练、无需量化、亦不修改任何模型权重或内核实现。 开销表现:性能损耗可忽略不计——在上下文长度从 8K 扩展至 65K 的条件下,当缓存压缩比达 8 倍时,检索准确率仍稳定保持在 1.00;压缩比达 32 倍时,准确率仍高达 0.92;与全行保留策略相比,二者之间不存在任何性能差距。在 32 倍压缩比下,“活跃访问层”仅占 Kimi Linear 每 token 总缓存大小(8.1 KB)中的 0.25 KB;归档区则以比特级精确(bit-exact)方式完整保留在 GPU 显存中;若需释放显存,亦可选择将归档区卸载至主机内存(host offload),作为显存回收的一种变体方案。“召回层”(recall tier)——即本文默认采用的标准配置——可在 128 倍压缩比下维持 1.00 的检索准确率。 模型适配性说明:据公开报道,Kimi K3 模型采用了一种 NoPE 架构下的门控式多头线性注意力(Gated-MLA)变体;若其 KV 缓存布局与 Kimi Linear 一致,则本方法理论上可直接迁移应用;但本文所有结论均严格限定于所实测的模型,不对此作任何外推断言。 NoPE 独占性验证:同一操作若直接应用于 RoPE 架构的 MLA 模型,性能将急剧退化至 0.08(而仅做朴素淘汰的基线方法尚有 0.42);事实上,“与查询无关的显著性信号”本身仅在无旋转编码(即 NoPE)条件下才存在——在 NoPE 下,各层 top-1 显著 token 目标覆盖全部 token 的 2.3%–6.7%,而在 RoPE 下该比例则大幅跃升至 10.2%–46.8%;更进一步,理论可证:在 RoPE 架构下,根本不存在适用于所有查询的、可精确合并的通用缓存策略(query-universal exact merging)。所有阈值均在接触实验数据前即已冻结;全文附带 20 条归档决策记录及 8 条已关闭的技术路径说明。
The problem. A long-lived KV cache must be compressed before the queries that will read it exist; selection by observed attention (H2O, SnapKV) collapses there (0.00-0.33 needle retrieval on a NoPE MLA model), because a token's importance has not yet been observed. The method. On Kimi Linear, VestigeKV evicts by a query-independent signal the cache already carries: the 64-dimensional decoupled branch, a vestige of RoPE that NoPE training repurposes into a salience channel. Reading 11% of each row, it partitions the cache: the top-m rows stay in the attended tier; every other row moves -- exactly, never deleted -- to a GPU-resident archive reachable per step by a certified trigger. No training, no quantization, no weight or kernel change. Cost. Nothing measurable: retrieval holds at 1.00 under 8x and 0.92 under 32x from 8k to 65k context, zero gap to full-row selection. The attended tier is 0.25 KB of Kimi Linear's 8.1 KB per-token cache at 32x; the archive stays bit-exact and GPU-resident, with host offload as the VRAM-reclaiming variant. The recall tier -- the standard configuration -- holds 128x at 1.00. Kimi K3 is reported to use a NoPE Gated-MLA variant; if its cache layout matches, the method plausibly extends there -- we make no claim beyond the measured model. NoPE exclusivity. The identical operator on a RoPE MLA collapses to 0.08 (plain eviction: 0.42); query-independent salience itself exists only without rotation (top-1 targets span 2.3-6.7% of tokens vs. 10.2-46.8%), and query-universal exact merging is provably impossible under RoPE. All thresholds were frozen before data; 20 archived verdicts and 8 closed routes accompany the paper.
许愿