Speculative decoding tutorial: small model drafts, big model verifies, same distribution, faster
math_rachel · x · 2026-12-01
Another tutorial in Rachel Thomas's NeurIPS 2026 Education Track series: speculative decoding.
- In autoregressive models each token depends on all previous ones, blocking parallelization; speculative decoding uses a much smaller model to draft multiple tokens, which the original model then verifies in batch — same output distribution, concrete walltime speedup
- Introduced in late 2022/early 2023, it spawned variants like Medusa and EAGLE, and is deployed in production systems including TensorRT-LLM, Google Search AI summaries, and DeepSeek-v4
- The tutorial offers an interactive visualization, empirical correctness checks on a toy dataset, and a Monte Carlo simulation of the speedup
- Companion resources are open-sourced at AnswerDotAI/speculative-decoding on GitHub
A companion Flow Matching guide derives the technique from scratch with a drawing analogy and high-school math (diffusion in Stable Diffusion/DALL-E is a special case), with models training live in the browser in under a minute.
Related event: fast.ai's Four Interactive Tutorials Accepted to NeurIPS 2026(2 posts)→
More from Research
- METR: Fable 5 autonomous beats experts using Fable 5 at half the cost — Eliv_nurotic · 2026-12-01
- New paper explains why simple-to-complex curricula work: they drive 'unlearning' in humans and nets — SaxeLab · 2026-12-01
- Robotics leaderboards still rank on toy pick-and-place tasks nearly solved by Astra and Fable — paigeinsf · 2026-12-01
- NeurIPS 2026 Education Track Lineup Announced, Rachel Thomas Keynotes — math_rachel · 2026-12-01
- Interactive in-browser tutorial trains flow matching models live in under a minute — math_rachel · 2026-12-01
- Interactive guide: how diffusion LLMs escape next-token-only generation — math_rachel · 2026-12-01