Part III / Inference Engineering
Predict, then verify
Autoregressive decode pays one large-model step per token. Speculative decoding lets a cheaper process propose several tokens and asks the target to verify them together without changing the target distribution.
Propose a block more cheaply than target-only generation.
Score proposed positions in one target pass.
Accepted tokens must repay draft and verification overhead.
An assistant writes; an expert approves
An expert editor can approve a clean paragraph faster than writing every word, provided the junior drafter is fast and usually right. If the draft is poor, correction costs erase the benefit. Speculative decoding applies this asymmetry to token generation.
Speedup is not "small model speed." It is useful accepted target tokens per draft-plus-verification time, under the real batch and hardware regime.
The draft process proposes several future tokens. The target model evaluates those positions in parallel, which gives a more compute-rich shape than separate one-token passes. A rejection-sampling correction accepts a prefix and samples a correction when draft and target disagree. Foundational speculative-sampling papers show how to preserve the target model's output distribution rather than approximate it.[source][source]
A coding-shaped tool call
The reasoning engine often emits structured tool syntax such as a telemetry query with predictable keys. A drafter proposes eight tokens. The target accepts six before correcting one argument value. One verification pass advances the target stream by the accepted prefix plus correction.
Predictable local syntax produces high acceptance; surprising reasoning pivots or uncertain proper nouns may not. Acceptance therefore varies by domain, prompt, position, temperature, and model pair. A mean acceptance length hides variance and tail behavior.
The calculator is a labeled toy: target-only time for the expected accepted tokens is compared with draft-block plus verify time. Real implementations also pay cache management, acceptance logic, sampling, communication, padding, and batch effects. Verification time may grow with draft length. Use the toy to reason about direction, then benchmark the runtime.
Drafters occupy a design space
A small independent language model is conceptually simple, but it needs compatible vocabulary and enough alignment with the target. A self-speculative method may reuse early layers or selected target structure. Learned drafters can consume target hidden features and predict future tokens. EAGLE-3 is a learned autoregressive feature-level drafter used as a prominent comparison point.[source]
An autoregressive drafter proposes tokens one after another. It may achieve strong acceptance but still pay sequential draft latency. A block-parallel drafter proposes positions together, trading a harder modeling problem for lower draft critical path. DFlash uses a diffusion-style block drafter intended to generate a proposal block with parallel refinement.[source]
| Drafter | Critical-path shape | Potential strength | Potential cost |
|---|---|---|---|
| Small autoregressive LM | One draft token at a time | Simple and general | Sequential draft latency |
| Feature drafter / EAGLE family | Autoregressive learned heads | Target-aligned representations | Training and feature integration |
| Tree speculation | Several candidate branches | More chances to match target | Wasted verification work and complexity |
| Block diffusion / DFlash | Parallel block refinement | Shorter draft critical path | Specialized training and runtime |
Tree speculation and adaptive length
A tree proposes several possible continuations. The target verifies a larger structure and follows an accepted branch. Trees can increase the chance of matching likely alternatives, but branches consume compute and memory even when unused. Their value shrinks when a single-path drafter already achieves long accepted runs or when high concurrency makes target compute scarce.
Fixed draft length is another compromise. Easy syntax can support a long block; uncertain reasoning may reject early. Confidence-aware policies can adapt length using draft entropy, acceptance history, or learned predictors. The controller's objective should include wasted draft and verification work, not acceptance alone.
Concurrency changes the answer
At low concurrency, target decode may be memory-bound. Verifying several positions together raises arithmetic intensity and can reduce weight-read steps, creating headroom. At high concurrency, ordinary batching already reuses weights and may saturate compute. Speculative verification then adds work to a resource that is already limiting. A drafter that helps a low-latency service may be neutral or harmful for maximum-throughput batches.
The Modal/Cognition conversation emphasizes this workload dependence and discusses DFlash versus EAGLE-3, tree speculation, and adaptive draft length. Any acceptance lengths or speed comparisons in that conversation are speaker-reported production observations, not universal benchmarks.[source] Modal's technical article is likewise first-party and its performance results remain vendor-reported.[source]
Exact speculative sampling is designed to preserve the target distribution. Bugs, numerical differences, alternative acceptance rules, constrained decoding, or approximate variants can change behavior, so distributional equivalence still deserves testing.
A speculator is a learned systems component
Training a drafter to imitate target behavior resembles on-policy distillation: the small component learns the target distribution in contexts the deployed target encounters. Workload drift can reduce acceptance. Online or periodic retraining creates a data loop with target hidden states, draft labels, version compatibility, and safe rollout.
A learned drafter puts a training loop inside the inference system. The runtime now owns a model whose objective is system speed under exactness constraints.
References
- Leviathan et al. and Chen et al. are foundational exact speculative-decoding sources.
- EAGLE-3 and DFlash are primary sources for the named learned drafters.
- Modal's article and the Gong/Alberti conversation are first-party perspectives; reported performance remains attributed.