Topics / #from-scratch
From-scratch projects on GitHub
Building complex systems from first principles with minimal dependencies.
As of , the most-starred From-scratch projects on GitHub are LLMs-from-scratch (109.2K stars), ai-engineering-from-scratch (81.7K stars) and serenity (34K stars). GitHub.Locker tracks 16 From-scratch repositories with 314.2K stars combined. The fastest-growing on December 4 was ai-engineering-from-scratch, with +180 stars in a day.
Hot right now
Most stars gained in a day · Dec 4
ai-engineering-from-scratch
rohitg00/ai-engineering-from-scratch · ★ 81.7KA free, open-source AI engineering curriculum with 523 lessons across 20 phases (about 342 hours), teaching you to build AI systems from raw math up to autonomous agent swarms, in Python, TypeScript, Rust, and Julia.
+51LLMs-from-scratch
rasbt/LLMs-from-scratch · ★ 109.2KThis is the official code repository for the book 'Build a Large Language Model (From Scratch)', which teaches you to implement a GPT-like LLM in PyTorch step by step, from tokenization through pretraining and finetuning.
+16how-to-train-your-gpt
raiyanyahya/how-to-train-your-gpt · ★ 4.2KA 12-chapter, 7,500+ line interactive textbook that teaches you how to build, train and run a modern GPT-style language model completely from scratch, with every line of code commented and explained in plain English.
+14kimi-k3-in-c
FareedKhan-dev/kimi-k3-in-c · ★ 12.7KAn inference engine for the 2.78-trillion-parameter Kimi K3 model, written in portable C99. It runs on a plain CPU in as little as 8 GB of RAM — no GPU, no BLAS, no framework — streaming the 1.56 TB checkpoint straight off disk.
The all-time top
16 projects · by stars
- 109.2K
#1 · rasbt/LLMs-from-scratchLLMs-from-scratch
This is the official code repository for the book 'Build a Large Language Model (From Scratch)', which teaches you to implement a GPT-like LLM in PyTorch step by step, from tokenization through pretraining and finetuning.
- 81.7K
#2 · rohitg00/ai-engineering-from-scratch
ai-engineering-from-scratch
A free, open-source AI engineering curriculum with 523 lessons across 20 phases (about 342 hours), teaching you to build AI systems from raw math up to autonomous agent swarms, in Python, TypeScript, Rust, and Julia.
- 34K
#3 · SerenityOS/serenityserenity
SerenityOS is a graphical Unix-like operating system for 64-bit x86, Arm, and RISC-V computers, built entirely from scratch.
- 4

ML-From-Scratch
33.4Keriklindernoren/ML-From-Scratch · PythonA Python library of fundamental machine learning models and algorithms implemented from scratch in NumPy, aiming to cover everything from linear regression to deep learning.
- 5

llama2.c
20.3Kkarpathy/llama2.c · CIt's a minimal project to train a small Llama 2 model in PyTorch and then run inference on it using a single pure C file, with no dependencies.
- 6

kimi-k3-in-c
12.7KFareedKhan-dev/kimi-k3-in-c · CAn inference engine for the 2.78-trillion-parameter Kimi K3 model, written in portable C99. It runs on a plain CPU in as little as 8 GB of RAM — no GPU, no BLAS, no framework — streaming the 1.56 TB checkpoint straight off disk.
- 7

maths-cs-ai-compendium
7.7KHenryNdubuaku/maths-cs-ai-compendium · TypeScriptAn open, unconventional online textbook covering maths, computing and AI from the ground up — intuition first, real-world context, for practitioners who want deep understanding rather than exam survival.
- 8

ai-agents-from-scratch
4.9Kpguso/ai-agents-from-scratch · JavaScriptA hands-on tutorial repo that teaches you to build AI agents from first principles using local LLMs via node-llama-cpp, with no frameworks involved, so you understand function calling, memory, and ReAct before using production frameworks.
- 9

how-to-train-your-gpt
4.2Kraiyanyahya/how-to-train-your-gpt · Jupyter NotebookA 12-chapter, 7,500+ line interactive textbook that teaches you how to build, train and run a modern GPT-style language model completely from scratch, with every line of code commented and explained in plain English.
- 10

zero-to-sglang
2.3Kdatawhalechina/zero-to-sglang · PythonThe official SGLang x Datawhale course on LLM inference: it teaches how inference engines work, has you build a mini-sglang from scratch, and then digs into the real SGLang source code.
- 11

mini-AGI
1.3Kvolotat/mini-AGI · Pythonmini-AGI is a continual learning, byte-level language model that assembles its own architecture, trains from scratch on a single 8GB VRAM GPU, and keeps learning from everything it reads, without a separate fine-tuning phase.
- 12
TrenTorch
859TrenTorch/TrenTorch · PythonTrenTorch is a from-scratch ML framework and learning curriculum built on top of Harvard's TinyTorch (CS249r), taking the same teaching bricks further with cleaner internals and more modules covering deep learning, CNNs, transformers and inference.
- 13

llm-architecture-from-scratch
856YeonwooSung/llm-architecture-from-scratch · PythonA collection of PyTorch implementations of modern LLM architectures (GPT-2, Llama 3/3.2, Llama 4, OLMo 2, Phi-4, DeepSeek v3, Gemma 3, xLSTM, Mistral 3.1) built from scratch to understand how they work internally.
- 14

OpenArch
428anuj0456/OpenArch · PythonA set of hand-written PyTorch implementations of modern open-source LLM architectures (Llama, Qwen, DeepSeek, Gemma, GPT-OSS, Kimi and more), written from scratch for readability and learning.
- 15

BitKindle
218tombkeeper/BitKindle · CBitKindle is a complete Windows x64 C compiler toolchain — assemblers, a C compiler, a runtime library, and a PE linker — that bootstraps itself starting from a 3,584-byte machine-code seed, with no pre-existing compiler or SDK required.
- 16

lytlnyblOS
122red-mutt/lytlnyblOS · ClytlnyblOS ('little nibble OS') is a small 32-bit operating system built from scratch to teach beginners OS development practically. You write every line of it yourself while following the companion book.
Related topics
Often tagged together