KV-Repurpose: A Testbed for Evaluating Non-Prefix KV-Cache Reuse
cs.CL
Submitted: 2026-10-09
Updated: 2026-10-09
Code: https://github.com/taiga333/eval-kv-repurpose
License: http://creativecommons.org/licenses/by/4.0/
The gist: 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
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.
Sources
- LongBench Pro: A More Realistic and Comprehensive Bilingual Long-Context Evaluation Benchmark
- Retrieval-Augmented Generation for Large Language Models: A Survey
- Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks
- RedKnot: Efficient Long-Context LLM Serving with Head-Aware KV Reuse and SegPagedAttention
- LMCache: An Efficient KV Cache Layer for Enterprise-Scale LLM Inference
- gpt-oss-120b & gpt-oss-20b Model Card
- MiniPIC: Flexible Position-Independent Caching in <100LOC
- MEPIC: Memory Efficient Position Independent Caching for LLM Serving
- Revolutionizing Long-Term Memory in AI: New Horizons with High-Capacity and High-Speed Storage
Related papers
- Exploring Solution Divergence and Its Effect on Large Language Model Problem Solving
- Ishigaki-IDS-Bench: A Benchmark for Generating Information Delivery Specification from BIM Information Requirements
- Subliminal Steering: Stronger Encoding of Hidden Signals
- MedStruct-S: A Benchmark for Key Discovery, Key-Conditioned QA and Semi-Structured Extraction from OCR Clinical Reports
- The End of Transformers? On Challenging Attention and the Rise of Sub-Quadratic Architectures
- Untangling the Mechanisms of Misleading Context in Medical Question Answering