Verify drafted tokens efficiently

Derive token verification, acceptance, residual sampling, and speedup limits while distinguishing exact distribution preservation from approximate acceptance rules.

10 published lessons1 module240 min of guided study
  1. 01
    Verify drafted tokens efficientlyresearch · 10 lessons

Follow the path or begin with a question. Every lesson is open.

Your notebook0 of 10 lessons completed

Your place, at your pace. Progress is optional and saved only in this browser when available.

Inside this module

Each lesson includes an interactive lab

Verify drafted tokens efficiently

Derive token verification, acceptance, residual sampling, and speedup limits while distinguishing exact distribution preservation from approximate acceptance rules.

  1. 01

    Verify candidate continuations under the target’s actual histories

    Separate autoregressive probability factorization from parallel scoring so drafted tokens accelerate a target decoder without becoming unverified output.

    24 min
  2. 02

    Accept each proposed token with its actual probability ratio

    Derive the retained proposal mass under min(1, p/q), handle zero support correctly, and distinguish exact acceptance from heuristic confidence thresholds.

    24 min
  3. 03

    Supply exactly the target mass missing from accepted proposals

    Normalize the positive part of p−q only on a positive-probability rejection branch, and verify the mixture identity including zero-rejection and missing-support cases.

    24 min
  4. 04

    Name the decoding law being preserved

    Distinguish deterministic argmax agreement from stochastic distribution preservation, including tie rules, processed probabilities, and why plausible fallback rules can be biased.

    24 min
  5. 05

    Choose lookahead by committed output per unit cost

    Compute accepted-prefix expectations under explicit assumptions and compare draft, verification, and coordination costs without equating target-call reduction with wall-time speedup.

    24 min
  6. 06

    Compare agreement gains with the full resident resource bill

    Choose a proposal mechanism using measured overlap, draft latency, cache footprint, and serving capacity rather than parameter count or acceptance alone.

    24 min
  7. 07

    Encode branch histories in masks and positions

    Flatten candidate trees without leaking sibling information, distinguish logical depth from storage order, and separate correct target scoring from a proved sampling algorithm.

    24 min
  8. 08

    Keep cache validity aligned with the committed token history

    Discard rejected candidate states while preserving accepted prefixes, explicit pending-token conventions, logical positions, and request isolation.

    24 min
  9. 09

    Schedule speculative work under shared latency and capacity budgets

    Connect variable verification work, temporary cache reservations, and request fairness to continuous batching without assuming isolated-request speedups survive loaded serving.

    24 min
  10. 10

    Validate the target law and the serving benefit separately

    Combine finite-distribution branch checks, statistical limits, cache-state tests, and matched-load latency evidence without treating samples as a proof of exactness.

    24 min
All engineering modules