SpindleKV: A Novel KV Cache Reduction Method Balancing Both Shallow and Deep Layers

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Tang, Zicong, Luohe, Shi, Li, Zuchao, Qi, Baoyuan, Liu, Guoming, Zhang, Lefei, Wang, Ping
Format: Preprint
Veröffentlicht: 2025
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866913933320781824
author Tang, Zicong
Luohe, Shi
Li, Zuchao
Qi, Baoyuan
Liu, Guoming
Zhang, Lefei
Wang, Ping
author_facet Tang, Zicong
Luohe, Shi
Li, Zuchao
Qi, Baoyuan
Liu, Guoming
Zhang, Lefei
Wang, Ping
contents Large Language Models (LLMs) have achieved impressive accomplishments in recent years. However, the increasing memory consumption of KV cache has possessed a significant challenge to the inference system. Eviction methods have revealed the inherent redundancy within the KV cache, demonstrating its potential for reduction, particularly in deeper layers. However, KV cache reduction for shallower layers has been found to be insufficient. Based on our observation that, the KV cache exhibits a high degree of similarity. Based on this observation, we proposed a novel KV cache reduction method, SpindleKV, which balances both shallow and deep layers. For deep layers, we employ an attention weight based eviction method, while for shallow layers, we apply a codebook based replacement approach which is learnt by similarity and merging policy. Moreover, SpindleKV addressed the Grouped-Query Attention (GQA) dilemma faced by other attention based eviction methods. Experiments on two common benchmarks with three different LLMs shown that SpindleKV obtained better KV cache reduction effect compared to baseline methods, while preserving similar or even better model performance.
format Preprint
id arxiv_https___arxiv_org_abs_2507_06517
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle SpindleKV: A Novel KV Cache Reduction Method Balancing Both Shallow and Deep Layers
Tang, Zicong
Luohe, Shi
Li, Zuchao
Qi, Baoyuan
Liu, Guoming
Zhang, Lefei
Wang, Ping
Computation and Language
Large Language Models (LLMs) have achieved impressive accomplishments in recent years. However, the increasing memory consumption of KV cache has possessed a significant challenge to the inference system. Eviction methods have revealed the inherent redundancy within the KV cache, demonstrating its potential for reduction, particularly in deeper layers. However, KV cache reduction for shallower layers has been found to be insufficient. Based on our observation that, the KV cache exhibits a high degree of similarity. Based on this observation, we proposed a novel KV cache reduction method, SpindleKV, which balances both shallow and deep layers. For deep layers, we employ an attention weight based eviction method, while for shallow layers, we apply a codebook based replacement approach which is learnt by similarity and merging policy. Moreover, SpindleKV addressed the Grouped-Query Attention (GQA) dilemma faced by other attention based eviction methods. Experiments on two common benchmarks with three different LLMs shown that SpindleKV obtained better KV cache reduction effect compared to baseline methods, while preserving similar or even better model performance.
title SpindleKV: A Novel KV Cache Reduction Method Balancing Both Shallow and Deep Layers
topic Computation and Language
url https://arxiv.org/abs/2507.06517