LazyEviction: Lagged KV Eviction with Attention Pattern Observation for Efficient Long Reasoning

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Zhang, Haoyue, Zhang, Hualei, Ma, Xiaosong, Zhang, Jie, Guo, Song
Natura: Preprint
Pubblicazione: 2025
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866908593181163520
author Zhang, Haoyue
Zhang, Hualei
Ma, Xiaosong
Zhang, Jie
Guo, Song
author_facet Zhang, Haoyue
Zhang, Hualei
Ma, Xiaosong
Zhang, Jie
Guo, Song
contents Large Language Models (LLMs) exhibit enhanced capabilities by Chain-of-Thought reasoning. However, the extended reasoning sequences introduce significant GPU memory overhead due to increased key-value (KV) cache. Existing KV cache compression methods mitigate memory bottlenecks but struggle in long reasoning tasks. In this paper, we analyze attention patterns in reasoning tasks and reveal a Token Importance Recurrence phenomenon: a large proportion of tokens regain high attention after multiple decoding steps, which is failed to capture by existing works and may lead to unpredictable eviction on such periodically critical tokens. To address this, we propose LazyEviction, an observation window-based lagged eviction framework retaining latent recurring tokens by prioritized eviction based on tokens' recurrence patterns. Extensive experiments demonstrate that LazyEviction reduces KV cache by 50%~70% while maintaining comparable accuracy, outperforming existing KV cache compression baselines. Our implementation code can be found at https://github.com/Halo-949/LazyEviction.
format Preprint
id arxiv_https___arxiv_org_abs_2506_15969
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle LazyEviction: Lagged KV Eviction with Attention Pattern Observation for Efficient Long Reasoning
Zhang, Haoyue
Zhang, Hualei
Ma, Xiaosong
Zhang, Jie
Guo, Song
Machine Learning
Computation and Language
Large Language Models (LLMs) exhibit enhanced capabilities by Chain-of-Thought reasoning. However, the extended reasoning sequences introduce significant GPU memory overhead due to increased key-value (KV) cache. Existing KV cache compression methods mitigate memory bottlenecks but struggle in long reasoning tasks. In this paper, we analyze attention patterns in reasoning tasks and reveal a Token Importance Recurrence phenomenon: a large proportion of tokens regain high attention after multiple decoding steps, which is failed to capture by existing works and may lead to unpredictable eviction on such periodically critical tokens. To address this, we propose LazyEviction, an observation window-based lagged eviction framework retaining latent recurring tokens by prioritized eviction based on tokens' recurrence patterns. Extensive experiments demonstrate that LazyEviction reduces KV cache by 50%~70% while maintaining comparable accuracy, outperforming existing KV cache compression baselines. Our implementation code can be found at https://github.com/Halo-949/LazyEviction.
title LazyEviction: Lagged KV Eviction with Attention Pattern Observation for Efficient Long Reasoning
topic Machine Learning
Computation and Language
url https://arxiv.org/abs/2506.15969