MetaKV: Adaptive KV Cache Compression for Constrained LLM Inference

📅 2026-09-07
📈 Citations: 0
✨ Influential: 0
📄 PDF
🤖 AI Summary
本文提出MetaKV框架,通过自适应选择KV缓存压缩配置来解决大语言模型推理中的内存开销问题,同时满足用户指定的延迟和峰值内存预算。
📝 Abstract
Key--value (KV) cache compression is an effective way to reduce the memory overhead of large language model (LLM) inference, particularly for long-context workloads. However, existing compression methods make different trade-offs among accuracy, inference latency, and peak KV cache memory utilization, making a single fixed configuration unsuitable across different prompts and resource constraints. We introduce MetaKV, an adaptive framework that selects a KV cache compression configuration for each input prompt based on user-specified latency and peak memory budgets. MetaKV uses lightweight prediction models to estimate the end-to-end latency, peak memory, and probability of a correct response for each candidate configuration, and selects the configuration that best satisfies the latency-memory constraints while preserving accuracy. We evaluate MetaKV across ten configurations from three representative KV cache compression methods, KVQuant, H$_2$O, and RocketKV, together with an uncompressed FP16 configuration, on four datasets covering mathematics, science, commonsense reasoning, and reading comprehension. Across a wide range of latency and peak memory constraints, MetaKV consistently outperforms the best static configuration, improving constrained success rate (CSR), the fraction of prompts answered correctly while satisfying both constraints, by approximately 0.07 on average and up to 0.135. These results demonstrate the benefit of adapting KV cache compression to individual prompts and latency-memory constraints. Code is available at https://github.com/MichaelWang0505/MetaKV.git
Problem

Research questions and friction points this paper is trying to address.

KV cache compression
inference latency
peak memory utilization
large language model
adaptive framework
Innovation

Methods, ideas, or system contributions that make the work stand out.

adaptive framework
KV cache compression
latency-memory constraints
lightweight prediction models
🔎 Similar Papers
No similar papers found.
💼 Related Jobs
No related jobs found.
M
Michael Wang
Lake Washington School District
K
Keith Li
XSchool
R
Roozbeh Bostandoost
UMass Amherst