CacheWeave: Learning to Recompute for Efficient Position-Independent KV Caching

Yueyang Pan, Qianchao Zhu, Yuliang Liu, Teng Ma, Sanidhya Kashyap
11/1/2026
cs.DCcs.LG

No confident code implementation found for this paper.

Abstract

Position-independent caching reuses chunk KV caches across positions and requests. Independent encoding, however, omits cross-chunk interactions and can degrade accuracy.

Show full abstract

In our study, neither PIC training nor rule-based recomputation, alone or combined, consistently recovers full-prefill accuracy. Oracle-guided recomputation on PIC-trained models improves accuracy at the same budget, motivating better selection. We present CacheWeave, which adapts the full backbone to PIC, then freezes it and trains a model-native block selector on the adapted model's oracles. The selector uses compact cached chunk features and question hidden states without extracting backbone attention scores. It selects contiguous token blocks aligned with KV blocks to support efficient recomputation and limit copy-on-write amplification. Its runtime, CacheWeave-Serve, supports private and shared KV caches, keeps selection and recomputation on the GPU, and stages sliding-window KV for hybrid attention models. Across three models and four tasks, CacheWeave outperforms CacheBlend and ProphetKV by 7.2 and 3.5 percentage points on average at a 5% recomputation budget, with a mean relative accuracy loss of 1.6% to full prefill. With 32-token blocks, CacheWeave-Serve cuts single-request TTFT by up to 16.1x over full prefill and 1.7x over ProphetKV, and raises SLO goodput under load by up to 7.8x.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{pan2026cacheweave,
  title  = {CacheWeave: Learning to Recompute for Efficient Position-Independent KV Caching},
  author = {Yueyang Pan and Qianchao Zhu and Yuliang Liu and Teng Ma and Sanidhya Kashyap},
  year   = {2026},
  eprint = {2611.01735},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2611.01735v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2611.01735.svg)](https://codeofpaper.com/paper/2611.01735)

Discussion