TECHNOLOGY

Account for speculative KV lookahead slots before accepting concurrency

In this article
THE QUICK TAKE

Budget method-specific speculative lookahead blocks separately from committed response tokens, draft weights and reusable verified prefix state.

A speculative serving run accepts short answers but runs out of available KV slots at higher concurrency. Its memory estimate counted only committed response tokens. Some proposers require speculative lookahead storage before those positions are accepted. Read the selected method’s slot-allocation path instead of deriving simultaneous serving capacity from final output length alone.

Identify the cache-owning method

Record the proposer, effective speculative configuration and engine version. The current KV cache manager documents num_lookahead_tokens for proposers that use KV cache, including EAGLE-style execution. Not every speculation method owns the same state. A method without an additional model and a model-based proposer should not inherit one identical memory formula simply because both perform speculation.

Separate allocated and committed positions

The documented allocation path distinguishes new tokens, computed cache hits, external cache state and lookahead positions. Slots can therefore be required for candidates that will later be rejected. The final accepted response is a logical output, while reserved slots support an intermediate computation. A low acceptance result does not imply that the corresponding proposal storage was never needed.

Preserve block and layer structure

KV storage is allocated through cache groups and blocks rather than one independently allocatable byte range per response token. Record the actual block sizes and model cache structure. Boundary rounding and concurrent lifetimes can make a small change in lookahead require another block. Do not infer precise physical bytes from a speculative-token setting without the applicable cache configuration and method’s allocation rules.

Keep reusable cache identity distinct

The current manager explicitly limits which verified positions become cached reusable state. Having allocated storage for unverified candidates does not make their contents a valid prefix for another request. Preserve rollback and ownership boundaries when reading memory records. A cache-capacity explanation must not silently turn tentative positions into committed model context or release storage while an in-flight step still relies on it.

Test the real capacity boundary

In a bounded equivalent, compare a justified lookahead configuration across representative concurrent lifetimes, retaining accepted output, allocated blocks and preemption or admission evidence. Keep draft weights and temporary computation visible as separate owners. Acceptance explains why the selected method needs more state than committed text suggests. It does not establish a universal per-token byte cost or guarantee that maximizing proposal depth maximizes completed serving work.

Primary references

vLLM KV Cache Slot Allocation.

vLLM Speculative Configuration.

vLLM Speculative Decoding.

Related reading: Validate a draft and target model pair for vLLM speculative decoding; Stream-ordered GPU allocation: the lifetime follows execution.

Earn rental income from GPUs

Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.

Explore GPU hosting
← All articles