# Sebastian Raschka releases an 11-hour course on building reasoning models

> Original title: 从零构建推理模型：11 小时视频课，把评估、推理时扩展、RLVR 与蒸馏写进 PyTorch

- Source: meng shao
- Published: 2026-10-26T01:43:59.000Z
- Bad Influence: https://badinfluence.news/items/one2i3wlmxpnuxxrdd4ylp201
- Original: https://x.com/shao__meng/status/2114533468826952112

## Summary

Sebastian Raschka opens a full programming course, with an 11-hour video series, on building reasoning models from scratch in Python and PyTorch. Starting from a pretrained 0.6B Qwen3, it covers verifiers, inference-time scaling, GRPO-based RLVR, and distillation from a stronger teacher, with the course tied to a companion book.

## Post

从零构建推理模型：11 小时视频课，把评估、推理时扩展、RLVR 与蒸馏写进 PyTorch

@rasbt 「Build a Reasoning Model (From Scratch)」系列绝对是系统学习模型构建原理和实践最佳教程，可能没有之一，这次开放的是与新书配套的完整编程课：从已预训练的小 Qwen3 起步，用 Python/PyTorch 手写评估 verifier、推理时扩展（采样 / 自洽 / 评分 / 自我精炼）、GRPO 版 RLVR，以及向更强教师蒸馏；主线是理解「推理模型」本身。
https://magazine.sebastianraschka.com/p/building-reasoning-models

推理模型、普通 LLM、Agent 怎么放
文中用发动机类比：常规 LLM 是引擎；推理模型是在其上加更多可验证奖励的强化学习后训练（可选再加推理时扩展），更擅长数学与代码等难题；Agent harness 则是外层工具与上下文管理，让引擎去做更大任务。Agent 可用普通 LLM 或推理模型，但当代主流多是带可调推理力度的推理模型。系列资源对应三本/三块：LLM from Scratch → Reasoning Model from Scratch → Coding Agent 组件文。

课程怎么设计
· 起点：小预训练 Qwen3 0.6B，跳过「从零训底座」，专攻评估、推理时扩展、RL、蒸馏
· 前置：熟悉 Python 与 PyTorch；上一门 LLM from Scratch 推荐但不强制
· 算力：前期生成与评估可 CPU；后期训练强烈建议 GPU；视频 1 与仓库有环境建议
· 学习路径建议：先读对应章节 → 跟视频写代码 → 做练习；另有约 90 分钟 LinkedIn Learning 概念课可当预习

八讲内容（按工作流）
1. 动机与环境：LLM / 推理 / Agent 关系；uv 装依赖；CUDA / Apple Silicon / 远程 GPU
2. 加载底座与生成：载入 Qwen3 权重；流式生成；KV cache + torch.compile
3. Verifier：抽答案 → 规范化 → 数学等价；在 MATH-500 上评估；并为后续 RLVR 奖励 复用
4. 推理时扩展 I：temperature / multinomial / top-p；self-consistency（多数票）；精度 vs 额外算力
5. 推理时扩展 II：token/序列 logprob 打分破平；self-refinement（批评→改写）并评估
6. RL：简化 GRPO：RLHF vs RLVR；组内相对优势；简化 GRPO loss；训练循环与 checkpoint
7. RL：稳定与分析：entropy / advantage、clip、KL、format reward；防 reward hacking；再评 MATH-500
8. 蒸馏：soft/hard、on/off-policy；用 DeepSeek R1 等教师数据；监督训小模型并对比

![](https://badinfluence.news/api/img-proxy?u=https%3A%2F%2Fpbs.twimg.com%2Fmedia%2FHVhU-MTbYAAjMcn.jpg&mode=thumb&exp=1795651200&sig=a2608a5ce33be74c)

## Quoted post @rasbt

> The complete reasoning-from-scratch video series is now up (and linked) here: https://magazine.sebastianraschka.com/p/building-reasoning-models
> 
> (Taking a short break but will be back with LLM model and research updates in November!)

https://x.com/rasbt/status/2114325097653669940
