synodic-ai™ ML SYSTEMS
ML Systems Desk · Inference Systems

The KV cache sets the terms: speculation budgets, sparse-attention offload and shared-block integrity

Three serving papers posted to arXiv on 2026-11-17 treat the KV cache as the resource everything else trades against. A hardware-aware search shows that speculative decoding's payoff turns on the KV capacity a drafter displaces, a sparse-attention system frees GPU memory by moving even its selection index off the GPU, and a fault-injection study measures how a single flipped bit in a shared prefix block turns correct answers wrong without any visible sign.

When speculation pays depends on the memory it costs

SpecSearch starts from a measurement on an RTX 5090. With 256-token outputs, speculative decoding with a state-of-the-art block-diffusion drafter delivered 3.50 times the throughput of autoregressive decoding at two concurrent requests, 1.21 times at 32 and 0.76 times at 64, because verification becomes compute-bound as concurrency grows; with 2,048-token outputs it stayed ahead beyond 128. The drafter's weights and buffers also cost KV capacity: under a 15.7 GiB budget, speculative decoding retained 0.73 times the KV-cache capacity of autoregressive decoding at equal KV precision on the RTX 5090, and 0.68 times on an MI300X under a 16 GB budget. An fp8 KV cache helps long outputs, raising speculative-decoding throughput at 4,096-token outputs and 48 concurrent requests from 6,813 to 8,479 tokens per second with nearly identical acceptance lengths, but changes short-output throughput by at most 4%.

The system combines an analytical cost model with calibration runs. The memory model predicted total footprint within 0.1% on the MI300X and 0.2% on the RTX 5090 and maximum concurrency within 0.5% and 0.6%, and it correctly predicted which configurations fit the memory budget in every evaluated case on those two GPUs. A roofline term gives a critical batch size beyond which compute contention erodes speculation's benefit; it depends mainly on the device's compute-to-bandwidth ratio and the target's weight precision, since model size cancels. Calibration then picks, per workload, whether to speculate, the KV precision and a draft length that can change with the effective batch, for example 15, 7 and 3 tokens for batches of 1 to 20, 21 to 48 and 49 to 128 with fp8 KV and 2,048-token outputs.

Averaged across workloads, the selected policies delivered 1.68, 2.16, 2.33 and 1.85 times the throughput of the best autoregressive configuration on the MI300X, RTX 5090, H100 and L40, and 1.21 to 1.51 times that of the fastest speculative-decoding configuration run in vLLM, 1.36 times on average. A small fine-tuned language model trained on calibration data from the other GPUs chose policies for a held-out GPU without calibrating on it, reaching 2.02 times autoregressive and 1.30 times vLLM speculative-decoding throughput and retaining 97.36% of the full-calibration result; it landed within 5% of the best configuration on 38 of 48 workloads, with its largest misses on the H100 at 32 concurrent requests. The evaluation covers a single target model and a single drafter.

Offloading the selection index, not just the KV history

Sparse-attention models select a subset of past tokens at each decoding step using a compact indexer key (K-index) cache, but serving systems still keep the full KV history, so GPU high-bandwidth memory (HBM) caps concurrency. Existing systems offload that history to host memory over PCIe and keep the K-index cache and hot KV buffers on the GPU. XM-Sparse targets scale-up memory pools, which offer more bandwidth than PCIe-attached CXL and more capacity than NVLink-C2C, and its authors find that even with such a pool, throughput stays bounded by HBM because hot buffers and the fully resident K-index cache occupy so much of it. Their design offloads both caches. Missing KV entries are fetched with TMA inside a fused retrieval-attention kernel that schedules resident tiles first and overlaps attention on one tile with retrieval of the next. K-index pages are prefetched by GPU-initiated DMA, with descriptors generated on the GPU by a single streaming multiprocessor, doorbell updates batched on the CPU and data moved by copy engines, which pause at semaphore checkpoints so that KV retrieval and model collectives take priority.

Built on SGLang and tested on two sparse-attention mixture-of-experts models with FP8 weights, using eight B300 GPUs of which four decode and four act as memory nodes of an emulated pool, XM-Sparse delivered up to 4.98 and 4.52 times the decode throughput of two PCIe-based offloading systems, ECHO and HiSparse, and 1.06 to 1.34 times a naive integration of HiSparse with the same pool, across 16K to 1M-token contexts. The authors attribute the gains over PCIe mainly to the pool's bandwidth, and the gain over the naive integration mainly to K-index offloading, which at 128K context on one model let the batch grow from 109 to 209 requests per GPU and throughput rise from 1,437.9 to 1,849.3 tokens per second per GPU. The I/O path matters: GPU-initiated DMA reached 1,849.3 tokens per second per GPU against 33.5 for CPU-submitted DMA and 1,128.7 for SM-based copies, and moved 624.0 GB/s for 16 KiB transfers against 22.4 GB/s for CPU-submitted DMA. As the KV miss rate rose from 0 to 40%, mean time between tokens grew 17.9% for XM-Sparse but more than tripled for HiSparse. Capacities beyond the pool's 1 TB of physical memory were emulated by remapping it, and throughput runs used a fixed 15% miss rate with round-robin expert routing.

One flipped bit in a shared prefix block

With prefix caching in vLLM, the KV blocks of a shared prefix such as a system prompt are computed once, held as a single physical copy and read by every request that carries the prefix, and nothing checks their integrity. The third paper's threat model is a co-located tenant on a GDDR6 GPU without hardware partitioning or ECC, conditions it says hold for the RTX A6000 and A4000 as some cloud providers offer them, flipping one bit of such a block. The authors' earlier conference paper showed that such flips change many later responses without making them degenerate; this one measures how often the changed responses are wrong, using software fault injection into the value cache of an 8B open model served by vLLM, at the most significant mantissa bit (bit 6) and the sign bit (bit 15) of a BF16 value, across 188,340 flip and item draws on 30 flipped elements.

The harmful share of changes depended on the task by more than an order of magnitude: at bit 6, 0.023 on MBPP+ code generation, 0.060 on MMLU-Pro and 0.59 on held-out TriviaQA, with the sign bit the same within the intervals. On a refusal-under-policy task, 11 of the 30 flips at bit 6 let the model add a medical claim after the required refusal. Harm fell almost entirely on fragile items, those whose sampled answers are sometimes wrong, and sampling 16 answers per item finds them without any injection; on TriviaQA they were 0.11 of the items but carried all of the harm. Changes, by contrast, fell on items whose top two candidate tokens were nearly tied, and an ordinary change in batch composition changed a similar share of code-generation and policy items without making any of them wrong. Harmed responses mostly kept the required format, so they look like ordinary errors.

That is the case for checking blocks rather than outputs. The countermeasure from the conference version checksums each prefix block when it is cached and verifies it before each use; it detected all 120 injected flips without false positives at negligible throughput cost and limits a corrupted block's reach to roughly one batch. The authors reassess the severity at CVSS 5.3, up from 1.8, reflecting a local rather than physical attack vector and the denial of service that a flip at a chosen bit can cause for every request sharing the prefix. They reported the issue with a proposed patch to the vLLM maintainers through a GitHub Security Advisory on 2026-04-08, and the maintainers declined it as implausible in current deployments. The limits are stated: one model, one prefix, ideal bit targeting emulated in software, no demonstration of placing a physical flip in a long-lived prefix block, and with ECC enabled most flips become detectable errors.

What the three say about running inference

Each paper treats a decision usually left to defaults as a measurable trade. Whether to load a drafter is a trade of KV capacity against acceptance, and its answer flips with concurrency and output length on the same GPU. How much state to keep in HBM is a trade of capacity against fabric bandwidth, and the selection index turns out to be worth moving too. And sharing one copy of a hot prefix across every request is an efficiency that turns a single memory fault into a fault in every request that reads it, which output monitoring is poorly placed to catch.

Sources