Speculative Decoding Architecture Explained: Embedded vs. External Draft Models
This article breaks down the architecture of speculative decoding and why it is the primary approach to accelerating autoregressive LLM inference. It compares two main design routes—embedded draft modules trained alongside the target model and external lightweight draft networks that extract multi-layer features—and explains the trade-off between draft modeling capability and per-step cost. You will also find the key design dimensions, evaluation metrics, and engineering considerations needed to apply speculative decoding losslessly in production.
1. Background: Why Autoregressive Decoding Is a Throughput Bottleneck
During generation, large language models are fundamentally autoregressive at the token level: every new token requires re-running the forward pass over the entire history. This creates a structural problem—an extremely low compute-to-memory-access ratio. In online scenarios with small batches and short sequences, almost all decoding time is spent moving weights and the KV Cache, while arithmetic units sit largely idle. So the key to acceleration is not “computing faster,” but “producing more tokens per forward pass.”
Speculative decoding follows exactly this idea: a cheap draft source guesses several tokens in a row, and the target model verifies them in parallel with a single forward pass. Because verification is parallel, its cost is roughly that of one regular decoding step, and the accepted tokens are essentially free. Importantly, with a suitable acceptance criterion, the output distribution stays identical to that of the target model, making this a lossless acceleration technique. That is the fundamental value that sets it apart from lossy methods such as quantization and pruning.
2. The General Paradigm and Three Key Design Dimensions
At an abstract level, any speculative decoding scheme is defined by three things:
- Draft source: who generates the candidate tokens, and at what cost;
- Feature interface: what information the draft side takes from the target model (last-layer hidden states, multi-layer semantic features, or only the input embedding);
- Verification and acceptance: how many positions are verified at once, how acceptance is decided, and how to roll back and correct after a rejection.
What really determines the payoff in engineering is the product of accepted length per round and draft cost ratio. No matter how accurate the draft is, if a single step is so expensive that it can only guess one token, the gain is eaten by serial overhead. No matter how cheap the draft is, if the acceptance rate is too low, it degrades into pure waste.
3. Embedded Draft Modules: Capability and Cost from the Same Source
The first route makes the draft capability a built-in auxiliary module of the target model, trained together with the main model. The typical flow is: the main model runs its forward pass to obtain the last-layer hidden state, the auxiliary module autoregressively generates draft tokens from it, and the main model then verifies everything at once while producing new tokens.
The advantage of this design is strong modeling capability—the draft module shares the training objective with the main model, semantic alignment is high, and the acceptance rate is usually substantial. But the cost is equally clear: the auxiliary module often retains a fairly complete network structure (for example, reusing the block structure of the backbone), and a single step can cost on the order of one percent of a main-model step. This cost constraint in turn limits its form: it can only be extremely shallow and narrow, and in production it can usually guess only one token per round, because running multiple steps serially immediately exceeds the latency of one main-model forward pass.
Pseudo-illustration:
# Embedded: draft and verification are tightly coupled, draft steps limited by per-step costh = main_model.forward_layers(ctx, upto=last_layer) # main model forward passdraft = mtp_module(h) # auxiliary module generates 1 draftlogits = main_model.verify(ctx, draft) # verify in one pass + produce new token
4. External Lightweight Drafting: Trading “Depth” for “Breadth”
The second route moves the draft model entirely outside the main model: after the main model weights are fixed, a separate draft network with very few parameters is trained. Its key difference lies in the feature interface—instead of looking only at the last layer, it extracts semantic features from several different depths of the main model, concatenates them, and feeds them into a single-layer structure, while preserving the separate representation spaces of the input embedding and the hidden states.
This leads to an interesting quantitative comparison: an embedded step costs about 1%–2% of a main-model step, so it can only run serially for one step; an external single-layer draft can drop to around 0.1%, meaning seven serial steps still have lower total latency than one embedded step. In other words, the external approach trades a “shallower single step” for “more steps,” can produce multiple candidates per round, and significantly raises the expected accepted length.
# External: multi-depth feature concatenation + extremely light single-layer draft, allows multiple serial stepsfeats = [main_model.hidden_at(i) for i in (5, 11, 17, 23, 29)] # multi-layer semanticsz = fuse(concat(feats), embed(tokens)) # preserve dual feature spacesfor _ in range(7): # cheap draft allows many stepsdraft.append(light_layer(z))logits = main_model.verify(ctx, draft) # parallel verification
5. Likely Design Directions of Emerging Approaches
From the comparison above, we can reasonably infer the design directions of such new approaches. First, they weaken the explicit autoregressive dependency on the draft side and shift toward parallel prediction of multiple positions, so that draft cost is approximately decoupled from the number of steps. Second, they strengthen feature reuse, letting the draft side inherit as much of the main model’s existing intermediate representations as possible to reduce redundant computation. Third, they introduce finer-grained acceptance and rollback strategies at the verification stage, reducing the waste of “one wrong guess invalidates everything.”
When evaluating such approaches, it is worth focusing on four verifiable metrics: average accepted length, draft cost as a share of per-round time, gain decay under different batch sizes, and stability in long-context scenarios. In particular, note that looking at the speedup alone under small batches tends to overestimate the gain; real online serving must be stress-tested at the target concurrency.
6. Engineering Implementation Notes
- Batch coupling: draft length and dynamic batching strategy affect each other and need joint tuning, to avoid raising tail latency in pursuit of accepted length.
- Memory and cache: multi-depth feature extraction increases the residency of intermediate tensors, so cache management overhead must be evaluated.
- Losslessness verification: before going live, compare output distributions on a fixed sample set with the feature enabled and disabled to confirm the acceleration does not change semantics.
- Observability: bring accepted length and draft hit rate into logging services and monitoring alerts to form a sustainable tuning loop.
- Elastic capacity: inference services are usually deployed on container platforms and can combine with auto-scaling to handle concurrency fluctuations.
7. Conclusion
The main thread of speculative decoding’s evolution is finding a better trade-off between “draft modeling capability” and “draft inference cost.” Embedded modules win on alignment but lose on overhead; external lightweight drafts win on being cheap and multi-step but depend on multi-depth feature engineering; and the new generation of approaches tries to push this boundary further through parallel drafting and smarter verification. For developers, model selection should not rely on the speedup reported in papers alone, but should be measured under your own concurrency, context length, and latency constraints, treating accepted length as a first-class optimization target.
