rasbt/LLMs-from-scratch
Implement a ChatGPT-like LLM in PyTorch from scratch, step by step
Build with Backblaze B2
SDKs, agent skills, IDE extensions, and reference pipelines from Backblaze Labs. All open source.
Loading star history...
Where it stands
Rank, growth pace and release cadence relative to everything GStars tracks.
The project lists 73 contributors on GitHub.
Peaked at #4 in the weekly ranking the week of Sep 28, its best in the past year.
Use Cases & Benefits
- Implements a GPT-like large language model in PyTorch from scratch with step-by-step educational notebooks.
- Provides a comprehensive, hands-on approach to understanding and building LLMs without relying on external libraries.
- Use for learning the fundamentals of attention mechanisms and transformer architectures through coding exercises.
- Use for pretraining and finetuning custom language models on unlabeled and labeled text datasets.
- Use for experimenting with instruction tuning and building interactive interfaces for GPT-based models.
Should you depend on it?
License terms, project hygiene and risks, from GitHub metadata and GStars' snapshots.
License
Other
GitHub could not identify this license; read the LICENSE file before depending on it.
Community files
- README: present
Watch-outs
- License not identified by GitHub; read the LICENSE file before depending on it.
- No GitHub releases; pin a commit or tag instead of a release.
General guidance from repository metadata, not legal advice. How we score
From the README
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).
In Build a Large Language Model (From Scratch), 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.
To download a copy of this repository, click on the Download ZIP button or execute the following command in your terminal:
(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 for the latest updates.)
Daily snapshots
Stars gained per day, and how forks and open issues moved, from GStars' daily snapshots
Forks
16.7K+979
Open issues
4+2
Compared with peers in AI
Fastest-growing repositories GStars tracks in this cohort for the week of Nov 8, by 7-day star growth
| Repository | Stars | +7d | Health | Last release |
|---|---|---|---|---|
| D4Vinci/Scrapling | 101.1K | +6.3K | 75 | 6 days ago |
| thedotmack/claude-mem | 115.8K | +4.7K | 75 | today |
| heygen-com/hyperframes | 82.3K | +4.0K | 75 | today |
| harry0703/MoneyPrinterTurbo | 142.0K | +3.8K | 75 | 3 days ago |
| github/spec-kit | 149.2K | +2.6K | 75 | today |
| rasbt/LLMs-from-scratch | 108.2K | — | 75 | — |
| Category median | 115.8K | +4.0K | 75 | — |
Discover Repositories
Search across tracked repositories by name or description