Building Reasoning Models from the Ground Up: A Video Course
A new 11âhour video series walks you through building, evaluating, and improving reasoning models from scratch using Python and PyTorch.

Introduction
If youâve ever wanted to see how modern reasoning models work under the hood, the new Build a Reasoning Model (From Scratch) video course is a handsâon guide that takes you from a preâtrained LLM to a fullyâfeatured reasoning engine. Over eight lectures (more than 11âŻhours of content) youâll implement evaluation, inferenceâtime scaling, reinforcement learning, and distillation in Python with PyTorch, all while learning the practical tradeâoffs that matter in real projects.
---
1. From a Base Model to a Reasoning Engine
The series begins by loading a small preâtrained Qwenâ3 model and establishing a solid textâgeneration pipeline. Youâll learn how to:
- Encode and decode tokens, run greedy decoding, and stream output efficiently.
- Add a keyâvalue (KV) cache and use `torch.compile` to accelerate inference.
- Set up the development environment (Python, PyTorch, uv, GPU/CPU considerations) so you can reproduce the experiments on modest hardware.
These foundations give you a baseline model that you can benchmark before any reasoningâspecific enhancements.
---
2. Building Verifiers and Reward Signals
A core piece of any reasoning model is a reliable way to judge its answers. In lecture three youâll construct a mathâanswer verifier that:
- Extracts final answers from generated text.
- Normalizes and checks mathematical equivalence.
- Provides a deterministic reward signal for reinforcement learning (RLVR).
The same verifier is used to evaluate the base model on the MATHâ500 benchmark, establishing a clear performance metric for later improvements.
---
3. InferenceâTime Scaling Techniques
Two consecutive lectures explore how to squeeze more accuracy out of a fixed model:
Sampling, Temperature, and Topâp
Youâll implement temperature scaling, multinomial sampling, and nucleus (topâp) filtering to generate diverse answer candidates. By aggregating these candidates with selfâconsistency (majority voting), you can boost accuracy without changing model weights.
Scoring and SelfâRefinement
Next, youâll compute tokenâlevel log probabilities and sequence likelihoods to rank candidates and break ties. A selfârefinement loop lets the model critique its own answer and produce a revised response, further improving results on the MATHâ500 set.
Both sections include costâvsâbenefit analyses, showing how additional compute translates into higher accuracy.
---
4. Reinforcement Learning with Verifiable Rewards (RLVR)
The final technical deepâdive covers Group Relative Policy Optimization (GRPO), a simplified RL algorithm that uses the verifierâs scores as rewards. Youâll:
- Generate groups of reasoning traces.
- Convert verifier scores into relative advantages.
- Update model weights based on these advantages, contrasting RLVR with the more common RLHF approach.
By the end of this lecture youâll have a working RL loop that can fineâtune the model toward higherâquality reasoning.
---
Practical Takeaways
- HandsâOn Code â Every concept is paired with runnable PyTorch snippets, so you can experiment immediately.
- Modular Learning Path â The videos work as a sequel to the earlier Build a Large Language Model course but stand alone for newcomers.
- Resource Guidance â Early chapters run on a CPU; later RL and distillation steps benefit from a GPU, and the repository includes hardware recommendations.
- Complementary Materials â A companion book (available from Manning/Amazon) and a short 90âminute LinkedIn Learning overview provide additional context and exercises.
---
Closing Thoughts
Reasoning models are the engine behind todayâs AI agents, and understanding their internals is essential for anyone building advanced LLMâpowered applications. This video series offers a complete, codeâfirst pathwayâfrom loading a base model to applying sophisticated inference scaling and reinforcementâlearning techniques. Whether youâre a researcher, developer, or hobbyist, working through the lectures and accompanying book will give you a concrete foundation for creating, evaluating, and improving reasoning models in realâworld settings.
Source
Read original sourceWhy we picked this
Core AI educational content on reasoning models, RL, and distillation.