paper-with-me

홈 › Papers

TreeKV: Smooth Key-Value Cache Compression with Tree Structures

2025-01-09 · Ziwei He, Jian Yuan, Haoli Bai, Jingwen Leng, Bo Jiang

Efficient key-value (KV) cache compression is critical for scaling transformer-based Large Language Models (LLMs) in long sequences and resource-limited settings. Existing methods evict tokens based on their positions or importance scores, but position-based strategies can miss crucial information outside predefined regions, while those relying on global importance scores resulting in strong regional biases, limiting the KV cache's overall context retention and potentially impairing the performance of LLMs on complex tasks. Our wavelet analysis reveals that as tokens approach the end of sequence, their contributions to generation gradually increase and tends to diverge more from neighboring tokens, indicating a smooth transition with increasing complexity and variability from distant to nearby context. Motivated by this observation, we propose TreeKV, an intuitive, training-free method that employs a tree structure for smooth cache compression. TreeKV maintains a fixed cache size, allowing LLMs to deliver high-quality output even in long text scenarios. Unlike most compression methods, TreeKV is applicable to both the generation and prefilling stages. TreeKV consistently surpasses all baseline models in language modeling tasks on PG19 and OpenWebText2, allowing LLMs trained with short context window to generalize to longer window with a 16x cache reduction. On the Longbench benchmark, TreeKV achieves the best performance with only 6\% of the budget at optimal efficiency.

📄 PDF Abstract BibTeX arXiv:2501.04987

Code (0)

등록된 구현이 없습니다.

Tasks

Language ModelingLanguage Modelling

Similar Papers 제목 키워드 기반

Enhancing Large Multimodal Models with Adaptive Sparsity and KV Cache Compression

2025-07-28 · Te Zhang, Yuheng Li, Junxiang Wang, Lujun Li arxiv

Large multimodal models (LMMs) have advanced significantly by integrating visual encoders with extensive language models, enabling robust reasoning capabilities. However, compressing LMMs for deployment on edge devices r…

GRKV: Global Regression for Training-Free KV Cache Compression in Long-Context LLMs

2026-05-29 · Junjie Peng, You Wu, Haoyi Wu, Jialong Han 외 arxiv

Large language models (LLMs) with extended context lengths rely on the key-value (KV) cache to support attention over prior tokens. However, maintaining the KV cache incurs substantial memory overhead, motivating KV-cach…

SVDq: 1.25-bit and 410x Key Cache Compression for LLM Attention

2025-02-21 · Hong Yankun, Li Xing, Zhen Hui-Ling, Yu Xianzhi 외

For the efficient inference of Large Language Models (LLMs), the effective compression of key-value (KV) cache is essential. Three main types of KV cache compression techniques, namely sparsity, channel compression, and …

Quantization

Rethinking Key-Value Cache Compression Techniques for Large Language Model Serving

2025-03-31 · Wei Gao, Xinyu Zhou, Peng Sun, Tianwei Zhang 외

Key-Value cache (\texttt{KV} \texttt{cache}) compression has emerged as a promising technique to optimize Large Language Model (LLM) serving. It primarily decreases the memory consumption of \texttt{KV} \texttt{cache} to…

Computational EfficiencyLanguage ModelingLanguage ModellingLarge Language Model

ReCalKV: Low-Rank KV Cache Compression via Head Reordering and Offline Calibration

2025-05-30 · Xianglong Yan, Zhiteng Li, Tianao Zhang, Linghe Kong 외

Large language models (LLMs) have achieved remarkable performance, yet their capability on long-context reasoning is often constrained by the excessive memory required to store the Key-Value (KV) cache. This makes KV cac…

Low-rank compression