Field noteOct 26, 20261 min read1 source

reasoning-from-scratch: Implement a reasoning LLM in PyTorch from scratch, step by step

In one minute

The public GitHub repository reasoning-from-scratch provides the code accompanying Build a Reasoning Model (From Scratch).

What changed: Same event as Build Your Own Reasoning Model: A Full Video Course

It uses a pretrained open-source Qwen3 model as a starting point rather than training a base model from scratch. The repository is licensed under Apache-2.0.

Its notebooks cover text generation, reasoning-model evaluation, inference-time scaling, self-refinement, reinforcement learning, GRPO improvements, and distillation. The repository also includes material for loading pretrained model weights, Qwen3 source code, larger-model use, batching, evaluation approaches, and a chat interface.

The main chapters are designed to run mostly on consumer hardware. Chapters 2 through 4 are stated to work on CPUs and GPUs; a GPU is recommended for reproducing chapters 5 and 6. The source describes the result as a small but functional educational reasoning model. It does not establish that the material trains a frontier-scale model, reproduces DeepSeek-R1 or GPT-5 Thinking, or supplies a production-ready training system.

Evidence / sources

  1. 1github.com/rasbt/reasoning-from-scratch
All Field Notes

Next reads

Read next

Open the graph
  1. 01topicGithubExplore the github topic hub.
  2. 02archiveField NotesOpen the latest editorial analysis.
  3. 03source ledgerSource LedgerInspect the public source evidence graph.
Who read this page?Machine requests, hidden until opened

Loading the privacy-safe route aggregate...

Open the JSON contract