Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

Lookahead Q-Cache: Achieving More Consistent KV Cache Eviction via Pseudo Query

About

Large language models (LLMs) rely on key-value cache (KV cache) to accelerate decoding by reducing redundant computations. However, the KV cache memory usage grows substantially with longer text sequences, posing challenges for efficient deployment. Existing KV cache eviction methods prune tokens using prefilling-stage attention scores, causing inconsistency with actual inference queries, especially under tight memory budgets. In this paper, we propose Lookahead Q-Cache (LAQ), a novel eviction framework that generates low-cost pseudo lookahead queries to better approximate the true decoding-stage queries. By using these lookahead queries as the observation window for importance estimation, LAQ achieves more consistent and accurate KV cache eviction aligned with real inference scenarios. Experimental results on LongBench and Needle-in-a-Haystack benchmarks show that LAQ outperforms existing methods across various budget levels, achieving a 1 $\sim$ 4 point improvement on LongBench under limited cache budget. Moreover, LAQ is complementary to existing approaches and can be flexibly combined to yield further improvements.

Yixuan Wang, Shiyu Ji, Yijun Liu, Yuzhuang Xu, Yang Xu, Qingfu Zhu, Wanxiang Che• 2025

Related benchmarks

TaskDatasetResultRank
Multi-turn Dialogue EvaluationMT-Bench
Overall Score8.56
447
Long-context Language UnderstandingLongBench
M-Avg45.8
292
Long-context language modelingLongBench
Average Score39.44
164
Long-context UnderstandingLongBench (test)
Avg Score49.15
136
Long-context language evaluationLongBench v1 (test)
NrtQA Score18.74
31
Long-context UnderstandingRULER 64k
Accuracy64.1
25
Long-context UnderstandingRULER 128k
Accuracy50.67
15
Inference EfficiencyLLaMA 8B 8K context length 3.1
Theoretical Compute (TFLOPs)137
10
Inference EfficiencyLLaMA 8B 32K context length 3.1
Theoretical Compute (TFLOPs)930
5
Efficiency AnalysisContext Length 4K
Theoretical Compute (TFLOPs)61
5
Showing 10 of 12 rows

Other info

Follow for update