首页›Ahead of AI›文章

Building Reasoning Models from the Ground Up: A Full Video Course

Sebastian Raschka, PhD · 2026年10月24日

AI 摘要 AI 生成,可能有误

作者宣布推出一门时长11小时、由8个视频组成的课程,该课程使用Python和PyTorch从零开始构建一个推理模型,从预训练的Qwen3模型入手,内容涵盖使用数学验证器进行评估、推理时扩展技术(如采样、自洽性和自我完善),以及使用GRPO进行基于可验证奖励的强化学习。这些视频是他著作《Build a Reasoning Model (From Scratch)》(从零构建推理模型)的配套内容,要求熟悉Python和PyTorch,并且建议在后半部分侧重于训练的视频中使用GPU。他还解释说,推理模型在智能体框架中充当“引擎”的角色,因此对于理解现代基于LLM的智能体至关重要。

I have written a lot about reasoning models here over the last two years on Ahead of AI, including a recent article on mechanisms to control reasoning effort levels in contemporary LLMs. Reasoning models are still as relevant as ever. In fact, almost all current-generation LLMs today are reasoning models or offer a reasoning mode.

For those who are interested in how reasoning models work, including inference scaling, reinforcement learning, and distillation, I wrote my recent Build Reasoning Model (From Scratch), which implements these from the ground up in PyTorch, which, in my experience, is still the best way to understand and learn how things really work.

Now, in the last few months, I also sat down and recorded accompanying lectures I wanted to share with you. So, below, you will find eight reasoning model-from-scratch coding videos (11 hours of content).

继续阅读全文

为了尊重作者,这里只展示开头几段。你可以去原文阅读,或者在 HorizonReader 里读:划线做笔记、让 AI 帮忙。

更多来自 Ahead of AI

Understanding Positional Embeddings in Modern LLMs

AI 摘要This article is a detailed tutorial on how LLMs encode token position information, explaining why explicit positional signals are needed (beyond the implicit order given by causal attention masks) and walking through methods like GPT-2's learned absolute position embeddings, the original transformer's fixed sinusoidal encodings, and RoPE, illustrated with visuals, math, and PyTorch code. The author also previews which positional encoding approaches are used in 2026 open-weight model architectures. The article serves as a standalone foundational reference, motivated by reader requests for a RoPE tutorial and as preparation for an upcoming analysis of modern LLM architecture trends.

Language Models for Text Classification: From Bag-of-Words to Jev

AI 摘要This article analyzes the newly released Jev AI model, positioning it as a fast and inexpensive text classifier that bridges the gap between general-purpose LLMs and narrow task-specific classifiers. To demystify the hype, the author traces the history of language models for text classification, from bag-of-words representations with classic methods like naive Bayes and logistic regression, through word embeddings and recurrent neural networks such as LSTMs, up to transformer-era approaches. The author concludes that while Jev is essentially a text classifier, it is more general and capable than its simple predecessors, which explains its recent popularity.

GPT-6 Astra, Looped Transformers, and Hidden Reasoning

AI 摘要The article reviews OpenAI's newly released GPT-6 Astra, describing it as the best model the author has used, with standout performance in 3D rendering, animation, and computer-use tasks, and explaining how computer-use skills are trained via reinforcement learning in macOS environments. It then explains 'looped transformers' (recurrent depth), an architecture in which intermediate representations pass through the same transformer blocks multiple times with shared weights, an idea dating back to Universal Transformers (2018). Finally, it examines whether this looped design relates to rumors that Astra conceals its chain-of-thought reasoning trace.

How Claude Watermarks AI-Generated Text

AI 摘要The author expands on a popular social media post by creating a detailed 48-minute video lecture (with over 50 slides and a transcript) explaining how Anthropic's new watermarking for Claude-generated text works. The lecture first covers how LLM text generation functions under the hood—tokenization, score distributions, and next-token sampling—to show that watermarking is a minor tweak within the normal generation process. The goal is to help readers understand how the invisible watermark is embedded, why it can fail or be removed, and its pros and cons.

Building an AI Text Detector From Scratch

AI 摘要This article presents an educational tutorial on building an AI text detector from scratch by fine-tuning a DistilBERT classifier that outputs a 0-100 score estimating how likely a text is AI-generated, similar to the approach behind Substack's new AI detection feature. The detector also serves as a verifier to train a small language model to produce text that avoids detection, illustrating the cat-and-mouse nature of AI detection, its limitations such as false positives, and the broader concept of verifier-based LLM applications. The end-to-end project includes evaluation, training, and local deployment via an API and a user-friendly browser interface.