
How is the Speculative Decoding Algorithm Constructed?
A simple mathematical derivation of the algorithm construction process from the paper “Fast Inference from Transformers via Speculative Decoding”.

A simple mathematical derivation of the algorithm construction process from the paper “Fast Inference from Transformers via Speculative Decoding”.
](https://ki-seki.github.io/posts/250902-diffusion-annotated/Diffusion_Diagram.png)
Diffusion models are the de facto standard for image generation. Lilian Weng’s “What Are Diffusion Models?” is an excellent introduction to it, but readers without a solid mathematical background may struggle. This article fills that gap with clear, step‑by‑step derivations and explanations.