Proposed a novel algorithm-hardware co-design, HiKV, to tackle the memory bottleneck in long-context large language models by exploiting KV cache redundancy through hierarchical importance awareness, achieving up to 7.95x speedup and 90% energy reduction.
Proposed a novel algorithm-hardware co-design, HiKV, to tackle the memory bottleneck in long-context large language models
Keywords
Before reading this…
Applications
- →Natural language processing
- →Machine learning
To understand this paper, make sure you know these concepts first:
- Understanding of large language modelsfind papers →
- Familiarity with KV cache and compression techniquesfind papers →
Abstract
More Like ThisWith the rapid adoption of long-context large language models (LLMs), the continuously growing KV cache during decoding has become the critical memory bottleneck. To tackle this challenge, we propose HiKV, a novel algorithm-hardware co-design that exploits KV cache redundancy through hierarchical importance awareness. Algorithmically, HiKV compresses the KV cache at two granularities: Stage I evicts unimportant tokens within a fixed budget, and Stage II further loads only the significant elements of each retained token, reaching compression ratios unattainable at a single granularity. Architecturally, we develop a dedicated accelerator centered on a reconfigurable importance sorter that switches between the distinct sorting datapaths each stage requires, unifying the two-stage acceleration in one circuit with minimal overhead. Evaluated on representative LLMs, HiKV achieves up to 7.95x speedup and 90% energy reduction in the attention computation over the vanilla KV cache baseline within negligible 1% accuracy loss. Under iso-accuracy constraints, HiKV outperforms state-of-the-art importance-based methods by achieving an additional 1.82~4.87x reduction in external memory accesses. These benefits are enabled by specialized hardware components that add only 8% to the system area.