arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2607.06519cs.AI
收藏

FreqDepthKV:用于长上下文语言模型推理中稳健的键值缓存压缩的频率引导深度共享

FreqDepthKV: Frequency-Guided Depth Sharing for Robust KV Cache Compression in Long-Context LLM Inference

Instituto de Investigación en Visión Artificial(人工视觉研究所)

Anna Córdoba, Adam Puente Tercero, Nerea Angulo Hijo, Mar Linares Tercero, Julia Barrientos, Ainhoa Miranda, Jesús Olivera

AI总结:

研究针对长上下文语言模型推理中键值缓存成本问题,提出FreqDepthKV方法,将相邻层键值状态分解,通过在线探测器分配缓存模式,在多基准测试中保持任务准确性,提升解码吞吐量并降低内存,实现高效压缩。

摘要:

长上下文语言模型推理越来越受到键值缓存的内存和带宽成本的限制,然而激进的压缩会消除检索和多步推理所需的特定层证据。我们引入了FreqDepthKV,一种推理时缓存压缩方法,它将相邻层的键值状态分解为共享的低频深度分量和稀疏的高频残差。一个轻量级的在线探测器根据注意力头对重建敏感的注意力逻辑的贡献,将其分配到共享深度、残差深度或精确缓存模式,使压缩策略能够适应提示结构而无需重新训练。在长上下文问答、针检索、摘要和代码生成基准测试中,FreqDepthKV在显著更小的缓存预算下保持任务准确性。在32k令牌预填充窗口下,FreqDepthKV达到了58.3的精确匹配、63.0的F1、32.5的ROUGE-L和48.1的pass@1,与完整的键值缓存紧密匹配,同时优于先前的压缩缓存方法。它还将解码吞吐量提高到70.4令牌/秒,将TTFT降低到2.06秒,并将峰值键值内存降低到6.2GB,实现了3.9倍的有效压缩率。

英文摘要:

Long-context LLM inference is increasingly limited by the memory and bandwidth cost of KV caches, yet aggressive compression can remove the layer-specific evidence needed for retrieval and multi-step reasoning. We introduce FreqDepthKV, an inference-time cache compression method that factorizes adjacent-layer KV states into shared low-frequency depth components and sparse high-frequency residuals. A lightweight online probe assigns attention heads to shared-depth, residual-depth, or exact cache modes according to their contribution to reconstruction-sensitive attention logits, allowing the compression policy to adapt to prompt structure without retraining. Across long-context question answering, needle retrieval, summarization, and code generation benchmarks, FreqDepthKV preserves task accuracy under substantially smaller cache budgets. With a 32k-token prefill window, FreqDepthKV reaches 58.3 Exact Match, 63.0 F1, 32.5 ROUGE-L, and 48.1 pass@1, closely matching full KV while outperforming prior compressed-cache methods. It also improves decoding throughput to 70.4 tokens/s, reduces TTFT to 2.06 seconds, and lowers peak KV memory to 6.2 GB, achieving a 3.9x effective compression ratio.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑