MiniCache: KV Cache Compression in Depth Dimension for Large Language Models
Akide Liu, Jing Liu, Zizheng Pan, Yefei He, Gholamreza Haffari, Bohan, Zhuang

TL;DR
MiniCache is a training-free method that compresses KV caches in large language models by merging similar states across layers, significantly reducing memory usage and increasing inference speed without sacrificing much accuracy.
Contribution
The paper introduces MiniCache, a novel layer-wise KV cache compression technique based on state similarity, which is simple, effective, and compatible with existing methods.
Findings
Achieves up to 5.02x compression ratio on ShareGPT dataset.
Reduces memory footprint by 41% compared to FP16 baseline.
Increases inference throughput by approximately 5x.
Abstract
A critical approach for efficiently deploying computationally demanding large language models (LLMs) is Key-Value (KV) caching. The KV cache stores key-value states of previously generated tokens, significantly reducing the need for repetitive computations and thereby lowering latency in autoregressive generation. However, the size of the KV cache grows linearly with sequence length, posing challenges for applications requiring long context input and extensive sequence generation. In this paper, we present a simple yet effective approach, called MiniCache, to compress the KV cache across layers from a novel depth perspective, significantly reducing the memory footprint for LLM inference. Our approach is based on the observation that KV cache states exhibit high similarity between the adjacent layers in the middle-to-deep portion of LLMs. To facilitate merging, we propose disentangling…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
Taxonomy
TopicsTopic Modeling · Algorithms and Data Compression · Natural Language Processing Techniques
