paper-with-me

Papers

CSKV: Training-Efficient Channel Shrinking for KV Cache in Long-Context Scenarios

2024-09-16 · Luning Wang, Shiyao Li, Xuefei Ning, Zhihang Yuan, Shengen Yan, Guohao Dai, Yu Wang

Large Language Models (LLMs) have been widely adopted to process long-context tasks. However, the large memory overhead of the key-value (KV) cache poses significant challenges in long-context scenarios. Existing training-free KV cache compression methods typically focus on quantization and token pruning, which have compression limits, and excessive sparsity can lead to severe performance degradation. Other methods design new architectures with less KV overhead but require significant training overhead. To address the above two drawbacks, we further explore the redundancy in the channel dimension and apply an architecture-level design with minor training costs. Therefore, we introduce CSKV, a training-efficient Channel Shrinking technique for KV cache compression: (1) We first analyze the singular value distribution of the KV cache, revealing significant redundancy and compression potential along the channel dimension. Based on this observation, we propose using low-rank decomposition for key and value layers and storing the low-dimension features. (2) To preserve model performance, we introduce a bi-branch KV cache, including a window-based full-precision KV cache and a low-precision compressed KV cache. (3) To reduce the training costs, we minimize the layer-wise reconstruction loss for the compressed KV cache instead of retraining the entire LLMs. Extensive experiments show that CSKV can reduce the memory overhead of the KV cache by 80% while maintaining the model's long-context capability. Moreover, we show that our method can be seamlessly combined with quantization to further reduce the memory overhead, achieving a compression ratio of up to 95%. Code is available at https://github.com/wln20/CSKV.

📄 PDF Abstract BibTeX arXiv:2409.10593

Code (1)

wln20/CSKV 공식 구현 pytorch

Methods 이 논문이 사용한 방법론

Focus 설명 없음

Similar Papers 제목 키워드 기반

LeanK: Learnable K Cache Channel Pruning for Efficient Decoding

2025-08-04 · Yike Zhang, Zhiyuan He, Huiqiang Jiang, Chengruidong Zhang 외 arxiv

Large language models (LLMs) enable long-context tasks but face efficiency challenges due to the growing key-value (KV) cache. We propose LeanK, a learning-based method that prunes unimportant key (K) cache channels by l…

HCAttention: Extreme KV Cache Compression via Heterogeneous Attention Computing for LLMs

2025-07-26 · Dongquan Yang, Yifan Yang, Xiaotian Yu, Xianbiao Qi 외 arxiv

Processing long-context inputs with large language models presents a significant challenge due to the enormous memory requirements of the Key-Value (KV) cache during inference. Existing KV cache compression methods exhib…

BS-NAS: Broadening-and-Shrinking One-Shot NAS with Searchable Numbers of Channels

2020-03-22 · Zan Shen, Jiang Qian, Bojin Zhuang, Shaojun Wang 외

One-Shot methods have evolved into one of the most popular methods in Neural Architecture Search (NAS) due to weight sharing and single training of a supernet. However, existing methods generally suffer from two issues: …

Neural Architecture Search

Past- and Future-Informed KV Cache Policy with Salience Estimation in Autoregressive Video Diffusion

2026-01-29 · Hanmo Chen, Chenghao Xu, Xu Yang, Xuan Chen 외 arxiv

Video generation is pivotal to digital media creation, and recent advances in autoregressive video generation have markedly enhanced the efficiency of real-time video synthesis. However, existing approaches generally rel…

Video Generation

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