cd /news/large-language-models/selkv-selective-kv-cache-merging-wit… · home topics large-language-models article
[ARTICLE · art-66386] src=arxiv.org ↗ pub= topic=large-language-models verified=true sentiment=↑ positive

SelKV: Selective KV Cache Merging with Per-Token Merge-or-Drop and Attention Compensation

Researchers propose SelKV, a training-free framework for compressing the key-value (KV) cache in large language models (LLMs) that uses a soft cosine gate to selectively merge or discard tokens and an attention-ratio compensation mechanism to correct softmax imbalance. Evaluated on LongBench while retaining only 25% of the KV cache, SelKV achieves strong compressed performance against baselines, maintains near-lossless quality on grouped-query attention (GQA) models, outperforms the full-cache baseline on complex multi-document QA tasks, and delivers a 3.3x decoding speedup at 100k tokens.

read1 min views2 publishedJul 21, 2026

arXiv:2607.16213v1 Announce Type: new Abstract: Large Language Models (LLMs) generate text autoregressively, relying on a key-value (KV) cache whose memory footprint grows linearly with context length, creating a major bottleneck. Recent compression methods mitigate this cost via token merging; however, these approaches often rely on indiscriminate aggregation, which degrades representations and introduces attention sag, a mismatch where merged tokens receive the same softmax mass as individual tokens despite encoding multiple inputs. We propose a training-free, dual-component framework for KV cache compression that addresses these limitations. First, a soft cosine gate adaptively modulates merging decisions based on value-vector similarity, suppressing or discarding dissimilar tokens to preserve semantic fidelity. Second, we introduce an attention-ratio compensation mechanism that applies a decoding-time logit bias derived from prefill attention statistics, correcting the softmax imbalance induced by merging. Evaluated on LongBench (16 English datasets) while retaining only 25% of the KV cache, our framework achieves strong compressed performance against representative one-shot baselines. It is especially robust on the evaluated grouped-query attention (GQA) models, maintaining nearlossless generation quality. Furthermore, the method outperforms the full-cache baseline on complex multi-document QA tasks and delivers a 3.3x decoding speedup at 100k tokens.

── more in #large-language-models 4 stories · sorted by recency
── more on @selkv 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/selkv-selective-kv-c…] indexed:0 read:1min 2026-07-21 ·