KV-Repurpose: A Testbed for Evaluating Non-Prefix KV-Cache Reuse
Organizations: Kioxia Corporation, Japan
Abstract
KV-cache reuse in large language model serving is commonly limited to exact prompt prefixes, preventing reuse when the same retrieved document appears after different system prompts, conversation histories, or dynamic metadata. We present KV-Repurpose, an open-source, vLLM-based system for developing and evaluating segment-wise KV-cache reuse beyond exact prefixes. The system combines cache-aware segment scheduling, prompt construction, capacity management, workload generation, and runtime monitoring. Experiments on long-context benchmarks show that naive segment reuse largely preserves output quality for single-document question answering and summarization, while exposing clear limitations in cross-document reasoning. Under a Zipfian RAG-style workload in which 20% of requests share a fixed prefix, KV-Repurpose achieves a substantially higher token-level cache hit rate than prefix caching at the same 30 GB cache capacity, 63.9% versus 3.3%, resulting in lower TTFT. Even with 1 TB of cache capacity, prefix caching reaches only a 17.9% hit rate in this workload. Source code is available under the Apache-2.0 license at https://github.com/taiga333/eval-kv-repurpose.
Figures & tables
| Task (Metrics) | QA (Token-level F1 score) | Summary (ROUGE-L) | |||||
|---|---|---|---|---|---|---|---|
| # Document | Single | Multi | Single | Multi | |||
| Dataset | QASPER | HQA | 2WMQA | MuSiQue | QMSum | GovRepo | M-News |
| w/o context | 0.04 | 0.11 | 0.12 | 0.11 | 0.07 | 0.03 | 0.04 |
| Recompute | 0.42 | 0.71 | 0.80 | 0.61 | 0.20 | 0.26 | 0.22 |
| Repurp | 0.42 | 0.60 | 0.50 | 0.40 | 0.19 | 0.26 | 0.17 |
| Repurp (Opus 3) | 0.42 | 0.59 | 0.50 | 0.41 | 0.19 | 0.21 | 0.17 |
| Dataset | LongBench Pro (Ave.) |
|---|---|
| w/o context | 0.11 |
| Recompute | 0.45 |
| Repurp | 0.43 |
| Repurp (Opus 3) | 0.45 |
| Repurp (Haiku 3.5) | 0.44 |
Appendix figures & tables3 assets
Supplementary material from the paper’s appendix.
Appendix
| Dataset | QA1 | QA2 | QA3 |
|---|---|---|---|
| Recompute | 0.71 | 0.78 | 0.60 |
| Repurp | 0.67 | 0.57 | 0.47 |
| Repurp (Opus 3) | 0.68 | 0.59 | 0.47 |
| Repurp (Haiku 3.5) | 0.68 | 0.56 | 0.49 |
KV-Cache Reuse
Key-value (KV) cache reuse lets language models reuse previously computed attention states to cut repeated prefill work and serving latency.
See all 73 papers