CacheWeave: Learning to Recompute for Efficient Position-Independent KV Caching
Yueyang Pan, Qianchao Zhu, Yuliang Liu, Teng Ma, Sanidhya Kashyap
Abstract
Position-independent caching reuses chunk KV caches across positions and requests. Independent encoding, however, omits cross-chunk interactions and can degrade accuracy. 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.
Create a lesson
Related papers
GC-MoE: Overlapping Expert-Parallel Token Dispatch with FP8/FP4 Grouped GEMM via CUDA Green Contexts
Yong Li, Kan Liu, Tao Lan
When the Consumer Is an Agent: Execution-Grounded Service-Level Agreements
Michal Orzechowski, Renata G. Slota, Jacek Kitowski
PhotonZip: Lifecycle-Aware Compression for HDF5-Based Synchrotron Workflows
Haoxu Li, Wenjing Huang, Chengyu Liu et al.
EpiLoRA: Fusing Many LoRA Adapters into Low-Precision GEMMs for Serving and RL
Hieu Tran, Hong Yu
INSIGHT-HPC: An Interpretable System Intelligence for Global HPC Telemetry
Rupak Kadel, Jie Li, Yong Chen
DynSL: Resource-Adaptive Model Training across Heterogeneous Edge Devices
Boris Radovič, Istemi Ekin Akkus, Marco Canini et al.