Latest stories
Story · 1 report
Sebastian Raschka's from-scratch video course on building reasoning models
An eight-video, 11-hour coding course teaches developers to build and improve a small reasoning model in Python and PyTorch, beginning with a pre-trained Qwen3 0.6B model. The materials cover model loading, streaming text generation, KV caching, model compilation, evaluation, inference-time scaling, reinforcement learning, and distillation. Python and PyTorch familiarity are recommended; early generation and evaluation exercises can run on a CPU, while later training experiments are more practical on a GPU. The course builds a math-answer verifier and uses the MATH-500 benchmark to evaluate models. It implements temperature scaling, multinomial sampling, top-p filtering, self-consistency voting, scoring based on token and sequence log probabilities, and self-refinement. Later lessons implement a simplified Group Relative Policy Optimization method for reinforcement learning with verifiable rewards, including response groups scored by the verifier, training metrics, clipped policy ratios, and KL-loss terms. The final lesson distills reasoning behavior from DeepSeek R1-generated answers through supervised training and compares distilled-model results on MATH-500. The videos accompany the book Build a Reasoning Model (From Scratch), and a separate 90-minute LinkedIn Learning course provides a conceptual overview of inference-time scaling, reinforcement learning, and distillation.
magazine.sebastianraschka.com
🔥🔥🔥🔥🔥1 min summary
10/26/2026
No more articles to load
