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 ChatGPT-like LLM in PyTorch from scratch, step by step
| Date | Stars |
|---|---|
| 2026-07-24 | 99741 |
| 2026-07-25 | 99796 |
| 2026-07-28 | 99796 |
| 2026-07-30 | 99796 |
| 2026-07-31 | 100181 |
| 2026-08-09 | 101765 |
| 2026-08-17 | 102822 |
| 2026-08-18 | 102891 |
| 2026-08-19 | 102992 |
| 2026-08-20 | 103076 |
| 2026-08-21 | 103153 |
| 2026-08-22 | 103201 |
| 2026-08-23 | 103452 |
| 2026-08-24 | 103629 |
| 2026-08-25 | 103741 |
| 2026-08-26 | 103819 |
| 2026-08-27 | 103887 |
| 2026-08-28 | 103934 |
| 2026-08-29 | 103979 |
| 2026-08-30 | 104039 |
| 2026-08-31 | 104109 |
| 2026-09-01 | 104148 |
| 2026-09-02 | 104199 |
| 2026-09-03 | 104262 |
| 2026-09-04 | 104328 |
| 2026-09-05 | 104362 |
| 2026-09-06 | 104430 |
| 2026-09-07 | 104510 |
| 2026-09-08 | 104574 |
| 2026-09-09 | 104630 |
| 2026-09-10 | 104686 |
| 2026-09-11 | 104758 |
| 2026-09-12 | 104810 |
| 2026-09-13 | 104867 |
| 2026-09-14 | 104944 |
| 2026-09-15 | 105005 |
| 2026-09-16 | 105070 |
| 2026-09-17 | 105128 |
| 2026-09-18 | 105182 |
| 2026-09-19 | 105221 |
| 2026-09-20 | 105276 |
Today
+55 stars today
This week
+409 stars this week
This month
+2.1k stars this month
Momentum
629.0
growth rate 0.39%/day
# Build a Large Language Model (From Scratch) This repository contains the code for developing, pretraining, and finetuning a GPT-like LLM and is the official code repository for the book [Build a Large Language Model (From Scratch)](https://amzn.to/4fqvn0D). <br> <br> <a href="https://amzn.to/4fqvn0D"><img src="https://sebastianraschka.com/images/LLMs-from-scratch-images/cover.jpg?123" width="250px"></a> <br> In [*Build a Large Language Model (From Scratch)*](http://mng.bz/orYv), you'll learn and understand how large language models (LLMs) work from the inside out by coding them from the ground up, step by step. In this book, I'll guide you through creating your own LLM, explaining each stage with clear text, diagrams, and examples. The method described in this book for training and developing your own small-but-functional model for educational purposes mirrors the approach used in creating large-scale foundational models such as those behind ChatGPT. In addition, this book includes code for loading the weights of larger pretrained models for finetuning. - Link to the official [source code repository](https://github.com/rasbt/LLMs-from-scratch) - [Link to the book at Manning (the publisher's website)](http://mng.bz/orYv) - [Link to the book page on Amazon.com](https://www.amazon.com/gp/product/1633437167) - ISBN 9781633437166 <a href="http://mng.bz/orYv#reviews"><img src="https://sebastianraschka.com//images/LLMs-from-scratch-images/other/reviews.png" width="220px"></a> <br> <br> To download a copy of this repository, click on the [Download ZIP](https://github.com/rasbt/LLMs-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/LLMs-from-scratch.git ``` <br> (If you downloaded the code bundle from the Manning website, please consider visiting the official code repository on GitHub at [https://github.com/rasbt/LLMs-from-scratch](https://github.com/rasbt/LLMs-from-scratch) for the latest updates.) <br> <br> # Table of Contents Please note that this `README.md` file is a Markdown (`.md`) file. If you have downloaded this code bundle from the Manning website and are viewing it on your local computer, I recommend using a Markdown editor or previewer for proper viewing. If you haven't installed a Markdown editor yet, [Ghostwriter](https://ghostwriter.kde.org) is a good free option. You can alternatively view this and other files on GitHub at [https://github.com/rasbt/LLMs-from-scratch](https://github.com/rasbt/LLMs-from-scratch) in your browser, which renders Markdown automatically. <br> <br> > **Tip:** > If you're seeking guidance on installing Python and Python packages and setting up your code environment, I suggest reading the [README.md](setup/README.md) file located in the [setup](setup) directory. <br> <br> [](https://github.com/rasbt/LLMs-from-scratch/actions/workflows/basic-tests-linux-uv.yml) [](https://github.com/rasbt/LLMs-from-scratch/actions/workflows/basic-tests-windows-uv-pip.yml) [](https://github.com/rasbt/LLMs-from-scratch/actions/workflows/basic-tests-macos-uv.yml) - [Troubleshooting Guide](./troubleshooting.md) | Chapter Title | Main Code (for Quick Access) | All Code + Supplementary | |------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------|------------------
Excerpt of 19,004 characters
Read on GitHubSebastian Raschka
883
Daniel Kleine · Germany
63
15
9
TITC
7
Rayed Bin Wahed · Therap (BD) Ltd. · Bangladesh
6
Ikko Eltociear Ashimine · Japan
3
Jinge Wang · Westlake University · China
3
Matthew Hernandez
3
Suman Debnath · Crusoe AI · United States
2
Greg Gandenberger · Israel
2
Henry Shi · United States
2
Jeroen Van Goey · @instadeepai · South Africa
2
Kasen
2
Legendrea · Kenya
2
Pietro Monticone · Harmonic · United States
2
Xiaotian Ma · UTHealth · United States
2
Amit Choubey · UoL · United Kingdom
1
Andreas Yin · Germany
1
Ankan Mukherjee · Sister Nivedita University · India
1
Would you bet a product on this? Bounded 0–100 and slow moving.
matched fp:aa4866b2c011ad72, topic:large-language-models, topic:llm, topic:gpt
matched fp:aa4866b2c011ad72, topic:deep-learning, topic:pytorch, topic:pretraining
matched fp:aa4866b2c011ad72, topic:finetuning, topic:instruction-tuning
matched fp:aa4866b2c011ad72, topic:natural-language-processing, topic:tokenizer