vllm.v1.worker.gpu.spec_decode.acceptance_estimator
¶
Classes:
-
OnlineAcceptanceEstimator–Predicts per-position acceptance, and calibrates itself while serving.
OnlineAcceptanceEstimator
¶
Predicts per-position acceptance, and calibrates itself while serving.
Lifecycle per step, driven by DraftModelSpeculator:
stepfolds the previous step's drafts, now graded by the target, into the IRLS accumulators, and periodically solves for new coefficients, independently but identically on every rank.predictruns inside the captured draft graph, turning this step's draft logits into acceptance probabilities for adaptive verification.
Trimming starts immediately: survival is a running product of sigmoids, so it decreases with draft position whatever the coefficients are, and an unfitted estimator degrades to uniform-depth truncation rather than to anything harmful.
Methods:
-
warmup–Drop warmup statistics and compile the refit kernel. A refit on
warmup()
¶
Drop warmup statistics and compile the refit kernel. A refit on zeroed statistics leaves the coefficients unchanged.
_max_and_excl_sumexp(logits)
¶
Block max, and its sumexp with one copy of that max left out.
The excluding sum is what keeps the feature accurate. Forming the full sum and subtracting the max's own e^(m-m) = 1 term afterwards is catastrophic cancellation: the complement mass is the whole quantity of interest, and it is gone as soon as it falls below an fp32 ulp of 1.0 (~6e-8), which a confident drafter reaches routinely.