rasbt / LLMs-from-scratch
git clone https://github.com/rasbt/LLMs-from-scratch.git
π₯ on GitHub Trending today
Companion code for the book Build a Large Language Model (From Scratch), implementing and pretraining a GPT-like LLM in PyTorch step by step.
Why you might care
Suited to readers who want to understand LLM internals by coding each stage: tokenization, attention, pretraining, and finetuning. It also includes code for loading weights of larger pretrained models for finetuning.
+62
stars, 24h Β· #984
+441
stars, 7 days Β· #601
+1.7k
stars, 30 days Β· #638
110k
β
total Β· +0% this week
17k
forks Β· 16 open issues
Star history (as recorded here)
LanguageJupyter Notebook
Licenseβ
Created2023-07-23 (3y ago)
Last push2d ago
Watchers871
OwnerUser
Seen on GitHub Trending
- 2026-12-04 β #19 weekly in jupyter-notebook Β· +471 β
- 2026-12-03 β #19 weekly in jupyter-notebook Β· +480 β
- 2026-12-02 β #20 weekly in jupyter-notebook Β· +460 β
- 2026-12-01 β #20 weekly in jupyter-notebook Β· +482 β
- 2026-11-30 β #20 weekly in jupyter-notebook Β· +495 β
- 2026-11-29 β #20 weekly in jupyter-notebook Β· +468 β
- 2026-11-28 β #19 weekly in jupyter-notebook Β· +471 β
- 2026-11-26 β #19 weekly in jupyter-notebook Β· +458 β
- 2026-11-24 β #18 weekly in jupyter-notebook Β· +447 β
- 2026-11-23 β #18 weekly in jupyter-notebook Β· +423 β
- 2026-11-22 β #18 weekly in jupyter-notebook Β· +408 β
- 2026-11-21 β #18 weekly in jupyter-notebook Β· +401 β
- 2026-11-20 β #18 weekly in jupyter-notebook Β· +410 β
- 2026-11-19 β #18 weekly in jupyter-notebook Β· +428 β
- 2026-11-18 β #7 weekly in jupyter-notebook Β· +429 β
- 2026-11-17 β #11 weekly in jupyter-notebook Β· +466 β
- 2026-11-16 β #10 weekly in jupyter-notebook Β· +481 β
- 2026-11-15 β #9 daily in jupyter-notebook Β· +57 β
- 2026-11-15 β #8 weekly in jupyter-notebook Β· +490 β
- 2026-10-29 β #17 daily in jupyter-notebook Β· +55 β
- 2026-10-29 β #17 weekly in jupyter-notebook Β· +463 β
GitHub topics
aiartificial-intelligenceattention-mechanismdeep-learningfinetuningfrom-scratchgenerative-aigptinstruction-tuninglanguage-modellarge-language-modelsllmmachine-learningnatural-language-processingpretrainingpythonpytorchtokenizertransformers
Links
- GitHub: github.com/rasbt/LLMs-from-scratch
- Homepage: https://amzn.to/4fqvn0D
- Releases Β· Issues Β· Hacker News mentions
README
Loading READMEβ¦
Blurb generated by claude-haiku-5-5 1mo ago. Star deltas marked ~ are extrapolated from partial history.