rasbt/LLMs-from-scratch
Read the upstream summary on the left, browse the cached forks below it, and load each fork comparison into the right-hand panel.
rasbt/LLMs-from-scratch
rasbt/LLMs-from-scratch is a large, active Python repository that teaches how to build a ChatGPT-like GPT-style LLM in PyTorch from scratch, step by step. It is the official code repository for the book *Build a Large Language Model (From Scratch)*, with a substantial codebase organized by chapters plus appendices and a separate reasoning-from-scratch section. The repo is highly adopted and actively maintained, with 89,534 stars, 13,668 forks, and commits as recent as 2026-03-26.
Jump straight into Discofork's strongest cached fork picks, or open a compare view in one click.
Choose a fork to inspect
Choose this fork only if its added chapter material is the goal. If you want the maintained reference implementation, upstream is the better default; this fork is mainly for extra examples and a static snapshot.
Choose upstream unless you specifically want this fork as a personal snapshot; it adds no visible capabilities and is substantially behind current upstream maintenance.
Prefer upstream unless you specifically need this fork’s namespace or a frozen snapshot. The fork shows no added functionality and is materially behind an actively maintained source.
Prefer upstream unless you specifically need this exact historical snapshot; this fork adds no visible capability and is materially behind on fixes and recent features.
Prefer the upstream repository unless you explicitly want a frozen snapshot; this fork adds no apparent value beyond being an older copy and is materially behind current upstream.
Choose this fork if you want localized, course-style materials and extra preference-tuning content. Choose upstream if you want the freshest, most reliable official reference implementation with ongoing maintenance.
Choose this fork if you value Chinese-language study material and extra tutorial notebooks around Llama conversion and preference tuning. Choose upstream if you want the most current, actively maintained version of the project.
Choose the upstream repo unless you specifically want this fork as a personal mirror. This fork offers no added capabilities and is slightly behind on recent upstream fixes, so it is best for users who value near-identical code over active differentiation.
Choose upstream unless you specifically need an older frozen copy. This fork offers no added capabilities, and its main tradeoff is lagging 38 commits behind current upstream.