🤖 AI Summary
This study addresses the memory bottleneck of KV caches in long-context LLM serving, along with the information loss and decoding latency inherent in existing compression methods, by proposing SlimKV. This approach introduces a reconstruction-free beacon attention mechanism that optimizes KV cache through joint token-feature compression. By exploiting positional asymmetry, it enables latent-space attention to avoid full-dimensional reconstruction. Furthermore, SlimKV incorporates low-rank-aware training, layer-adaptive rank allocation, K-RoPE unconstrained modeling, and beacon memory state compression. Evaluated on the LongBench benchmark, SlimKV retains over 96% of original performance at 16× and 32× compression ratios while achieving a 7.34× attention speedup, significantly outperforming existing methods.
📝 Abstract
Long-context LLM serving is increasingly bottlenecked by KV-cache memory, especially in resource-constrained scenarios. Among existing KV-cache compression strategies, token-wise methods reduce cached states but risk information loss through eviction or condensation, while feature-wise methods reduce per-token KV dimensions but can require full-dimensional reconstruction to apply positional embedding, limiting decoding speedups. We introduce SlimKV, a question-agnostic joint token-feature KV-cache compression method. SlimKV uses low-rank-aware training to compress long contexts into beacon memory states with latent KV representations, together with layer-adaptive rank allocation. We further uncover a positional asymmetry: removing key-side RoPE affects beacon and raw tokens differently, with much smaller degradation for beacon tokens. Exploiting this asymmetry, SlimKV trains beacon KV projections under a K-RoPE-free constraint and enables latent-space attention during decoding, mitigating reconstruction latency. On LongBench, SlimKV outperforms baselines at 16x/32x compression and remains leading at 4x/8x, where it retains over 96% of the uncompressed model's score. Needle-in-a-Haystack confirms robustness across evidence positions, and efficiency evaluation shows up to 7.34x attention speedup and 3.38x end-to-end decoding speedup over the uncompressed model at 128K length.