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.

16Projects
314.2KStars in total
+291Stars in a day

Hot right now

Most stars gained in a day · Dec 4

The all-time top

16 projects · by stars

  1. #1 · rasbt/LLMs-from-scratch

    LLMs-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.

    109.2K
  2. #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.

    81.7K
  3. #3 · SerenityOS/serenity

    serenity

    SerenityOS is a graphical Unix-like operating system for 64-bit x86, Arm, and RISC-V computers, built entirely from scratch.

    34K
  1. 4

    ML-From-Scratch

    33.4Keriklindernoren/ML-From-Scratch · Python

    A Python library of fundamental machine learning models and algorithms implemented from scratch in NumPy, aiming to cover everything from linear regression to deep learning.

  2. 5

    llama2.c

    20.3Kkarpathy/llama2.c · C

    It'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.

  3. 6

    kimi-k3-in-c

    12.7KFareedKhan-dev/kimi-k3-in-c · C

    An 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.

  4. 7

    maths-cs-ai-compendium

    7.7KHenryNdubuaku/maths-cs-ai-compendium · TypeScript

    An 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.

  5. 8

    ai-agents-from-scratch

    4.9Kpguso/ai-agents-from-scratch · JavaScript

    A 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.

  6. 9

    how-to-train-your-gpt

    4.2Kraiyanyahya/how-to-train-your-gpt · Jupyter Notebook

    A 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.

  7. 10

    zero-to-sglang

    2.3Kdatawhalechina/zero-to-sglang · Python

    The 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.

  8. 11

    mini-AGI

    1.3Kvolotat/mini-AGI · Python

    mini-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.

  9. 12

    TrenTorch

    859TrenTorch/TrenTorch · Python

    TrenTorch 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.

  10. 13

    llm-architecture-from-scratch

    856YeonwooSung/llm-architecture-from-scratch · Python

    A 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.

  11. 14

    OpenArch

    428anuj0456/OpenArch · Python

    A 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.

  12. 15

    BitKindle

    218tombkeeper/BitKindle · C

    BitKindle 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.

  13. 16

    lytlnyblOS

    122red-mutt/lytlnyblOS · C

    lytlnyblOS ('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.

Often tagged together