paper-with-me

Papers

GEAR: An Efficient KV Cache Compression Recipe for Near-Lossless Generative Inference of LLM

2024-03-08 · Hao Kang, Qingru Zhang, Souvik Kundu, Geonhwa Jeong, Zaoxing Liu, Tushar Krishna, Tuo Zhao

Key-value (KV) caching has become the de-facto to accelerate generation speed for large language models (LLMs) inference. However, the growing cache demand with increasing sequence length has transformed LLM inference to be a memory bound problem, significantly constraining the system throughput. Existing methods rely on dropping unimportant tokens or quantizing all entries uniformly. Such methods, however, often incur high approximation errors to represent the compressed matrices. The autoregressive decoding process further compounds the error of each step, resulting in critical deviation in model generation and deterioration of performance. To tackle this challenge, we propose GEAR, an efficient KV cache compression framework that achieves near-lossless high-ratio compression. GEAR first applies quantization to majority of entries of similar magnitudes to ultra-low precision. It then employs a low rank matrix to approximate the quantization error, and a sparse matrix to remedy individual errors from outlier entries. By adeptly integrating three techniques, GEAR is able to fully exploit their synergistic potentials. Our experiments demonstrate that compared to alternatives, GEAR achieves near-lossless 4-bit KV cache compression with up to 2.38x throughput improvement, while reducing peak-memory size up to 2.29x. Our code is publicly available at https://github.com/HaoKang-Timmy/GEAR.

📄 PDF Abstract BibTeX arXiv:2403.05527

Code (2)

haokang-timmy/gear 공식 구현 pytorch
opengear-project/gear pytorch

Tasks

Quantization

Methods 이 논문이 사용한 방법론

SPEED The monocular depth estimation (MDE) is the task of estimating depth from a single frame. This information is an essential knowledge in many computer vision tasks such as scene…

Similar Papers 제목 키워드 기반

A JoLT for the KV Cache: Near-Lossless KV Cache Compression via Joint Tucker and JL-Residual Allocation for LLMs

2026-07-14 · Rahul Krishnan, Volker Schulz arxiv

The key-value (KV) cache has become the dominant memory cost of transformer inference: it grows with batch size, context length, and depth, and at long context it, rather than the model weights, sets the throughput ceili…

TurboAngle: Near-Lossless KV Cache Compression via Uniform Angle Quantization

2026-03-29 · Dipkumar Patel arxiv

We compress KV cache entries by quantizing angles in the Fast Walsh-Hadamard domain, where a random diagonal rotation makes consecutive element pairs approximately uniformly distributed on the unit circle. We extend this…

LoMA: Lossless Compressed Memory Attention

2024-01-16 · Yumeng Wang, Zhenyang Xiao

Large Language Models (LLMs) face limitations due to the high demand on GPU memory and computational resources when handling long contexts. While sparsify the Key-Value (KV) cache of transformer model is a typical strate…

GPU

Lossless KV Cache Compression to 2%

2024-10-20 · Zhen Yang, J. N. Han, Kan Wu, Ruobing Xie 외

Large language models have revolutionized data processing in numerous domains, with their ability to handle extended context reasoning receiving notable recognition. To speed up inference, maintaining a key-value (KV) ca…

Dimensionality ReductionQuantization

Near-Lossless Model Compression Enables Longer Context Inference in DNA Large Language Models

2025-11-18 · Rui Zhu, Xiaopu Zhou, Haixu Tang, Stephen W. Scherer 외 arxiv

Trained on massive cross-species DNA corpora, DNA large language models (LLMs) learn the fundamental "grammar" and evolutionary patterns of genomic sequences. This makes them powerful priors for DNA sequence modeling, pa…

Model Compression