CLLGNov 27, 2024

MiniKV: Pushing the Limits of LLM Inference via 2-Bit Layer-Discriminative KV Cache

arXiv:2411.18077v36 citationsh-index: 2
Originality Highly original
AI Analysis

This addresses efficiency challenges in serving LLMs, especially for long-context tasks, with incremental improvements over existing methods.

The paper tackles the memory bottleneck of KV cache in LLM inference for long-context tasks by introducing MiniKV, a method that uses a 2-bit layer-discriminative KV cache to achieve 86% compression while recovering over 98.5% accuracy.

How to efficiently serve LLMs in practice has become exceptionally challenging due to their prohibitive memory and computation requirements. In this study, we investigate optimizing the KV cache, whose memory footprint poses a critical bottleneck in LLM inference, especially when dealing with long context tasks. To tackle the challenge, we introduce MiniKV, a KV cache optimization method that simultaneously preserves long context task accuracy while significantly reducing KV cache size via a novel 2-bit layer-discriminative KV cache. More importantly, we develop specialized CUDA kernels to make MiniKV compatible with FlashAttention. Experiments on a wide range of long context tasks show that MiniKV effectively achieves 86% KV cache compression ratio while recovering over 98.5% of accuracy, outperforming state-of-the-art methods while achieving excellent measured system performance improvements.

Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes