深度交织-KV:用于长上下文键值缓存压缩的令牌自适应跨层残差分解
DepthWeave-KV: Token-Adaptive Cross-Layer Residual Factorization for Long-Context KV Cache Compression
AI总结:
研究长上下文语言模型键值缓存压缩问题,提出DepthWeave-KV方法,通过跨层残差分解、令牌条件深度路由及在线误差跟踪实现自适应压缩,在多个基准测试中降低内存使用并提升任务质量。
摘要:
长上下文语言模型推理越来越受存储键值缓存所需的内存带宽和容量限制,现有压缩方法存在不足。我们引入了DepthWeave-KV,一种令牌自适应缓存压缩方法,它使用共享低秩通道基在相邻变压器层分解键和值状态,保留轻量级特定于令牌的残差。它结合了跨深度残差分解和令牌条件深度路由器,通过注意力输出探针进行无校准在线误差跟踪以在生成过程中自适应压缩。在多个基准测试中,它以更低内存使用实现接近全缓存任务质量,提升了平均分数和检索精度。
英文摘要:
Long-context language model inference is increasingly limited by the memory bandwidth and capacity required to store key-value caches, yet existing compression methods often apply uniform budgets across layers or tokens and degrade retrieval when lexical cues and semantic states require different preservation. We introduce DepthWeave-KV, a token-adaptive cache compression method that factorizes key and value states across neighboring transformer layers using shared low-rank channel bases while retaining lightweight token-specific residuals where attention behavior is sensitive. DepthWeave-KV combines cross-depth residual factorization with a token-conditional depth router that allocates higher reconstruction rank to instruction-bearing and retrieval-critical tokens, and uses calibration-free online error tracking from attention-output probes to adapt compression during generation without retraining the base model. A fused CUDA implementation jointly performs basis lookup, residual dequantization, and attention projection to reduce decode-time memory traffic. Across LongBench, Needle-in-a-Haystack, L-Eval, and long-form QA and summarization benchmarks, DepthWeave-KV achieves near-full-cache task quality with substantially lower memory use, improving average score and retrieval accuracy over prior compressed caches while reaching 8.3x KV memory reduction and 72.8 tokens per second at 64K context.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。