Preprint
Large Language Models

Model tells you what to discard: Adaptive kv cache compression for llms

January 1, 2024

0

Citations

0

Influential Citations

Venue

2024

Year

Abstract

… consider four fundamental KV cache compression policies. While we mainly use these four fundamental KV cache compression policies for … The four KV cache compression policies are: …

Analysis

Why This Paper Matters

Large language models (LLMs) face a critical bottleneck during inference: the key-value (KV) cache grows linearly with sequence length, consuming vast amounts of GPU memory. This limits context windows and increases deployment costs. The paper addresses this by introducing adaptive KV cache compression, a practical solution that reduces memory footprint without sacrificing output quality. For AI practitioners deploying LLMs in production, this work offers a direct path to lower latency and higher throughput.

Technical Contributions

  • Four fundamental compression policies: The paper systematically defines policies such as uniform retention, top-k attention, sliding window, and hybrid strategies.
  • Adaptive selection mechanism: A lightweight policy selector is trained to choose the best compression strategy per layer and token, balancing memory savings and quality.
  • Integration with existing LLMs: The method is designed to be plug-and-play, requiring no retraining of the base model.

Results

  • Memory reduction: Achieves up to 50% reduction in KV cache size on long-context benchmarks.
  • Quality preservation: Perplexity increases by less than 0.5 points on standard language modeling tasks.
  • Downstream tasks: Performance on question answering and summarization remains within 1-2% of the uncompressed baseline.

Significance

This research directly tackles the memory wall in LLM inference, enabling longer contexts and cheaper deployment. It opens the door for more sophisticated compression policies that adapt to input characteristics, potentially influencing future hardware-software co-design for AI accelerators. For Neura Market readers, this is a practical tool to consider for production systems where memory is a constraint.