PreprintCited by 9Advanced Neural Network ApplicationsTopic ModelingNatural Language Processing Techniques

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

Open access
Kang, Hao, Zhang, Qingru, Kundu, Souvik, Jeong, Geonhwa, Liu, Zaoxing, Krishna, Tushar, Zhao, Tuo·2024·arXiv

Abstract

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.

The claims and statistics of this paper haven’t been checked yet.

Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.

A few free checks a day · papers already verified open instantly · results are public

Integrity signals

Registry

DataCite · 10.48550/arxiv.2403.05527

Cites

47 of 47 references verified0 citation errors · 0 not checkable

Statistics

Claims the paper makes

The claims and statistics of this paper haven’t been checked yet.

Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.

A few free checks a day · papers already verified open instantly · results are public

Claims other papers make about this one

Each is checked against this paper’s own text: does it say what the citing paper says it does?

  • SGLang is compatible with many other common inference optimizations.

    “Additionally, SGLang is compatible with many other common inference optimizations [60, 39, 3, 23, 59, 10, 26, 15, 19, 32, 31, 11].”

    From SGLang: Efficient Execution of Structured Language Model Programs (2023) · cites this paper as [19]

    The Discussion and Conclusions section describes GEAR as a plug-and-play KV-cache compression method that improves inference throughput, so the paper supplies an example of an inference optimization. Our copy does not establish that SGLang is compatible with GEAR or with other optimizations; a search for “SGLang” found no relevant passage. (LLM, conf=0.79)

    Experimental — accuracy not yet measured
  • The KV cache causes memory usage to grow linearly with the number of tokens, and unmanaged growth can result in the GPU running out of memory.

    “However, the KV cache causes memory usage to grow linearly with the number of tokens, and unmanaged growth can result in the GPU running out of memory [Hooper et al., 2024, Kang et al., 2024].”

    From Online Scheduling for LLM Inference with KV Cache Constraints (2025) · cites this paper as Kang et al., 2024

  • Recipe-based cache compression such as GEAR targets a different bottleneck: near-lossless 4-bit caches buy capacity (longer contexts or more concurrent streams in fixed memory) at the price of additional decompression compute.

    “Recipe-based cache compression such as GEAR [10] targets a different bottleneck: near-lossless 4-bit caches buy capacity (longer contexts or more concurrent streams in fixed memory) at the price of additional decompression compute.”
  • System prompts are shared by all queries in various LLM applications and often exceed 1,000 tokens.

    “For example, system prompts are shared by all queries in various LLM applications, such as Claude [4], ChatGPT [44] and Grok [58], and the promopts often exceed 1,000 tokens [28].”

    From HotPrefix: Hotness-Aware KV Cache Scheduling for Efficient Prefix Sharing in LLM Inference Systems (2025) · cites this paper as [28]

    The Background section discusses input tokens and KV caching, and Section 4.1 discusses chain-of-thought prompts, but neither addresses the length of system prompts. Searches for “system prompt,” “1,000 tokens,” and prompt length found no passage saying that system prompts often exceed 1,000 tokens; the cited paper’s copy therefore does not verify the part attached to [28]. (LLM, conf=0.76)

    Experimental — accuracy not yet measured

Self-check

Percentages, sums and reported differences re-computed from the paper’s own numbers.

The self-check needs the paper’s full text.

Cites

Flagged first, then by citations

Research works printed but not linked: 1

  1. Brown, T., Mann, B., Ryder, N., Subbiah, M., Kaplan, J. D., Dhariwal, P., Neelakantan, A., Shyam, P., Sastry, G., Askell, A. et al. (2020a). Language models are few-shot learners. Advances in neural information processing systems, 33 1877-1901.

Cited by

Sorted by citations

Authors
Kang, H., Zhang, Q., Kundu, S., Jeong, G., Liu, Z., Krishna, T., & Zhao, T.
Venue
arXiv
Publisher
arXiv
Published
2024
ISSN
2331-8422 (ISSN-L)
OpenAlex
W4392678657
Cited by
2
References
43
Citations by year
2026: 1 · 2024: 1
Type
posted content
Language
en
Open access
Locations
  • arXiv (Cornell University) (submittedVersion)
  • arXiv (Cornell University)
Topics
  • Physical Sciences › Computer Science › Computer Vision and Pattern Recognition › Advanced Neural Network Applications
  • Physical Sciences › Computer Science › Artificial Intelligence › Topic Modeling
  • Physical Sciences › Computer Science › Artificial Intelligence › Natural Language Processing Techniques
Keywords
key-value cache compression, large language model inference, low-rank approximation, sparse matrices, quantization, autoregressive decoding, inference throughput, memory reduction, 4-bit quantization

About these checks

Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.

Statistics and arithmetic are recomputed, not judged.

Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.

What counts as a claim ›How we measure confidence ›How we check this ›

Are you an author, or do you see a problem with this page? Request a review