LongFlow: Efficient KV Cache Compression for Reasoning Models

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Su, Yi, Tian, Zhenxu, Qiao, Dan, Zhou, Yuechi, Li, Juntao, Zhang, Min
Natura: Preprint
Pubblicazione: 2026
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866910165085716480
author Su, Yi
Tian, Zhenxu
Qiao, Dan
Zhou, Yuechi
Li, Juntao
Zhang, Min
author_facet Su, Yi
Tian, Zhenxu
Qiao, Dan
Zhou, Yuechi
Li, Juntao
Zhang, Min
contents Recent reasoning models such as OpenAI-o1 and DeepSeek-R1 have shown strong performance on complex tasks including mathematical reasoning and code generation. However, this performance gain comes with substantially longer output sequences, leading to significantly increased deployment costs. In particular, long outputs require large KV caches, resulting in high memory consumption and severe bandwidth pressure during attention computation. Most existing KV cache optimization methods are designed for long-input, short-output scenarios and are ineffective for the long-output setting of reasoning models. Moreover, importance estimation in prior work is computationally expensive and becomes prohibitive when continuous re-evaluation is required during long generation. To address these challenges, we propose LongFlow, a KV cache compression method with an efficient importance estimation metric derived from an intermediate result of attention computation using only the current query. This design introduces negligible computational overhead and requires no auxiliary storage. We further develop a custom kernel that fuses FlashAttention, importance estimation, and token eviction into a single optimized operator, improving system-level efficiency. Experiments show that LongFlow achieves up to an 11.8 times throughput improvement with 80% KV cache compression with minimal impact on model accuracy.
format Preprint
id arxiv_https___arxiv_org_abs_2603_11504
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle LongFlow: Efficient KV Cache Compression for Reasoning Models
Su, Yi
Tian, Zhenxu
Qiao, Dan
Zhou, Yuechi
Li, Juntao
Zhang, Min
Machine Learning
Computation and Language
Recent reasoning models such as OpenAI-o1 and DeepSeek-R1 have shown strong performance on complex tasks including mathematical reasoning and code generation. However, this performance gain comes with substantially longer output sequences, leading to significantly increased deployment costs. In particular, long outputs require large KV caches, resulting in high memory consumption and severe bandwidth pressure during attention computation. Most existing KV cache optimization methods are designed for long-input, short-output scenarios and are ineffective for the long-output setting of reasoning models. Moreover, importance estimation in prior work is computationally expensive and becomes prohibitive when continuous re-evaluation is required during long generation. To address these challenges, we propose LongFlow, a KV cache compression method with an efficient importance estimation metric derived from an intermediate result of attention computation using only the current query. This design introduces negligible computational overhead and requires no auxiliary storage. We further develop a custom kernel that fuses FlashAttention, importance estimation, and token eviction into a single optimized operator, improving system-level efficiency. Experiments show that LongFlow achieves up to an 11.8 times throughput improvement with 80% KV cache compression with minimal impact on model accuracy.
title LongFlow: Efficient KV Cache Compression for Reasoning Models
topic Machine Learning
Computation and Language
url https://arxiv.org/abs/2603.11504