Risk Aware KV Cache Admission for Batched Large Language Model Inference
Main Article Content
Abstract
The key value cache of an autoregressive language model grows with generated sequence length, making memory admission sensitive to uncertain output demand. This paper separates cache byte accounting from the probability model used to admit a fixed request prefix. A support clipped Cantelli rule combines a deterministic footprint limit with a moment based risk bound. Exact convolution supplies a reference for independent two point output lengths, while a shared tail mixture tests sensitivity to dependence without changing marginal length probabilities. Numerical analysis uses 1000 reproducible request cohorts. At a 512 MiB cache budget and a target overflow probability of 0.05, admission based on expected demand accepts 11.229 requests on average with mean model overflow risk 0.32171. Exact probabilistic admission accepts 9.095 with mean risk 0.02155; clipped Cantelli accepts 6.717 with mean risk 0.000020, compared with 6.201 for deterministic worst case admission. The bound is conservative, and its guarantee requires the variance of the relevant joint demand distribution. The analysis identifies how marginally unchanged output lengths can alter batch risk and provides a reproducible capacity reference. The analysis evaluates reserved KV cache capacity.