Build a Reasoning Model from Scratch: An 11-Hour Open-Source Course Breakdown

Sebastian Raschka's 11-hour free course teaches you to build a reasoning model with PyTorch, line by line.
Sebastian Raschka launched an 8-episode free video course on YouTube (~11 hours) teaching learners to build a reasoning model from scratch with Python and PyTorch. Starting from a small Qwen3 model, it covers Verifier, Inference Time Scaling, GRPO reinforcement learning, and distillation as a complete engineering pipeline. Prerequisites are just Python and PyTorch; early parts run on CPU, GPU is recommended for training, and code is open source on GitHub. The article says the course fills the gap between papers and engineering implementation.
Reasoning models sound intimidatingly sophisticated, but Sebastian Raschka—author of Build a Large Language Model from Scratch—recently released a complete 8-episode video course on YouTube, totaling about 11 hours and completely free. The goal: build a reasoning model from scratch with Python and PyTorch, hands-on.

Where the Course Starts: A Small Model + a Complete Pipeline
The course doesn't jump straight into reinforcement learning. Instead, it starts with a small Qwen3 model. Raschka's breakdown path is: first get a working base model, then layer on the key components needed for reasoning capability.
According to his course announcement, the pipeline covers, in order:
- Small model foundation: Start with a smaller Qwen3 model that runs locally
- Verifier: Build a module for evaluating the correctness of candidate answers
- Inference Time Scaling: Scale compute at inference time to trade for higher-quality output
- GRPO reinforcement learning: Train the model with Group Relative Policy Optimization
- Distillation: Compress the capability back into a smaller model
This path maps closely to the core engineering steps behind today's mainstream reasoning models (such as the methodology disclosed by the DeepSeekAd-R1 series). The course emphasizes "line by line"—explaining code line by line rather than staying at the conceptual level.

GRPO (Group Relative Policy Optimization) is a reinforcement learning algorithm proposed by the DeepSeek team as an alternative to PPO for training language models. Its core idea: for the same prompt, have the model sample a group of multiple responses, then compute the advantage function using the relative magnitude of rewards within the group (rather than absolute reward values), eliminating the need for the extra value network (critic) trained in PPO. This greatly reduces memory usage and training complexity while stabilizing policy gradients through intra-group normalization. In reasoning model training, GRPO is often used with verifiable reward signals (such as answer correctness) to drive the model to learn long-chain reasoning.
Inference Time Scaling refers to improving output quality by investing more compute at inference time without changing model weights. Common techniques include: having the model generate longer chains of thought, sampling multiple candidate answers and voting (self-consistency), reranking candidate solutions with a verifier (best-of-N), and tree search. It complements training-time scaling (larger models or more data) and is especially suited to domains with automatic verification, such as math and code. The course chains it with GRPO, reflecting the complete loop of "learn reasoning at training time, trade compute for quality at inference time."
Distillation in this context typically means using high-quality reasoning trajectories generated by a large model (or a reasoning model enhanced through reinforcement learning) to fine-tune a smaller student model. Unlike classical knowledge distillation (matching logit distributions), reasoning model distillation focuses more on behavior cloning: having the student model imitate the teacher model's step-by-step reasoning process when solving problems. This compresses capabilities obtained through expensive training like GRPO into a small model, reducing deployment costs. The course places distillation at the end of the pipeline precisely to show how to "recycle" the reasoning capability gained in earlier stages into a lightweight model.
Verifier is a module that evaluates the correctness of candidate answers—it can be a rule-based checker (such as comparing math answers), a unit test executor, or a trained reward model. In the reasoning model pipeline, the verifier plays multiple roles: during inference time scaling, it scores multiple sampled answers and picks the best; during GRPO training, it provides reward signals to compute intra-group relative advantages; during distillation, it filters high-quality reasoning trajectories. The verifier's quality therefore directly determines the ceiling of subsequent reinforcement learning and distillation—it is the infrastructure of the entire pipeline.
Hardware Requirements and Prerequisites
The course's prerequisites are remarkably modest: you only need to know Python and PyTorch. This is worth elaborating on—many reinforcement learning courses on the market assume you're familiar with RL theory, distributed training, reward modeling, and a whole stack of concepts, while this course lowers the bar to "can write PyTorch code."
On hardware, Raschka says: the first few parts run fine on CPU, and a GPU is better for the training sections. This arrangement lets learners without high-end GPUs keep up with the first half, so they don't get stuck at the environment setup step.
The code is hosted on GitHub as open source, meaning you can pause the video, modify code, and run experiments—not just watch.

Why This Course Is Worth Attention
A notable problem in the reasoning model field: papers and blog posts explain "what was done" but rarely "how to write the code." GRPO's formula takes only a few lines in a paper, but engineering it involves a series of details—sampling, reward computation, policy updates, memory management.
This course fills exactly that gap. The author's background also lends credibility—Build a Large Language Model from Scratch has a strong reputation in the from-scratch LLM teaching space, and this reasoning model course can be seen as an extension of the same approach in the "reasoning capability" direction.
Another notable point is the course's coverage of Inference Time Scaling. This is an often overlooked but deeply impactful step: with the same set of weights, different inference-time compute strategies can produce significantly different answer quality. Teaching it alongside GRPO and distillation in the same pipeline is closer to real engineering scenarios than covering any single component alone.

How to Use This Course
If you plan to follow along, a few practical tips:
Get it running before understanding it. 11 hours of content is not short, and watching line by line can easily lose momentum midway. A more effective approach: first run the pipeline end-to-end following the repo, see the output, then go back and dig into what each line does.
Don't skip the Verifier section. The verifier is the foundation of the entire pipeline—the RL stage depends on the signals it provides, and the distillation stage depends on it to filter data. If you just skim this part, the subsequent GRPO easily becomes a black box.
Don't rush to the cloud during the CPU stage. The first half of the course runs on CPU, which is exactly the best window for debugging code logic—wait until the GPU-requiring training sections before considering compute investment.
Read the code against the papers. GRPO and inference time scaling both have corresponding public papers and method descriptions; reading the course code alongside the paper formulas will speed up understanding far more than passive reception.
One-Line Takeaway
Reasoning models are no longer something you can only imagine by reading papers—an 11-hour free course, Python + PyTorch prerequisites, and open-source runnable code have lowered the bar to where individual developers can get hands-on. If you want to understand what's really happening behind reasoning models, just search "Build a Reasoning Model from Scratch" on YouTube.
One-line Summary
Sebastian Raschka releases an 11-hour free course teaching you to build a reasoning model with PyTorch, line by line.
Paragraph Summary
Sebastian Raschka launched an 8-episode free video course on YouTube, totaling about 11 hours, aimed at helping learners build a reasoning model from scratch with Python and PyTorch. Starting from a small Qwen3 model, the course covers Verifier, Inference Time Scaling, GRPO reinforcement learning, and distillation in sequence, forming a complete engineering pipeline. Prerequisites are just Python and PyTorch; the early parts run on CPU, GPU is recommended for training, and the code is open source on GitHub. The article argues the course fills the gap between papers and engineering implementation, and offers practical tips: get it running before understanding, value the Verifier, debug during the CPU stage, and read code against papers.
Related articles

DeepSeek Open-Sources DeepInfer: What Is an Inference Framework Actually For?
DeepSeek open-sources its inference framework DeepInfer under Apache 2.0, supporting DeepSeek V4.1 Flash offline inference. This article explains its request scheduling, FlashMLA/DeepGEMM compute optimization, DSPark speculative verification acceleration, and what it means for developers and ordinary users.

Open-Source AI Learning Agent: A Full Workflow Experience from Topology Graphs to Exam Generation
Explore an open-source AI learning agent: built on DeepSeek API, it constructs knowledge systems via topology graphs, with automatic document generation, notes, super documents, and exams. Learn about its Agent workflow and design highlights.

DeepSeek Whale Girl Open-Source MV Meme: AI Industry Coded Slang About Pivoting to Closed Source
Bilibili's DeepSeek Whale Girl rap MV uses fictional memes to tease the AI open-source vs. closed-source debate, with lyrics full of industry slang. This article explains the meme culture, the Whale Girl symbol, and the open/closed tension.