paper-with-me

홈 › Papers

ZigZagkv: Dynamic KV Cache Compression for Long-context Modeling based on Layer Uncertainty

2024-12-12 · Meizhi Zhong, Xikai Liu, Chen Zhang, Yikun Lei, Yan Gao, Yao Hu, Kehai Chen, Min Zhang

Large Language models (LLMs) have become a research hotspot. To accelerate the inference of LLMs, storing computed caches in memory has become the standard technique. However, as the inference length increases, growing KV caches might lead to out-of-memory issues. Many existing methods address this issue through KV cache compression, primarily by preserving key tokens throughout all layers to reduce information loss. Most of them allocate a uniform budget size for each layer to retain. However, we observe that the minimum budget sizes needed to retain essential information vary across layers and models based on the perspectives of attention and hidden state output. Building on this observation, this paper proposes a simple yet effective KV cache compression method that leverages layer uncertainty to allocate budget size for each layer. 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 while achieving nearly lossless performance.

📄 PDF Abstract BibTeX arXiv:2412.09036

Code (0)

등록된 구현이 없습니다.

Methods 이 논문이 사용한 방법론

Softmax The Softmax output function transforms a previous layer's output into a vector of probabilities. It is commonly used for multiclass classification. Given an input vector $x$…
Attention 설명 없음

Similar Papers 제목 키워드 기반

MosaicKV: Serving Long-Context LLM with Dynamic Two-D KV Cache Compression

2026-07-01 · Sheng Qiang, Ruiwei Chen, Yinpeng Wu, Jinyu Gu 외 arxiv

Long-context LLM services now sustain prompts with hundreds of thousands to millions of tokens, making the key-value (KV) cache a first-order serving cost. Because the cache grows linearly with context length, it can exh…

DynamicKV: Task-Aware Adaptive KV Cache Compression for Long Context LLMs

2024-12-19 · Xiabin Zhou, Wenbin Wang, Minyan Zeng, Jiaxian Guo 외

Efficient KV cache management in LLMs is crucial for long-context tasks like RAG and summarization. Existing KV cache compression methods enforce a fixed pattern, neglecting task-specific characteristics and reducing the…

RAG

HeteroCache: A Dynamic Retrieval Approach to Heterogeneous KV Cache Compression for Long-Context LLM Inference

2026-01-20 · Zhiyuan Shi, Qibo Qiu, Feng Xue, Zhonglin Jiang 외 arxiv

The linear memory growth of the KV cache poses a significant bottleneck for LLM inference in long-context tasks. Existing static compression methods often fail to preserve globally important information. Although recent …

DynSplit-KV: Dynamic Semantic Splitting for KVCache Compression in Efficient Long-Context LLM Inference

2026-02-03 · Jiancai Ye, Jun Liu, Qingchen Li, Tianlang Zhao 외 arxiv

Although Key-Value (KV) Cache is essential for efficient large language models (LLMs) inference, its growing memory footprint in long-context scenarios poses a significant bottleneck, making KVCache compression crucial. …

LAVa: Layer-wise KV Cache Eviction with Dynamic Budget Allocation

2025-09-11 · Yiqun Shen, Song Yuan, Zhengze Zhang, Xiaoliang Wang 외 arxiv

KV Cache is commonly used to accelerate LLM inference with long contexts, yet its high memory demand drives the need for cache compression. Existing compression methods, however, are largely heuristic and lack dynamic bu…

Code Completion