DepthKV: Layer-Dependent KV Cache Pruning for Long-Context LLM Inference
- URL: http://arxiv.org/abs/2604.24647v1
- Date: Mon, 27 Apr 2026 16:15:37 GMT
- Title: DepthKV: Layer-Dependent KV Cache Pruning for Long-Context LLM Inference
- Abstract summary: We propose a layer-dependent pruning framework that allocates a fixed global KV budget across layers based on sensitivity.<n>Across multiple models and tasks, DepthKV consistently outperforms uniform pruning at the same global pruning ratio.
- Score: 11.462434448123169
- License: http://creativecommons.org/licenses/by/4.0/
- Abstract: Long-context reasoning is a critical capability of large language models (LLMs), enabling applications such as long-document understanding, summarization, and code generation. However, efficient autoregressive inference relies on the key-value (KV) cache, whose memory footprint grows linearly with sequence length, leading to a major memory bottleneck. To mitigate this overhead, KV cache pruning methods discard cached tokens with low attention scores during inference. Most existing methods apply a uniform pruning ratio across layers, implicitly assuming that all layers contribute equally to overall model performance. We show that this assumption is suboptimal, as layers differ significantly in their sensitivity to pruning. We propose DepthKV, a layer-dependent pruning framework that allocates a fixed global KV budget across layers based on their sensitivity, rather than using a uniform allocation. Across multiple models and tasks, DepthKV consistently outperforms uniform pruning at the same global pruning ratio, demonstrating more effective utilization of the KV cache budget through layer-dependent allocation.
Related papers
- You Only Index Once: Cross-Layer Sparse Attention with Shared Routing [61.29627714699688]
Cross-layer sparse attention (A) is built on top of KV-sharing architectures such as YOCO.<n>A single indexer computes token-level top-k selection once and reuses the resulting index across layers.<n>Results show CLSA is both accurate and efficient, achieving up to 7.6x decoding speedup and 17.1x overall throughput improvement at 128K context.
arXiv Detail & Related papers (2026-06-04T17:54:04Z) - Make Each Token Count: Towards Improving Long-Context Performance with KV Cache Eviction [65.710271475739]
We introduce a global retention-based KV eviction method that learns each token's future utility under a unified memory budget.<n>We show that our method substantially reduces KV memory while matching or surpassing full-cache inference.<n>These results suggest that learned, globally calibrated KV eviction is not only a compression technique, but also a mechanism for improving long-context reasoning.
arXiv Detail & Related papers (2026-05-10T16:47:50Z) - Comparative Characterization of KV Cache Management Strategies for LLM Inference [0.31498833540989407]
Key-Value caches are essential for Efficient inference with Large Language Models (LLMs)<n>These caches are essential to minimize redundant computation during autoregressive token generation.<n>The growth of KV caches has posed significant system-level challenges.
arXiv Detail & Related papers (2026-04-06T16:00:39Z) - Stochastic KV Routing: Enabling Adaptive Depth-Wise Cache Sharing [29.913403615975174]
Serving transformer language models with high throughput requires caching Key-Values ( KVs) to avoid redundant computation.<n>The memory footprint of KV caching is significant and heavily impacts serving costs.<n>We propose a simple training approach: random cross-layer attention. During training, layers randomly choose to attend either to their own KV states or those of a preceding layer.
arXiv Detail & Related papers (2026-04-03T14:56:17Z) - KVCompose: Efficient Structured KV Cache Compression with Composite Tokens [7.922206020386125]
Large language models (LLMs) rely on key-value (KV) caches for efficient autoregressive decoding.<n>We propose a simple, yet effective, KV cache compression framework based on attention-guided, layer-adaptive composite tokens.<n>Our method achieves significant memory reduction while preserving accuracy, consistently outperforming prior structured and semi-structured methods.
arXiv Detail & Related papers (2025-09-05T14:58:24Z) - DBudgetKV: Dynamic Budget in KV Cache Compression for Ensuring Optimal Performance [125.81664663201282]
We introduce a new KV cache compression method dubbed DBudgetKV.<n>It features an attention-based metric to signal when the remaining KV cache is unlikely to match the full-cache performance.<n>Our method achieves lossless KV pruning effectively and robustly, exceeding 25% compression ratio on average.
arXiv Detail & Related papers (2025-02-24T06:33:39Z) - ZigZagkv: Dynamic KV Cache Compression for Long-context Modeling based on Layer Uncertainty [35.947737679664016]
As the inference length increases, growing KV caches might lead to out-of-memory issues.<n>This paper proposes a simple yet effective KV cache compression method that leverages layer uncertainty to allocate budget size for each layer.<n> Experimental results show that the proposed method can reduce memory usage of the KV caches to only $sim$20% when compared to Full KV inference.
arXiv Detail & Related papers (2024-12-12T07:52:56Z) - PrefixKV: Adaptive Prefix KV Cache is What Vision Instruction-Following Models Need for Efficient Generation [97.41972925670508]
Large vision-language models (LVLMs) incur significant computational and memory overhead during inference.<n>We present PrefixKV, where "Prefix" means the top-ranked KV based on importance rather than position in the original sequence.<n>Our method achieves the state-of-the-art performance compared with others.
arXiv Detail & Related papers (2024-12-04T15:48:59Z) - ThinK: Thinner Key Cache by Query-Driven Pruning [63.13363917871414]
Large Language Models (LLMs) have revolutionized the field of natural language processing, achieving unprecedented performance across a variety of applications.<n>This paper focuses on the long-context scenario, addressing the inefficiencies in KV cache memory consumption during inference.<n>We propose ThinK, a novel query-dependent KV cache pruning method designed to minimize attention weight loss while selectively pruning the least significant channels.
arXiv Detail & Related papers (2024-07-30T17:59:08Z) - Efficient Inference of Vision Instruction-Following Models with Elastic Cache [76.44955111634545]
We introduce Elastic Cache, a novel strategy for efficient deployment of instruction-following large vision-language models.
We propose an importance-driven cache merging strategy to prune redundancy caches.
For instruction encoding, we utilize the frequency to evaluate the importance of caches.
Results on a range of LVLMs demonstrate that Elastic Cache not only boosts efficiency but also notably outperforms existing pruning methods in language generation.
arXiv Detail & Related papers (2024-07-25T15:29:05Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.