hn.today

Sebastian Raschka's from-scratch video course on building reasoning models

magazine.sebastianraschka.com689 points94 comments
Screenshot of Sebastian Raschka's from-scratch video course on building reasoning models

An eight-part, more than 11-hour coding course shows how to build and improve a reasoning model from a pre-trained Qwen3 0.6B model using Python and PyTorch. Its central distinction is that a reasoning model is the model “engine,” enhanced through post-training such as reinforcement learning with verifiable rewards and, optionally, inference-time scaling; an agent harness adds tools and context management around that engine. The material focuses on the model itself, with the goal of making modern reasoning methods understandable through implementation rather than treating them as black boxes. Python and PyTorch familiarity are recommended, but earlier large-language-model coursework is not required. Initial generation and evaluation can run on a CPU; later training is more practical with a GPU.

The course progresses from environment setup and efficient text generation - including KV caching and compilation - to building a math verifier and evaluating the baseline on MATH-500. It then explores inference-time improvements that leave model weights unchanged: sampling diverse answers, top-p filtering, self-consistency by majority vote, scoring candidates with likelihoods, and self-refinement through critique and revision. These methods are assessed against accuracy and additional compute. The training section introduces RLVR and a simplified GRPO implementation that uses groups of generated responses and verifier-based rewards to update model weights; the broader course also covers distillation. The videos accompany a book with explanations and exercises, and are designed to be paired with its chapters for a deeper, hands-on learning experience.

Read on magazine.sebastianraschka.com94 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in AI

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.