paper-with-me

Papers

Residual vector quantization for KV cache compression in large language model

2024-10-21 · Ankur Kumar

KV cache compression methods have mainly relied on scalar quantization techniques to reduce the memory requirements during decoding. In this work, we apply residual vector quantization, which has been widely used for high fidelity audio compression, to compress KV cache in large language models (LLM). We adapt the standard recipe with minimal changes to compress the output of any key or value projection matrix in a pretrained LLM: we scale the vector by its standard deviation, divide channels into groups and then quantize each group with the same residual vector quantizer. We learn the codebook using exponential moving average and there are no other learnable parameters including the input and output projections normally used in a vector quantization set up. We find that a residual depth of 8 recovers most of the performance of the unquantized model. We also find that grouping non-contiguous channels together works better than grouping contiguous channels for compressing key matrix and the method further benefits from a light weight finetuning of LLM together with the quantization. Overall, the proposed technique is competitive with existing quantization methods while being much simpler and results in 5.5x compression compared to half precision.

📄 PDF Abstract BibTeX arXiv:2410.15704

Code (1)

iankur/vqllm 공식 구현 pytorch

Tasks

Audio CompressionLanguage ModelingLanguage ModellingLarge Language ModelQuantization

Methods 이 논문이 사용한 방법론

SET Dynamic Sparse Training method where weight mask is updated randomly periodically

Similar Papers 제목 키워드 기반

QET: Enhancing Quantized LLM Parameters and KV cache Compression through Element Substitution and Residual Clustering

2024-07-04 · Yanshu Wang, Wang Li, Zhaoqian Yao, Tong Yang

The matrix quantization entails representing matrix elements in a more space-efficient form to reduce storage usage, with dequantization restoring the original matrix for use. We formulate the Quantization Error Minimiza…

Computational EfficiencyEdge-computingImage CompressionLarge Language Model+4

VQKV: High-Fidelity and High-Ratio Cache Compression via Vector-Quantization

2026-03-17 · Yixuan Wang, Qingyu Shi, Jiayu Zhou, Dianbo Liu 외 arxiv

The growing context length of Large Language Models (LLMs) enlarges the Key-Value (KV) cache, limiting deployment in resource-limited environments. Prior training-free approaches for KV cache compression typically rely o…

Sequential KV Cache Compression via Probabilistic Language Tries: Beyond the Per-Vector Shannon Limit

2026-04-10 · Gregory Magarshak arxiv

Recent work on KV cache quantization, culminating in TurboQuant, has approached the Shannon entropy limit for per-vector compression of transformer key-value caches. We observe that this limit applies to a strictly weake…

Cache Me If You Must: Adaptive Key-Value Quantization for Large Language Models

2025-01-31 · Alina Shutova, Vladimir Malinovskii, Vage Egiazarian, Denis Kuznedelev 외

Efficient real-world deployments of large language models (LLMs) rely on Key-Value (KV) caching for processing and generating long outputs, reducing the need for repetitive computation. For large contexts, Key-Value cach…

GPUQuantization

PatternKV: Flattening KV Representation Expands Quantization Headroom

2025-10-05 · Ji Zhang, Yiwei Li, Shaoxiong Feng, Peiwen Yuan 외 arxiv

KV cache in autoregressive LLMs eliminates redundant recomputation but has emerged as the dominant memory and bandwidth bottleneck during inference, notably with long contexts and test-time scaling. KV quantization is a …