Interactive Tutorials on AI: Flow Matching, Diffusion, and Speculative Decoding

Explore emerging advances in AI through these online tutorials, which will also be presented at NeurIPS
education
technical
Author

Tommy C, Erik Gaasedelen, & Rachel Thomas

Published

November 30, 2026

At Answer.AI, we value understanding cutting-edge concepts in AI. We applied to the NeurIPS 2026 Education track, which is focused on emerging technical advances in AI, and we all had our work accepted. Below are links to interactive tutorials, geared towards people who already understand the basics of deep learning.

We created our tutorials with SolveIt, the canvas we turn to when we want to deeply understand what we are doing. To learn more about the motivation behind SolveIt, read this post, or you can try it for yourself here (although SolveIt is not required to run any of the tutorials). Tommy, Erik, and Rachel work on R&D at AnswerAI, and Lisa previously worked on TPUs at Google and is a member of the SolveIt community. Erik and Lisa’s tutorials are served in SolveIt with FastHTML.

If you are planning to be at NeurIPS in Sydney, you can come see us at the poster sessions for the Education Track on Monday, Dec 7. Rachel will be giving the opening keynote, “Why AI Education Matters More Than Ever Now” at 8:30am, and Lisa will be giving a spotlight talk on “Flow Matching for Robot Policies” at 2:15pm.

An Intuitive Guide to Flow Matching

by Tommy C

TL;DR: This tutorial derives Flow Matching, a state-of-the-art generative modelling technique, from scratch using a simple drawing analogy and high-school Math.

The Concept: Flow Matching is a technique used to generate data like images, audio clips, protein structures and more. It has produced state-of-the-art results in many fields, most notably in image generation. It is closely related to diffusion, the technique used in Stable Diffusion, DALL-E 2/3, and AlphaFold 3. In fact, diffusion can be viewed as a specific form of Flow Matching. It works by training a model to gradually transform random noise into some desired output. This process is analogous to an artist taking a blank sheet of paper and transforming it into a drawing stroke by stroke. In the guide, we will use this drawing analogy to derive Flow Matching from scratch using high-school math. Then we will implement a Flow Matching training loop and use it to train a model that generates black and white images with a simple geometric pattern. Finally, we will discuss how to apply Flow Matching to real-world problems.

With 1 click, use the interactive notebook in SolveIt (which will let you modify the code and ask an AI questions about it), or download the repo from GitHub to run in Jupyter.

Current Frontiers of Diffusion LLMs

by Erik Gaasedelen (with Lisa Dlima)

TL;DR: An interactive webpage demonstrating the progression of diffusion model generation from 2021 until now

The Concept: Diffusion models are providing some of the most exciting affordances to neural networks today. LLMs are traditionally autoregressive and have no ability to edit beyond next token. Diffusion models create a canvas for the model to paint words in different slots, potentially multiple at a time. While other methods like speculative decoding rely on sampling long chains (usually with sidecar models), diffusion is slowly becoming a modality where text can be reviewed and refined directly by the model and not via rewriting or accessory tool calling. It is likely to allow for for more sophisticated text manipulation and perhaps strides in AI writing quality in the near future.

Visit the tutorial here– Unmasking Text: An interactive guide to diffusion language models

Try out different block sizes for the diffusion LLM

Speculative Decoding Tutorial

by Rachel Thomas

TL;DR: Speculative decoding is explained in a jupyter notebook tutorial via an interactive visualization, a check on correctness using a toy data set, and a simulation to confirm the predicted speedup.

The Concept: For autoregressive models (such as the major LLMs), each token depends on all the tokens that came before it. This serial dependency means that you can’t just parallelize it. Speculative decoding is a useful way of speeding up token generation. It involves using a smaller draft model to guess tokens in parallel and then verify with the original, larger model. It is used in large production systems to speed up token generation, including for Google Search AI summaries, NVIDIA TensorRT-LLM, and DeepSeek-V4. Speculative decoding has sparked an active line of research, including newer variations such as Medusa, Eagle, DFlash, and DSpark.

Watch this 5-minute video overview:

With 1 click, use the interactive notebook in SolveIt (which will let you modify the code and ask an AI questions about it), or download the repo from GitHub.

Flow Matching Tutorial for Robot Policies

by Lisa Dlima (with Erik Gaasedelen)

TL;DR: An interactive tutorial that teaches flow matching through a 2D underwater robot, showing why robots predict trajectories, not commands.

The Concept: Flow matching is a generative modeling method that learns to transform noise into data along a continuous path. In this interactive tutorial, a 2D underwater robot must swim over or under a coral obstacle. Every model trains live in the browser in under a minute. Learners see why regression fails on multimodal demonstrations, how flow matching turns noise into coherent action chunks, and how those chunks survive control rates, latency and disturbances, with every policy trained and run live in the browser.

Visit the tutorial here– Flow Matching Tutorial for Robot Policies: Why robots predict trajectories, not commands

Build up the pieces for flow matching in which an underwater robot must learn to swim around an obstacle