This repository is the companion code for Sebastian Raschka's book "Build a Reasoning Model (From Scratch)" (Manning, 2025). It is primarily a data-research and educational codebase, but hybrid in nature: it ships as an installable Python package (`reasoning_from_scratch`) containing a complete from-scratch PyTorch implementation of Qwen3-0.6B (RMSNorm, RoPE, group-query attention, KV cache), chapter-by-chapter Jupyter notebooks, standalone CLI evaluation/training scripts, a ~25-file pytest suite, and GitHub Actions CI across Linux/macOS/Windows with old and nightly PyTorch variants. The core deliverable is reproducible research showing how to add reasoning to a pretrained LLM via inference-time scaling, GRPO/RLVR reinforcement learning, and knowledge distillation.