Speculative Decoding

Adrian Tam · Nov 24, 2026

Overview This post is divided into six parts; they are: • Draft and Verify • Sampling-Based Speculative Decoding • Assisted Generation with a Draft Model • Measuring Acceptance and Speedup • Other Ways to Draft Tokens • When Speculation Helps Draft and Verify Speculative decoding involves two models: a draft model (usually a smaller model that is faster to run) and a target model (usually a larger model that is more accurate).

Keep reading

Out of respect for the author only the opening is shown here. Read the rest on the original site, or in HorizonReader with highlights, notes and AI help.

More from Machine Learning Mastery

Anatomy of an LLM Serving Engine

Overview This post is divided into four parts; they are: • The Request Path • A Minimal Asynchronous Engine • Cancellation, Backpressure, and Failure • Metrics and Production Interfaces The Request Path A text-generation workflow from reque

LLM Inference Engineering Roadmap

Decode sits on the left.

Building an MCP Client in Python from Scratch

In this article, you will learn how to build a working MCP client in Python with the official MCP Python SDK 2.0, connect it to...

Long-Context Inference

Overview This post is divided into four parts; they are: • The Cost of a Long Context • Chunked Prefill • Managing Long-Lived KV State • Selecting Useful Context The Cost of a Long Context For full causal attention over a prompt of $N$ toke

Building a Multi-Agent Verification Loop in Python with Small Open Models

In this article, you will learn how to build a Proposer-Critic-Judge verification loop in Python with a single small open model, and how to measure...