Coderefercoderefer
CoursesWebinarsBlogAbout
Coderefercoderefer

Discover. Learn. Automate. Grow.

Learn

  • Courses
  • Webinars
  • Blog
  • Search

Company

  • About
  • Contact
  • FAQ

Legal

  • Privacy Policy
  • Terms of Service
  • Refund Policy
© 2026 Coderefer. All rights reserved.
HomeBlogRaschka's Free Reasoning Models From Scratch Course, Explained
ai-toolsOctober 27, 20265 min read

Raschka's Free Reasoning Models From Scratch Course, Explained

Sebastian Raschka's free 11-hour video course builds a reasoning model from scratch in Python and PyTorch, covering GRPO RL, inference scaling, and distillation.

V

Vamsi Tallapudi

Manager, Architect Technology at Cognizant

Raschka's Free Reasoning Models From Scratch Course, Explained

Sebastian Raschka just made it free to learn how reasoning models like DeepSeek R1 and o1 actually work under the hood. On October 24, 2026, he released "Building Reasoning Models from the Ground Up": eight videos, more than 11 hours total, walking through a complete reasoning-model build in Python and PyTorch, code included, no paywall.

If you've read his earlier book "Build a Large Language Model (From Scratch)," this is the natural next step. If you haven't, you can still follow along, but you'll move faster if you already know what a transformer and a KV cache are.

What is Reasoning Models From Scratch?

It's a free video course built as the code companion to Raschka's Manning book "Build a Reasoning Model (From Scratch)," a 440-page, full-color book he says took 18 months of "writing, coding, and experimenting." The videos are free. The book isn't. The code backing both lives in the rasbt/reasoning-from-scratch GitHub repo under an Apache-2.0 license, and it had already cleared 5,700 stars within three days of the course going live.

Each video maps to one book chapter. You get exercise solutions and downloadable checkpoints alongside the code, so you're not stuck re-training everything from zero just to check your work.

What will you actually build?

You start from a small, pretrained Qwen3 0.6B model, not one you train from random weights, since that would take a GPU cluster Raschka doesn't assume you have. From there, the course builds a reasoning pipeline across eight chapters:

  • Chapter 1: Understanding reasoning models. No code. The conceptual setup — what separates a "reasoning model" from a regular LLM, and where agents fit relative to both.
  • Chapter 2: Generating text with a pretrained LLM. Text generation, sampling, and KV caching, implemented by hand.
  • Chapter 3: Evaluating reasoning models. You build the evaluation harness before touching any reasoning technique, benchmarking against MATH-500. That ordering is deliberate: every later improvement gets measured, not just claimed.
  • Chapter 4: Inference-time scaling. Chain-of-thought prompting, sampling strategies, self-consistency, and best-of-N.
  • Chapter 5: Self-refinement. The model critiques and rewrites its own output across multiple passes.
  • Chapter 6: Reinforcement learning with GRPO. You implement GRPO (Group Relative Policy Optimization) from scratch, training against automatic verifiers on math problems.
  • Chapter 7: Improving GRPO. Stability fixes for the training loop: a clipped policy ratio, a KL penalty term, and format rewards layered on top of the basic GRPO step.
  • Chapter 8: Distillation. You distill reasoning behavior from DeepSeek R1 teacher-generated answers into your small Qwen3 model.

That's roughly the pipeline a lab runs to turn a plain LLM into something like o1 or R1, minus the compute budget.

Do you need a beefy GPU to follow along?

Mostly no. The repo's own setup notes say chapters 2 through 4 run fine on CPU or GPU. You'll want a real GPU for chapters 5 and 6, since that's where you're running heavier multi-pass self-refinement and then actual GRPO training steps against a reward model. Chapter 7 builds directly on chapter 6, so budget GPU time there too. None of it assumes a rack, though, just a single consumer card.

How do you set it up?

Raschka uses uv for the whole environment, not pip or conda directly. That's worth calling out on its own. uv resolves and installs dependencies fast enough that you're not waiting around between chapters, and it pins versions so your results match his. Clone the repo, follow the uv install steps from the first setup video, and you're generating text with the pretrained Qwen3 model before the end of chapter one.

How does this compare to the LLM From Scratch book?

"Build a Large Language Model (From Scratch)" gets you a working GPT. This course assumes that part is done and picks up where most LLM courses stop: what happens after pretraining. Raschka has said the earlier LLM content is recommended, not required, for following the reasoning material. You'll move through it faster with transformer attention, tokenization, and the pretraining loop already in your head, but you don't need them memorized to start.

Is this actually worth your time?

Here's where I'll give an actual opinion instead of a shrug. The Hacker News submission cleared 650 points and 90-plus comments within a day, and the thread split roughly the way you'd expect. Some commenters pushed back that courses like this feel like toy exercises next to how impractical real RL training is without serious compute at home. Others argued the point isn't shipping a frontier model, it's understanding how GRPO and distillation actually work by building a small version yourself, the same way writing a tiny compiler teaches you more about compilers than reading a spec ever does.

I land with the second group. You're not going to out-RL DeepSeek on a single GPU, and nobody's claiming otherwise. But if you've been nodding along every time someone says "verifiable rewards" or "GRPO" without really knowing what's happening inside, this is the fastest way to stop faking it. Eleven hours of video plus working code beats another thread of someone's hot take on reasoning models.

The one honest gap: chapter 8's distillation pulls from DeepSeek R1 teacher-generated answers, and getting that data pipeline running cleanly on consumer hardware takes some patience with batching and generation throughput. Budget more time for that chapter than the others.

Where do you start?

Go to sebastianraschka.com/blog/2026/reasoning-models-and-agents-from-scratch.html for the first video and the code setup instructions, then clone rasbt/reasoning-from-scratch on GitHub. If you want the full written walkthrough with exercises and explanations instead of just code, the Manning book covers the same eight chapters in more depth, with the ebook currently discounted below its roughly $48 list price.

For more on how reasoning and agent behavior differ in practice, see our breakdown of hybrid reasoning in agent frameworks and our look at extended thinking in Gemini 3.8.

Watch the course setup video

Build a Reasoning Model From Scratch #1: Motivation & Code Setup
ai-tools reasoning-models pytorch 2026

Comments

    Get AI tricks that save you hours every week

    New AI tools, automation workflows, and course drops — straight to your inbox. Join 2,400+ builders.

    Read Next

    Theo's tstack: The 9 Claude Code Skills That Ship PRs For You
    ai-tools

    Theo's tstack: The 9 Claude Code Skills That Ship PRs For You

    Theo Browne open-sourced tstack: 9 Claude Code and Codex skills like full-send, council, and babysit-pr that file, review, and merge PRs on their own.

    October 27, 20268 min read
    GPT-6.1 Terra Explained: $1/$5 Pricing vs Claude Sonnet 5.5 and Haiku 5.5
    ai-tools

    GPT-6.1 Terra Explained: $1/$5 Pricing vs Claude Sonnet 5.5 and Haiku 5.5

    GPT-6.1 Terra launched Oct 26, 2026 at $1/$5 per million tokens, scoring 50.3% on Terminal-Bench 4.0. Here's how it stacks up against Claude Sonnet 5.5 and Haiku 5.5.

    October 27, 20266 min read
    git-ai Explained: Open-Source Scion for AI Coding Agents
    ai-tools

    git-ai Explained: Open-Source Scion for AI Coding Agents

    git-ai is an open-source rebuild of Anthropic's Scion, built so AI coding agents can land changes on shared branches without queuing like humans do.

    October 27, 20268 min read
    View all posts →