Building Reasoning Models from the Ground Up: A Full Video Course
by Sebastian Raschka
Eight free videos that take a small Qwen3 model from plain text generation to GRPO training and distillation in PyTorch.
Overview
Building Reasoning Models from the Ground Up is a video course Sebastian Raschka published on his Ahead of AI newsletter on October 24, 2026, as a companion to his Manning book Build a Reasoning Model (From Scratch). It runs eight YouTube videos and over 11 hours. Video 1 separates plain LLMs, reasoning models and agent harnesses and sets up the environment with uv, including hardware choices. Video 2 loads the Qwen3 0.6B base model and covers greedy and streaming decoding, a KV cache and torch.compile. Video 3 builds a math-answer verifier, uses it to evaluate on MATH-500 and reuses it as the reward for reinforcement learning with verifiable rewards (RLVR). Videos 4 and 5 cover inference-time scaling: temperature, top-p and multinomial sampling, self-consistency majority voting, scoring with log probabilities and a self-refinement loop. Videos 6 and 7 implement a simplified GRPO training loop, then add metric tracking, clipped policy ratios, a KL term and format rewards. Video 8 covers soft and hard, on-policy and off-policy distillation using DeepSeek R1 teacher data. All code is Python and PyTorch in the Apache-2.0 rasbt/reasoning-from-scratch GitHub repo (about 5.5k stars and 875 forks when checked on October 25, 2026), organised by chapter from ch02 to ch08, with appendices on batching, LLM evaluation and a chat interface. Raschka also wrote Build a Large Language Model (From Scratch), and the course is the shortest route through the book's material.
At a Glance
- Topic
- Fine-Tuning
- Level
- Intermediate
- Format
- Video
- Cost
- Free
- Duration
- 8 videos, over 11 hours total, self-paced (longer if you run the training code and exercises)
- Provider
- Sebastian Raschka
- Hands-on
- Yes — code/exercises
- Certificate
- None
What You’ll Learn
- ✓Load Qwen3 0.6B weights and generate text with greedy and streaming decoding
- ✓Add a KV cache and torch.compile to speed up local inference
- ✓Build a math-answer verifier and use it to score a model on MATH-500
- ✓Apply sampling, self-consistency majority voting and scoring to scale inference-time compute
- ✓Implement a self-refinement loop that uses log-probability scores to improve answers
- ✓Write a simplified GRPO training loop for reinforcement learning with verifiable rewards
- ✓Stabilise GRPO training with clipped policy ratios, a KL term and format rewards
- ✓Distill a reasoning model from DeepSeek R1 teacher data with supervised training
Highlights
- •Every step is code you write in plain PyTorch on a 0.6B model, so the full pipeline fits on modest hardware rather than a cluster
- •The same verifier serves as the evaluation metric and the RL reward, which makes the link between evals and RLVR concrete
- •Each video maps to a chapter of the open rasbt/reasoning-from-scratch repo (Apache-2.0, ~5.5k stars as of 2026-10-25) with exercise solutions and downloadable checkpoints
- •Covers inference-time scaling, GRPO and distillation in one sequence, which most courses split or skip
- •Free on YouTube; the book is optional, though the author recommends reading each chapter alongside its video
Who It’s For
Best For
- ✓ML engineers who want to understand how reasoning models like DeepSeek R1 are trained
- ✓Developers moving from LLM fine-tuning to reinforcement learning with verifiable rewards
- ✓Readers of Build a Reasoning Model (From Scratch) who want a guided walkthrough of the code
- ✓Researchers who need a small, hackable GRPO baseline to experiment with
Prerequisites
- •Comfortable Python and PyTorch, including writing a training loop
- •Basic understanding of how transformer LLMs generate text (Build a Large Language Model (From Scratch) is recommended but not required)
- •A GPU for the reinforcement learning and distillation videos; early generation and evaluation examples run on a CPU
FAQ
What is Building Reasoning Models from the Ground Up: A Full Video Course?
A free eight-part video course from Sebastian Raschka for Python and PyTorch developers who want to know how reasoning models are built. You load Qwen3 0.6B, write a math verifier, add inference-time scaling, train with GRPO-based RLVR and distill a reasoning model, all in code you write yourself.
Is Building Reasoning Models from the Ground Up: A Full Video Course free?
Building Reasoning Models from the Ground Up: A Full Video Course is free to access.
What level is Building Reasoning Models from the Ground Up: A Full Video Course for?
Building Reasoning Models from the Ground Up: A Full Video Course is aimed at a intermediate audience. Recommended background: Comfortable Python and PyTorch, including writing a training loop, Basic understanding of how transformer LLMs generate text (Build a Large Language Model (From Scratch) is recommended but not required), A GPU for the reinforcement learning and distillation videos; early generation and evaluation examples run on a CPU.
How long does Building Reasoning Models from the Ground Up: A Full Video Course take?
Expect roughly 8 videos, over 11 hours total, self-paced (longer if you run the training code and exercises). Most learners work through it at their own pace.
What will I learn from Building Reasoning Models from the Ground Up: A Full Video Course?
You'll learn: Load Qwen3 0.6B weights and generate text with greedy and streaming decoding; Add a KV cache and torch.compile to speed up local inference; Build a math-answer verifier and use it to score a model on MATH-500; Apply sampling, self-consistency majority voting and scoring to scale inference-time compute; Implement a self-refinement loop that uses log-probability scores to improve answers; Write a simplified GRPO training loop for reinforcement learning with verifiable rewards; Stabilise GRPO training with clipped policy ratios, a KL term and format rewards; Distill a reasoning model from DeepSeek R1 teacher data with supervised training.
Topics
Sources
This page was written from 4 sources, 2 on domains other than magazine.sebastianraschka.com.