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

Lethe:面向推理密集型大语言模型服务的层和时间自适应KV缓存剪枝

Lethe: Layer- and Time-Adaptive KV Cache Pruning for Reasoning-Intensive LLM Serving

Hui Zeng, Daming Zhao, Pengfei Yang, WenXuan Hou, Tianyang Zheng, Hui Li, Weiye Ji, Jidong Zhai

AI总结:

Lethe通过引入时空自适应的KV缓存管理框架,在推理密集型大语言模型服务中实现高效的缓存剪枝,提升吞吐量的同时保持生成质量。

摘要:

生成式推理中的大语言模型(LLMs)通常涉及长解码序列,导致从累积键值(KV)缓存中积累内存和延迟开销。尽管现有的KV压缩方法主要集中在减少长输入序列的prefill内存,但它们在处理长形式生成的动态性和层敏感性方面存在不足,这在推理任务中至关重要。我们提出了Lethe,一种动态KV缓存管理框架,它在解码的时空维度上引入了适应性。在空间维度上,Lethe执行层间稀疏性感知分配,根据估计的注意力冗余性为每个Transformer层分配标记剪枝预算。在时间维度上,Lethe在生成过程中进行多轮标记剪枝,由Recency-Aware Selective Retention(RASR)机制驱动。RASR通过考虑从演进的注意力模式中衍生出的标记相关性,扩展了传统的基于近期的启发式方法,从而能够做出有根据的决定,决定哪些标记需要保留或移除。实证结果表明,Lethe在多样化的模型和任务中实现了效率和生成质量之间的良好平衡,通过量高达2.56倍。

英文摘要:

Generative reasoning with large language models (LLMs) often involves long decoding sequences, leading to substantial memory and latency overheads from accumulating key-value (KV) caches. While existing KV compression methods primarily focus on reducing prefill memory from long input sequences, they fall short in addressing the dynamic and layer-sensitive nature of long-form generation, which is central to reasoning tasks. We propose Lethe, a dynamic KV cache management framework that introduces adaptivity along both the spatial and temporal dimensions of decoding. Along the spatial dimension, Lethe performs layerwise sparsity-aware allocation, assigning token pruning budgets to each transformer layer based on estimated attention redundancy. Along the temporal dimension, Lethe conducts multi-round token pruning during generation, driven by a Recency-Aware Selective Retention} (RASR) mechanism. RASR extends traditional recency-based heuristics by also considering token relevance derived from evolving attention patterns, enabling informed decisions about which tokens to retain or evict. Empirical results demonstrate that Lethe achieves a favorable balance between efficiency and generation quality across diverse models and tasks, increases throughput by up to 2.56x.

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

↑