The useful part, up front

What you’ll take away

  • Target verification preserves a specified sampling distribution; it does not certify factual truth.
  • Acceptance uses min(1,p/q) for the proposed token in the cited exact method.
  • The rejected branch samples from the normalized positive residual, not interchangeably from unmodified p.
  • A first rejection invalidates the later draft path; keep a contiguous accepted prefix.
  • Measured speed depends on draft cost, verification cost and workload, beyond the acceptance percentage.
01

A draft proposes; a target keeps control of the sampling rule

A language model normally generates a continuation through repeated next-token decisions. Speculative decoding tries to make that process faster by asking a cheaper draft mechanism to propose several candidates, then using the target model to evaluate the proposed path. If enough candidates can be kept, one target evaluation round can advance the output by more than one token. The draft is useful because it supplies work to check ahead of time, not because it is trusted to replace the target's decisions. [1][2]

The interesting part is what happens when the draft proposes a token too often. Simply accepting every plausible suggestion would change the output probabilities. Simply throwing away a proposal and taking an ordinary fresh target sample is not always the right repair either. This article works through an invented three-token distribution to show why the replacement needs a carefully chosen rule. It concerns the exact sampling procedure in the cited research, not every system marketed as speculative decoding. The target still sets the desired distribution; an accepted token has passed a sampling calculation, not an independent factual review of what the resulting sentence means.

Three different claims need three different kinds of evidence. An exact sampling argument does not automatically establish the other two claims.
An exact sampling argument does not automatically establish the other two claims. · Ameer Journal — original explanatory diagramOriginal editorial illustration; no third-party artwork reused.
02

The same distribution does not mean a fact-checked answer

A probability distribution gives each possible next token a chance of being selected. Suppose a rule gives token A a 60 percent chance. Preserving that rule means preserving the chance, not promising that every individual run outputs A. Two legitimate draws can differ. In the research, the comparison is between the target's sampling distribution and the distribution produced by the speculative procedure. [1][2] It is not a claim that the target's most likely sentence is necessarily true.

This distinction also explains why a matching random-seed label is not the whole argument. Different implementations can consume randomness in different ways; the mathematical statement is about the resulting probabilities. To establish reproducible behavior for a particular program, its actual implementation needs separate checks. The target distribution must also include the sampling choices you intend to use, such as a temperature adjustment or restrictions on candidate tokens. The paper explicitly treats these choices as adjustments to the probabilities before its sampling method is applied. [1] A claim of unchanged sampling becomes unclear if the baseline and accelerated system quietly use different rules.

03

Start with three invented outcomes

For one fixed prefix, let the target probabilities be A: 0.60, B: 0.30 and C: 0.10. Let the draft probabilities be A: 0.50, B: 0.25 and C: 0.25. Each list sums to one. The letters are invented token labels, not words from a real model vocabulary. The draft gives C more probability than the target does, and gives A and B less. Accepting every draft sample would therefore produce the wrong distribution for this example.

Notice that this is more specific than calling the draft less intelligent. We have a precise mismatch that can be repaired mathematically. A draft sample of C is not a false statement; it is one of the allowed outcomes, proposed too frequently relative to the chosen target. Likewise, A is not guaranteed to be the correct answer because it has the largest target probability. The distinction keeps the worked example focused on sampling. The research names the target distribution p and the approximation distribution q [1]; we will use those labels while keeping the same three numbers throughout the probability calculation.

An invented draft puts too much probability on C. One fixed prefix, three invented token labels. Both distributions sum to one; these are not measured model outputs.
One fixed prefix, three invented token labels. Both distributions sum to one; these are not measured model outputs. · Ameer Journal — original explanatory diagramOriginal editorial illustration; no third-party artwork reused.
04

Accept a proposal according to its probability ratio

The cited rule accepts a draft token with probability min(1, p divided by q) for that token [1]. The min instruction means choose the smaller of one and the ratio. For A, 0.60 divided by 0.50 is 1.2, so acceptance is capped at 1: always accept an A proposal in this example. B also has ratio 1.2 and is always accepted. C has ratio 0.10 divided by 0.25, or 0.4, so a C proposal is accepted 40 percent of the time.

Those are acceptance chances after a particular token has been proposed. To find their contribution across all trials, multiply by the chance of proposing that token. A contributes 0.50 × 1 = 0.50; B contributes 0.25 × 1 = 0.25; C contributes 0.25 × 0.4 = 0.10. The accepted branch totals 0.85. The remaining 0.15 is the probability of rejecting a proposal. It is not another 15 percent to discard permanently; the procedure must still produce an output token on that branch. That is where the replacement distribution becomes important.

05

Send rejected probability mass to the missing outcomes

For the replacement, first subtract the draft probability from the target probability for each token, keeping only positive results. A has 0.10 left, B has 0.05 left and C has zero. The total is 0.15. Divide each value by that total to make a fresh distribution: A gets two-thirds, B gets one-third and C gets zero. This is the residual, or remaining-mass, distribution used when a proposal is rejected. [1]

The replacement is therefore different from simply sampling again from the original target list. Why? The accepted branch has already supplied the full target allowance for C: 0.10. Giving C more mass on the rejected branch would make it too frequent again. A and B are the outcomes that still need their missing contributions. The word replacement can sound like an arbitrary second chance, but here it has a precise job. It completes the probability budget left after the accepted proposals. These are analytical probabilities; no claim is made that a small finite set of experimental draws would contain these exact fractions.

06

Check the complete output, including the rejected branch

Add the two branches. A receives 0.50 from accepted proposals plus 0.15 × two-thirds from replacement, giving 0.60. B receives 0.25 plus 0.15 × one-third, giving 0.30. C receives 0.10 plus zero, giving 0.10. The final probabilities exactly match the invented target list. This is a numerical version of the paper's proof: accepted mass and correctly allocated replacement mass add to the desired distribution [1].

Now try the tempting shortcut of using the unchanged target distribution after rejection, while keeping the same acceptance rule. A would receive 0.50 + 0.15 × 0.60 = 0.59. B would receive 0.25 + 0.15 × 0.30 = 0.295. C would receive 0.10 + 0.15 × 0.10 = 0.115. Those values still sum to one, but they are the wrong distribution. A normalized result is not automatically the intended result. The shortcut specifically fails with this acceptance rule; it is not a claim that every other rejection-sampling algorithm must use the same correction formula.

Check accepted mass plus replacement mass. Original calculation. Rejection probability0.15 uses residual[2/3,1/3,0]; the final law matches the target.
Original calculation. Rejection probability0.15 uses residual[2/3,1/3,0]; the final law matches the target. · Ameer Journal — original explanatory diagramOriginal editorial illustration; no third-party artwork reused.
07

Stop at the first rejected candidate

A longer draft contains a sequence of guesses, with each later guess depending on the earlier ones. Suppose the draft proposes A, then B, then C after the current prefix. If the first proposal is accepted but the second is rejected, the third was prepared after a history that is no longer the accepted history. The algorithm cannot simply skip the rejected B and keep C because C looks plausible. It keeps the accepted prefix, supplies the appropriate replacement and continues from that corrected history. [1][3]

In the cited block algorithm, if all proposed candidates are accepted, an additional token can be drawn from the target's distribution after that accepted sequence. A round with two proposals can therefore produce up to three committed tokens, while a rejection earlier in the round produces fewer. [1] These are properties of that specified method, not a promise about every implementation's token count. The same boundary also applies to temporary cached work: information computed for an abandoned candidate suffix must not silently become the state of the corrected continuation. Useful speculative work still has to belong to the history the system actually keeps.

08

Greedy matching and random sampling need different reasoning

If a system always chooses its highest-probability next token, it is using greedy selection. In that special setting, matching the target's chosen token is a useful way to verify a draft path. Random sampling is different: several outcomes can legitimately be chosen. Two identical probability distributions can produce different individual draws. Rejecting a draft merely because an unrelated target draw picked another token can throw away useful work even when the distributions agree. Google explains this distinction in its retrospective [2].

The acceptance-and-replacement calculation handles probabilities directly. It should be applied to the effective sampling rules that the system actually intends to preserve [1]. Hugging Face's v4.49.0 documentation specifically distinguishes greedy assisted decoding from sampling with the paper's resampling method [4]. That is a versioned implementation statement, not a claim that all newer engines share its batching, tokenizer or feature limits. When reading an optimization announcement, ask which decoding path was checked. A greedy example does not by itself prove the correctness of a stochastic implementation, and an exact probability proof does not test an installed program.

A second invented comparison makes the distinction sharper. Suppose both draft and target use exactly [0.60, 0.30, 0.10]. The exact acceptance rule then accepts every proposal. But if you take two independent draws and require their letters to match, the chance of a match is only 0.60 squared plus 0.30 squared plus 0.10 squared, or 0.46. You would reject 54 percent of the pairs despite the distributions being identical. This calculation describes a different equal-distribution case, not the earlier biased draft.

Greedy matching and stochastic correction are different checks. Preserve the actual sampling policy. A versioned implementation example is not a universal feature-support statement.
Preserve the actual sampling policy. A versioned implementation example is not a universal feature-support statement. · Ameer Journal — original explanatory diagramOriginal editorial illustration; no third-party artwork reused.
09

More tokens per round is not the same as a guaranteed speedup

The draft takes time, and the target needs resources to check its candidates. Speculative work can also be discarded. The paper's speed analysis therefore includes both acceptance behavior and the cost of running the approximation, with explicit assumptions about parallel target evaluation [1]. Keeping more proposals is useful, but acceptance percentage alone is not a measured latency result. A slower or poorly matched draft can consume time without supplying enough useful candidates.

For a separate invented timing model, assume two proposals per round, independent acceptance probability one-half at each step, a 100-millisecond target verification round and two 20-millisecond draft steps. This timing example does not reuse the earlier 85-percent acceptance case. Expected committed tokens are 1 + 0.5 + 0.25 = 1.75 per round. The round costs 140 milliseconds, so the long-run budget is 140 divided by 1.75, or 80 milliseconds per token, compared with the assumed 100-millisecond baseline. That is a calculated 1.25-times rate under those assumptions. It is not a benchmark: real verification cost, scheduling, prompt length and short-generation boundaries can change the outcome.

Change only the assumed draft cost to 50 milliseconds per step. The two-step round now costs 200 milliseconds for the same expected 1.75 tokens, or about 114.3 milliseconds per token. In this separate calculation, the speculative arrangement is slower than the assumed 100-millisecond baseline. The acceptance rule remains mathematically valid. What changed is the cost of obtaining proposals, demonstrating why correct sampling and worthwhile acceleration must be checked separately.

10

Keep the probability proof and the deployment evidence separate

A useful review starts by naming the target model and its intended sampling rules. Then identify how candidates are proposed, how acceptance is calculated and how the first rejection is repaired. Keep the retained history and any cached work consistent with that repair. The cited paper provides the probability argument, while the implementation documents show why version and generation mode belong in the record. [1][3][4] A reassuring phrase such as target verified is too vague without those details.

The three-token example leaves a compact check: the accepted branch contributes [0.50, 0.25, 0.10], and the rejected branch must add [0.10, 0.05, 0]. Together they reproduce [0.60, 0.30, 0.10]. A real deployment also needs observed runtime results for its actual hardware and workload, plus ordinary evaluation of the target model's usefulness and errors. Exact sampling preserves the chosen target's behavior; it does not improve that target's factual judgment by definition. Speculation earns its place when the implementation preserves the intended rule and its measured execution benefit justifies the additional work.

Record correctness and runtime separately. Original handoff checklist. The numerical examples here are analytical, not hardware or trained-model tests.
Original handoff checklist. The numerical examples here are analytical, not hardware or trained-model tests. · Ameer Journal — original explanatory diagramOriginal editorial illustration; no third-party artwork reused.
Follow the evidence

Sources & further reading

Explore the references behind this guide. External pages may change after our review.

  1. Fast Inference from Transformers via Speculative Decoding
    Google Research authors / arXiv · Accessed 6 Nov 2026
  2. Looking back at speculative decoding
    Google Research · Accessed 6 Nov 2026
  3. Assisted Generation: a new direction toward low-latency text generation
    Hugging Face · Accessed 6 Nov 2026
  4. Text generation strategies · Hugging Face
    Hugging Face · Accessed 6 Nov 2026

Article updated 6 Nov 2026.

Found something we should revisit?

Good explanations get better with thoughtful feedback.

Suggest a correction