University of Illinois Urbana-Champaign
Ghostdecoding: leveraging random-feature kernels for error-aware and training-free KV cache selection
Abstract
dc:descriptionKey-value (KV) cache is essential for efficient inference in large language models (LLMs) by storing intermediate representations to reduce redundant computations. However, as sequence lengths grow, it becomes a major bottleneck due to increasing computational and memory demands. Existing KV cache compression methods mitigate this issue by pruning or selecting critical entries, but often suffer from several limitations, including unpredictable errors, limited dynamism, and strong assumptions about context relevance. In this work, we propose GhostDecoding, a novel training-free KV cache selection mechanism that dynamically reduces the effective sequence length while maintaining error awareness for evicted entries. Using a random feature softmax kernel, our method estimates the attention score of an arbitrary number of evicted positions with O(1) time and space overhead, and selectively recomputes them when necessary. We develop efficient sparse CUDA kernels to support our algorithm. Experimental results demonstrate that GhostDecoding achieves up to 1.6× more computation reduction compared to H2O, leading to up to 1.9× decoding speed-up compared to full attention on long sequences.
Degree
thesis:*- Name thesis:degree_name
- M.S.
- Level thesis:degree_level
- Thesis
- Discipline thesis:degree_discipline
- Computer Science
- Grantor
- University of Illinois Urbana-Champaign
- Year dc:date
- 2025
Author and committee
dc:creator, dc:contributor.*- Author dc:creator
-
- Guo, Hao
- Contributors dc:contributor
-
- Mendis, Charith
Subjects
dc:subject × 3Rights
dc:rights- Statement dc:rights
-
- Copyright 2025 Hao Guo
- Language dc:language
- en, eng
Identifiers
dc:identifier.*- Handle dc:identifier
- https://hdl.handle.net/2142/129705