CARVE: Efficient Cache-Fused RAG with Task-Aware Recomputation and KV-Scaling
Yanting Chen, Shijie Yu, Leyi Yang, Honyi Li, Sen Liu, Jie Wu
Abstract
Retrieval-augmented generation (RAG) improves LLM generation quality by incorporating retrieved context into prompts. However, full-prompt prefill, which processes the complete RAG prompt, becomes increasingly expensive as the retrieved context grows, increasing time-to-first-token (TTFT). Existing systems reduce this cost by prefilling retrieved chunks independently and stitching their cached KV states at request time, but this omits cross-chunk interactions. Recent systems partially repair these interactions through token-level selective recomputation, recomputing a subset of token positions while reusing the remaining cached KV states. However, such position-wise selection may miss task-relevant cross-chunk interactions. It can also fragment coherent context, while reused content can distract generation. To address these limitations, we present CARVE, a KV-cache reuse system that performs task-aware cross-chunk repair at chunk-pair granularity. CARVE uses Entity-Linked Planner, which consists of an offline entity--chunk graph and an online query-conditioned planner, to identify and recompute task-relevant repair pairs, while Position-Aware KV Scaling is leveraged to scale reused VALUE vectors to reduce the distracting influence of reused content on generation. Chunk reordering and pipelined execution further reduce serving overhead. Across three datasets and five models, CARVE improves F1 over CacheBlend by 4.1 points on average at a comparable recomputation ratio and achieves an 8.71--62.31 TTFT speedup over full-prompt prefill.
Create a lesson
Related papers
Learned Handed Frames for Chirality-Aware Equivariant Molecular Diffusion
Shared title terminologycs.LGChengyi Zhang, Xuanxi Zhang, Weizhou Wang
The Cross-Entropy Gap: Scaling Laws for Sign Descent and Gradient Descent
Shared title terminologycs.LGAdélie Benhaim, Francis Bach, Frederik Kunstner
BlockDTW: Efficient, Parallel and Differentiable Time-Series Alignment for Neural Learning Systems
Shared title terminologycs.LGAlberto Zancanaro, Leonardo Badia, Giulia Cisotto
Invertibility aware Integration of Static and Time-series data: An application to Lake Temperature Modeling
Shared title terminologycs.LGKshitij Tayal, Xiaowei Jia, Rahul Ghosh et al.
Benchmarking Graph Self-Supervised Learning for Node-Level Tasks: Insights and a Strong Baseline
Shared title terminologycs.LGDmitry Eremeev, Gleb Bazhenov, Oleg Platonov et al.
ALPS: Annealed Local Penalties for Efficient Sobolev Regularization on Implicit Neural Representations
Shared title terminologycs.LGRichard F. M. Lim, Jeová Farias Sales Rocha Neto