Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Implement a reasoning LLM in PyTorch from scratch, step by step
| Date | Stars |
|---|---|
| 2026-07-24 | 4803 |
| 2026-07-25 | 4810 |
| 2026-07-28 | 4810 |
| 2026-07-30 | 4810 |
| 2026-07-31 | 4849 |
| 2026-08-06 | 4849 |
Today
— stars today
This week
+39 stars this week
This month
— stars this month
Momentum
54.0
growth rate 0.81%/day
# Build A Reasoning Model (From Scratch) This repository contains the code for developing an LLM reasoning model and is the official code repository for the book [*Build a Reasoning Model (From Scratch)*](https://mng.bz/lZ5B). <br> <br> <a href="https://mng.bz/lZ5B"><img src="https://sebastianraschka.com/images/reasoning-from-scratch-images/cover.webp?123" width="250px"></a> (Printed in color.) <br> In [*Build a Reasoning Model (From Scratch)*](https://mng.bz/lZ5B), you will learn and understand how a reasoning large language model (LLM) works. Reasoning is one of the most exciting and important recent advances in improving LLMs, but it’s also one of the easiest to misunderstand if you only hear the term reasoning and read about it in theory. This is why this book takes a hands-on approach. We will start with a pre-trained base LLM and then add reasoning capabilities ourselves, step by step in code, so you can see exactly how it works. The methods described in this book walk you through the process of developing your own small-but-functional reasoning model for educational purposes. It mirrors the approaches used in creating large-scale reasoning models such as DeepSeek R1, GPT-5 Thinking, and others. In addition, this book includes code for loading the weights of existing, pretrained models. - Link to the official [source code repository](https://github.com/rasbt/reasoning-from-scratch) - Link to the [book at Manning](https://mng.bz/lZ5B) (the publisher's website) - Link to the book page on Amazon.com (TBD) - ISBN 9781633434677 <br> <br> To download a copy of this repository, click on the [Download ZIP](https://github.com/rasbt/reasoning-from-scratch/archive/refs/heads/main.zip) button or execute the following command in your terminal: ```bash git clone --depth 1 https://github.com/rasbt/reasoning-from-scratch.git ``` <br> > **Tip:** > Chapter 2 provides additional tips on installing Python, managing Python packages, and setting up your coding environment. <br> <br> ## Table of Contents (In Progress) [](https://github.com/rasbt/reasoning-from-scratch/actions/workflows/tests-linux.yml) [](https://github.com/rasbt/reasoning-from-scratch/actions/workflows/tests-macos.yml) [](https://github.com/rasbt/reasoning-from-scratch/actions/workflows/tests-windows.yml) - [Troubleshooting Guide](./troubleshooting.md) | Chapter Title | Main Code | | ----------------------------------------------------------- | ------------------------------------------------------------ | | Ch 1: Understanding reasoning Models | No code | | Ch 2: Generating Text with a Pre-trained LLM | - [ch02_main.ipynb](ch02/01_main-chapter-code/ch02_main.ipynb)<br/>- [ch02_exercise-solutions.ipynb](ch02/01_main-chapter-code/ch02_exercise-solutions.ipynb) | | Ch 3: Evaluating Reasoning Models | - [ch03_main.ipynb](ch03/01_main-chapter-code/ch03_main.ipynb)<br/>- [ch03_exercise-solutions.ipynb](ch03/01_main-chapter-code/ch03_exercise-solutions.ipynb) | | Ch 4: Improving Reasoning with Inference-Time Scaling | - [ch04_main.ipynb](ch04/01_main-chapter-code/ch04_main.ipynb)<br/>- [ch04_exercise-solutions.ipynb](ch04/01_main-chapter-code/ch04_exercise-solutions.ipynb) | | Ch 5: Inference-Time Scaling via Self-Refinement | - [ch05_main.ipynb](ch05/01_main-chapter-code/ch05_main.ipynb)<br/>- [ch05_exercise-solutions.ipynb](ch05/01_main-chapter-code/ch05_exercise-solutions.ipynb) | | Ch 6: Trainin
Excerpt of 11,308 characters
Read on GitHubSebastian Raschka
285
2
Octopus · Independent Developer · United States
2
1
1
Would you bet a product on this? Bounded 0–100 and slow moving.
matched fp:4af6097e9ea87f89, topic:deep-learning, topic:pytorch
matched fp:4af6097e9ea87f89, topic:rlhf
matched fp:4af6097e9ea87f89, topic:large-language-models, topic:llm
matched fp:4af6097e9ea87f89, topic:reinforcement-learning