Code for building a reasoning LLM from scratch in PyTorch, with chapter-based notebooks and tutorials. Includes setup tips, multiple chapters, and optional materials; latest release is v1.0 from 2026-05-18.
Collecting history — the radar snapshots this repo daily. The trend line appears after 3 days of data (1 so far).
What it is
A repository containing code and notebooks for developing a reasoning LLM from scratch, associated with the book Build a Reasoning Model (From Scratch). It includes loading pretrained models, inference-time scaling, reinforcement learning, and distillation workflows as taught in the book.
How it works
The project provides Jupyter notebooks and chapter code to implement reasoning capabilities on top of a base LLM (e.g., Qwen3), with modules for inference-time scaling, self-refinement, reinforcement learning, and distillation. It includes files and links to load pretrained weights and run experiments as described in the companion book.
Getting started
To download a copy, use the command from the README:
git clone --depth 1 https://github.com/rasbt/reasoning-from-scratch.git
Additional setup tips are referenced in Chapter 2: installing Python, managing packages, and setting up the coding environment.
Recent releases
- v1.0 v1.0 (2026-05-18): State of the book code as it goes to print. This release captures the final version of the code accompanying the print edition. (Future updates may include small fixes, compatibility updates, or clar
Traction
stars_7d and stars_1d are not provided in this dataset, so this section is omitted.
Behind the repo
This repository is linked to the book Build a Reasoning Model (From Scratch) by Sebastian Raschka, focusing on methods to improve LLM reasoning and including code to load existing pretrained model weights. The README references the official source code repository and Manning/publisher materials, but does not provide additional company-specific details.
Caveats
- License: Apache-2.0
- Created: 2025-03-04
- Last push: 2026-08-04
- Language: Jupyter Notebook
- Open issues: 4






