Skip to content
Apixo
Blog
news· 3 min read· via Ahead of AI (Sebastian Raschka)

Sebastian Raschka Releases 11-Hour Course on Building Reasoning Models from Scratch

Sebastian Raschka has launched an 11-hour video course and book detailing how to build reasoning models from scratch using Python, PyTorch, RLVR, and distillation.

Sebastian Raschka Releases 11-Hour Course on Building Reasoning Models from Scratch

Machine learning researcher Sebastian Raschka has released an 11-hour, eight-part video course and companion materials titled Build a Reasoning Model (From Scratch). Serving as a technical follow-up to his previous guide on constructing large language models, the educational series explores the engineering techniques behind modern reasoning systems by implementing them directly in Python and PyTorch. Instead of training an initial base model from zero, the course begins with a pre-trained 0.6-billion parameter Qwen3 model, allowing learners to focus on evaluation pipelines, inference-time scaling, reinforcement learning, and knowledge distillation.

From inference scaling to RLVR and distillation

The lecture series walks through the step-by-step evolution of an LLM into a reasoning model. After establishing an environment using uv and configuring CUDA or Apple Silicon acceleration, the curriculum begins with baseline inference optimizations. Raschka details tokenization, greedy decoding, streaming text generation, KV caching, and model compilation via torch.compile on the Qwen3 0.6B architecture.

From there, the course builds a dedicated math-answer verifier to score model responses against the MATH-500 benchmark. This verifier parses, normalizes, and checks mathematical equivalence—a foundational step that later supplies reward signals for training. Before altering model weights, Raschka covers test-time compute expansion. Learners implement temperature scaling, multinomial sampling, and top-p filtering to generate alternative outputs, then aggregate them through self-consistency majority voting and iterative self-refinement critique loops.

The second half of the series transitions into post-training. Raschka contrasts Reinforcement Learning with Human Feedback (RLHF) against Reinforcement Learning with Verifiable Rewards (RLVR). The practical implementation constructs a simplified variant of Group Relative Policy Optimization (GRPO), translating verifier feedback into relative advantages to update model parameters. Subsequent lessons inspect training diagnostics, handling clipped policy ratios, sequence log probabilities, and KL divergence penalties to avoid reward hacking. Finally, the series examines distillation, using problem solutions generated by DeepSeek R1 on the MATH dataset to supervise fine-tuning on smaller architectures.

The role of reasoning models in AI agents

A central conceptual focus of the course is explaining how reasoning models fit into the broader landscape of modern AI agents. Raschka frames the reasoning model as the "engine" of an intelligent system. Whereas a conventional LLM provides standard next-token predictions, reasoning models undergo targeted post-training with verifiable rewards to improve problem-solving in structured domains such as mathematics and programming.

In this framework, the agent harness acts as the surrounding machinery. The harness handles external tooling, environment interaction, and multi-step context management, while relying on the reasoning model as its core processing engine. While agent harnesses can technically wrap around standard LLMs, reasoning models provide the extended deliberate thought processes necessary for complex assistant workflows, coding execution, and multistep task completion.

What it means for developers

For software engineers and machine learning practitioners, Raschka's series breaks down mechanisms that are often hidden behind proprietary reasoning APIs. Rather than treating extended reasoning traces or test-time compute as closed features, the lectures provide working PyTorch code for self-consistency voting, verification loops, and GRPO-style optimization.

Developers can follow the initial evaluation exercises on standard CPU hardware, though GPU compute is recommended for the reinforcement learning and distillation experiments. For teams building production applications, understanding these internal dynamics helps optimize when to employ inference-time search versus training specialized models. Developers looking to benchmark and deploy multiple architectures can also try top AI models cheaply through one API at https://apixoai.online to evaluate performance across providers.

The complete 11-hour lecture series complements Raschka's print book Build a Reasoning Model (From Scratch), published through Manning and Amazon, alongside a condensed 90-minute conceptual overview available on LinkedIn Learning.


Source: Building Reasoning Models from the Ground Up: A Video Course — Ahead of AI (Sebastian Raschka). Written by the Apixo team from that report.

#ai-news#machine-learning#pytorch#reasoning-models#llms#deepseek
Try it with your own tools

One key for Claude, GPT, GLM, DeepSeek and more. Pay per token with crypto.

Get your API key

Keep reading