Skip to content

Exact Memory-Time Optimization for Prefix-Cached Language Model Serving

Oct 2026 · 0 citations · 16 references
Computer Science

TL;DR

This work introduces Prefix-Certificate Retention (PCR), an exact finite-trace formulation for static, grouped, reset-on-access timeouts, and derives a linear-time-in-grid-size dynamic program for ordered timeouts and bounds that certify the cost of this restriction.

Abstract

Retaining language-model prefix states trades recomputation against storage time. Optimizing each cached block independently can overcount savings: a resident block is usable only when the required preceding prefix is also available. We introduce Prefix-Certificate Retention (PCR), an exact finite-trace formulation for static, grouped, reset-on-access timeouts. Usable-prefix rewards become nodes whose prerequisites are timeout thresholds and preceding hit certificates. The resulting maximum-weight closure reduces to one minimum cut, with graph size linear in the number of block lookups and timeout choices. A breakpoint theorem extends the construction to all nonnegative timeouts without discretization error. We also derive a linear-time-in-grid-size dynamic program for ordered timeouts and bounds that certify the cost of this restriction. Exhaustive small-instance checks and chronological replay of 39,632 public Mooncake requests validate the formulation. On the fixed grid, ordered timeouts attain the unrestricted training optimum in 118 of 120 trace-grouping-price cases. Heterogeneous retention improves several held-out memory-time tradeoffs, but finer training optimization does not uniformly improve transfer. The contribution is a tractable optimization model and an auditable benchmark for retention policies; the experiments measure usable prefix blocks and storage time, not GPU latency.

View source

Similar papers

#natural language process... Preprint Oct 2026

SparPR: Runtime KV-Cache Recovery for Resource-Constrained LLM Inference on Consumer Hardware

Sparse Partial Recomputation is presented, a runtime KV-cache recovery mechanism that does not modify model weights and requires no offline training and switches between sparse recomputation and full recovery according to a runtime cost comparison.

Jie Deng, Ke-Ming Hu, Yang-He Liu et al. · 0 citations

Dynamic Flow, Static Graph: KV Cache Reuse for Efficient LLM Serving on Mobile NPUs

This work proposes an intra-graph mechanism that maps selective KV recomputation onto static NPU graphs, reconciling algorithmic dynamicity with NPU staticity, and develops an inter-graph scheduler to optimize chunk merging and minimize padding with dynamic programming.

Zheng-Xiang Huang, Sheng Chen, Chao-Yue Niu et al. · 2 citations
Open access Oct 2026

Prompt-Shape- and Prefix-Cache-Aware CPU/NPU Routing for Large Language Model Inference on Edge SoCs

Large language model (LLM) inference on edge systems must exploit heterogeneous central processing unit (CPU) and neural processing unit (NPU) resources under tight memory and latency constraints. Because prefilling and autoregressive decoding have different computational characteristics, the fastest backend depends on...

Qiu-Chang Han, Yi-Tian Mao, Qin-Yu Guo et al. · 0 citations
#artificial intelligence Preprint Oct 2026

Request Order Matters: Cache-History Sensitivity in Selective KV-Cache Reuse for Rolling Agents

Long-running agents repeatedly call an LLM while retaining most of their document window, evicting old documents, and appending new ones. These rolling updates break exact prefix caching and motivate non-prefix KV-cache reuse with selective recomputation. We show that persistent KV-cache reuse with selective recomputat...

Tiffany Gu, An-Nie Guan, Man-Shu Huang et al. · 0 citations
#artificial intelligence Preprint Oct 2026

WAKMan: Workload Aware KVCache Manager

Prefix caching enables a Large Language Model (LLM) servers to reuse the Key-Value (KV) states and accelerate prefill computation stage for requests that share a prefix with earlier prompts, thus reducing latency and serving cost. With limited memory resource, the KV cache eviction policy becomes a decisive factor in d...

Suhas Kumar Morisetty, Vaibhavi Lokegaonkar, S. Varghese et al. · 1 citation
#artificial intelligence Preprint Oct 2026

Budgeted KV-Cache Repair for Evolving Contexts

This work introduces budgeted KV-cache repair: recovering task performance by recomputing a user-chosen fraction of the retained suffix, and finds that refreshing coherent regions can substantially outperform refreshing isolated tokens.

Han Yu, Wen-Hui Zhu, Jincheng Cao et al. · 0 citations

Related blog posts

MIT News · Artificial Intelligence Nov 17, 2026

Learning the language of machine learning

By studying the computational foundations of language learning, Associate Professor Jacob Andreas builds intelligent systems that can communicate effectively with humans.

Microsoft Research Blog Nov 16, 2026

TokenEconomizer: Learning from Experience to Make AI Coding Agents More Efficient

AI coding agents are increasingly help developers fix bugs and build features largely on their own, but every interaction with their models consumes tokens. In each session, an agent sends instructions, tool descriptions, and session history to its model. Most efforts to reduce this cost focus on individual tasks. Yet developers return to the same […] The post TokenEconomizer: Learning from Experience to Make AI Coding Agents More Efficient appeared first on Microsoft Research.

MIT News · Artificial Intelligence Oct 23, 2026

Q&A: How AI came to model the “messy” human mind

Assistant Professor Benjamin Lindquist studies how engineers deliberately injected randomness into early AI, giving rise to deep-learning models that sometimes hallucinate.

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.