PulseExploreJournal ClubDebatesTrendingResearchersJournals
Instagram
HomeExploreJournal ClubTrending
Synapse
⌘+K
Synapse
March 8, 20241 citationsOpen Access

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

View Full Paper
HKHao KangQZQingru ZhangSKSouvik Kundu

Key Points

  • GEAR achieves near-lossless compression, boosting throughput by up to 2.38 times across tests.
  • The framework compresses KV caches using 4-bit quantization, significantly reducing peak-memory size up to 2.29 times.
  • By utilizing matrix approximation techniques and sparse matrices, GEAR effectively minimizes error in generative processes while maintaining performance levels over alternatives. The method shows promise in accelerating large language model inference while keeping memory demands manageable.

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.

Ask AI
Helpful
Bookmark
Share
View Full Paper

Cite This Study

Kang et al. (2024) studied this question.

synapsesocial.com/papers/68e752dab6db6435876cb7b8https://doi.org/10.48550/arxiv.2403.05527
Ask AI
Helpful
Bookmark
Share
View Full Paper

Also Consider

Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context:

  1. 1No Token Left Behind: Reliable KV Cache Compression via Importance-Aware Mixed Precision Quantization2024 · 1 citations
  2. 2Effectively Compress KV Heads for LLM2024
  3. 3Unlocking Data-free Low-bit Quantization with Matrix Decomposition for KV Cache Compression2024
  4. 4MiniCache: KV Cache Compression in Depth Dimension for Large Language Models2024 · 3 citations
  5. 5Get More with LESS: Synthesizing Recurrence with KV Cache Compression for Efficient LLM Inference2024 · 1 citations