rohitg00/ai-engineering-from-scratchPublic

Learn it. Build it. Ship it for others.

AI summary: A comprehensive, code-first curriculum to master AI engineering and build production-ready LLM applications.

Stars
46K
+143 today
Forks
8K
Watchers
281
Open issues
28
Open PRs
75
Contributors
~15
Commits
1.7K
Branches
44

PythonMITCreated Mar 18, 2026Last push 3d agoLatest release v2026.07+1.2K stars this week+1.2K this month

Star history

since Mar 15, 2026
020K40KMar 2026May 2026Jun 2026Aug 2026
46K stars as of Aug 6, 2026, tracked back to Mar 15, 2026. Historical curve reconstructed from public GitHub event archives, calibrated to the current total.

Contribution activity

commits per day, last 52 weeks
AugSepOctNovDecJanFebMarAprMayJunJulMonWedFri2025-08-03: 0 commits2025-08-04: 0 commits2025-08-05: 0 commits2025-08-06: 0 commits2025-08-07: 0 commits2025-08-08: 0 commits2025-08-09: 0 commits2025-08-10: 0 commits2025-08-11: 0 commits2025-08-12: 0 commits2025-08-13: 0 commits2025-08-14: 0 commits2025-08-15: 0 commits2025-08-16: 0 commits2025-08-17: 0 commits2025-08-18: 0 commits2025-08-19: 0 commits2025-08-20: 0 commits2025-08-21: 0 commits2025-08-22: 0 commits2025-08-23: 0 commits2025-08-24: 0 commits2025-08-25: 0 commits2025-08-26: 0 commits2025-08-27: 0 commits2025-08-28: 0 commits2025-08-29: 0 commits2025-08-30: 0 commits2025-08-31: 0 commits2025-09-01: 0 commits2025-09-02: 0 commits2025-09-03: 0 commits2025-09-04: 0 commits2025-09-05: 0 commits2025-09-06: 0 commits2025-09-07: 0 commits2025-09-08: 0 commits2025-09-09: 0 commits2025-09-10: 0 commits2025-09-11: 0 commits2025-09-12: 0 commits2025-09-13: 0 commits2025-09-14: 0 commits2025-09-15: 0 commits2025-09-16: 0 commits2025-09-17: 0 commits2025-09-18: 0 commits2025-09-19: 0 commits2025-09-20: 0 commits2025-09-21: 0 commits2025-09-22: 0 commits2025-09-23: 0 commits2025-09-24: 0 commits2025-09-25: 0 commits2025-09-26: 0 commits2025-09-27: 0 commits2025-09-28: 0 commits2025-09-29: 0 commits2025-09-30: 0 commits2025-10-01: 0 commits2025-10-02: 0 commits2025-10-03: 0 commits2025-10-04: 0 commits2025-10-05: 0 commits2025-10-06: 0 commits2025-10-07: 0 commits2025-10-08: 0 commits2025-10-09: 0 commits2025-10-10: 0 commits2025-10-11: 0 commits2025-10-12: 0 commits2025-10-13: 0 commits2025-10-14: 0 commits2025-10-15: 0 commits2025-10-16: 0 commits2025-10-17: 0 commits2025-10-18: 0 commits2025-10-19: 0 commits2025-10-20: 0 commits2025-10-21: 0 commits2025-10-22: 0 commits2025-10-23: 0 commits2025-10-24: 0 commits2025-10-25: 0 commits2025-10-26: 0 commits2025-10-27: 0 commits2025-10-28: 0 commits2025-10-29: 0 commits2025-10-30: 0 commits2025-10-31: 0 commits2025-11-01: 0 commits2025-11-02: 0 commits2025-11-03: 0 commits2025-11-04: 0 commits2025-11-05: 0 commits2025-11-06: 0 commits2025-11-07: 0 commits2025-11-08: 0 commits2025-11-09: 0 commits2025-11-10: 0 commits2025-11-11: 0 commits2025-11-12: 0 commits2025-11-13: 0 commits2025-11-14: 0 commits2025-11-15: 0 commits2025-11-16: 0 commits2025-11-17: 0 commits2025-11-18: 0 commits2025-11-19: 0 commits2025-11-20: 0 commits2025-11-21: 0 commits2025-11-22: 0 commits2025-11-23: 0 commits2025-11-24: 0 commits2025-11-25: 0 commits2025-11-26: 0 commits2025-11-27: 0 commits2025-11-28: 0 commits2025-11-29: 0 commits2025-11-30: 0 commits2025-12-01: 0 commits2025-12-02: 0 commits2025-12-03: 0 commits2025-12-04: 0 commits2025-12-05: 0 commits2025-12-06: 0 commits2025-12-07: 0 commits2025-12-08: 0 commits2025-12-09: 0 commits2025-12-10: 0 commits2025-12-11: 0 commits2025-12-12: 0 commits2025-12-13: 0 commits2025-12-14: 0 commits2025-12-15: 0 commits2025-12-16: 0 commits2025-12-17: 0 commits2025-12-18: 0 commits2025-12-19: 0 commits2025-12-20: 0 commits2025-12-21: 0 commits2025-12-22: 0 commits2025-12-23: 0 commits2025-12-24: 0 commits2025-12-25: 0 commits2025-12-26: 0 commits2025-12-27: 0 commits2025-12-28: 0 commits2025-12-29: 0 commits2025-12-30: 0 commits2025-12-31: 0 commits2026-01-01: 0 commits2026-01-02: 0 commits2026-01-03: 0 commits2026-01-04: 0 commits2026-01-05: 0 commits2026-01-06: 0 commits2026-01-07: 0 commits2026-01-08: 0 commits2026-01-09: 0 commits2026-01-10: 0 commits2026-01-11: 0 commits2026-01-12: 0 commits2026-01-13: 0 commits2026-01-14: 0 commits2026-01-15: 0 commits2026-01-16: 0 commits2026-01-17: 0 commits2026-01-18: 0 commits2026-01-19: 0 commits2026-01-20: 0 commits2026-01-21: 0 commits2026-01-22: 0 commits2026-01-23: 0 commits2026-01-24: 0 commits2026-01-25: 0 commits2026-01-26: 0 commits2026-01-27: 0 commits2026-01-28: 0 commits2026-01-29: 0 commits2026-01-30: 0 commits2026-01-31: 0 commits2026-02-01: 0 commits2026-02-02: 0 commits2026-02-03: 0 commits2026-02-04: 0 commits2026-02-05: 0 commits2026-02-06: 0 commits2026-02-07: 0 commits2026-02-08: 0 commits2026-02-09: 0 commits2026-02-10: 0 commits2026-02-11: 0 commits2026-02-12: 0 commits2026-02-13: 0 commits2026-02-14: 0 commits2026-02-15: 0 commits2026-02-16: 0 commits2026-02-17: 0 commits2026-02-18: 0 commits2026-02-19: 0 commits2026-02-20: 0 commits2026-02-21: 0 commits2026-02-22: 0 commits2026-02-23: 0 commits2026-02-24: 0 commits2026-02-25: 0 commits2026-02-26: 0 commits2026-02-27: 0 commits2026-02-28: 0 commits2026-03-01: 0 commits2026-03-02: 0 commits2026-03-03: 0 commits2026-03-04: 0 commits2026-03-05: 0 commits2026-03-06: 0 commits2026-03-07: 0 commits2026-03-08: 0 commits2026-03-09: 0 commits2026-03-10: 0 commits2026-03-11: 0 commits2026-03-12: 0 commits2026-03-13: 0 commits2026-03-14: 0 commits2026-03-15: 0 commits2026-03-16: 0 commits2026-03-17: 0 commits2026-03-18: 6 commits2026-03-19: 60 commits2026-03-20: 4 commits2026-03-21: 0 commits2026-03-22: 0 commits2026-03-23: 1 commit2026-03-24: 0 commits2026-03-25: 6 commits2026-03-26: 0 commits2026-03-27: 7 commits2026-03-28: 8 commits2026-03-29: 5 commits2026-03-30: 15 commits2026-03-31: 37 commits2026-04-01: 7 commits2026-04-02: 6 commits2026-04-03: 0 commits2026-04-04: 0 commits2026-04-05: 3 commits2026-04-06: 0 commits2026-04-07: 0 commits2026-04-08: 0 commits2026-04-09: 0 commits2026-04-10: 0 commits2026-04-11: 0 commits2026-04-12: 0 commits2026-04-13: 0 commits2026-04-14: 0 commits2026-04-15: 0 commits2026-04-16: 0 commits2026-04-17: 5 commits2026-04-18: 0 commits2026-04-19: 2 commits2026-04-20: 0 commits2026-04-21: 105 commits2026-04-22: 105 commits2026-04-23: 213 commits2026-04-24: 201 commits2026-04-25: 39 commits2026-04-26: 0 commits2026-04-27: 1 commit2026-04-28: 1 commit2026-04-29: 0 commits2026-04-30: 0 commits2026-05-01: 0 commits2026-05-02: 0 commits2026-05-03: 0 commits2026-05-04: 0 commits2026-05-05: 0 commits2026-05-06: 0 commits2026-05-07: 0 commits2026-05-08: 2 commits2026-05-09: 14 commits2026-05-10: 3 commits2026-05-11: 4 commits2026-05-12: 1 commit2026-05-13: 54 commits2026-05-14: 2 commits2026-05-15: 0 commits2026-05-16: 0 commits2026-05-17: 4 commits2026-05-18: 0 commits2026-05-19: 0 commits2026-05-20: 38 commits2026-05-21: 3 commits2026-05-22: 89 commits2026-05-23: 5 commits2026-05-24: 0 commits2026-05-25: 90 commits2026-05-26: 222 commits2026-05-27: 48 commits2026-05-28: 0 commits2026-05-29: 0 commits2026-05-30: 0 commits2026-05-31: 0 commits2026-06-01: 4 commits2026-06-02: 10 commits2026-06-03: 5 commits2026-06-04: 0 commits2026-06-05: 2 commits2026-06-06: 2 commits2026-06-07: 11 commits2026-06-08: 4 commits2026-06-09: 0 commits2026-06-10: 2 commits2026-06-11: 0 commits2026-06-12: 0 commits2026-06-13: 0 commits2026-06-14: 2 commits2026-06-15: 0 commits2026-06-16: 0 commits2026-06-17: 0 commits2026-06-18: 0 commits2026-06-19: 0 commits2026-06-20: 0 commits2026-06-21: 0 commits2026-06-22: 0 commits2026-06-23: 0 commits2026-06-24: 0 commits2026-06-25: 2 commits2026-06-26: 0 commits2026-06-27: 0 commits2026-06-28: 0 commits2026-06-29: 0 commits2026-06-30: 0 commits2026-07-01: 0 commits2026-07-02: 0 commits2026-07-03: 0 commits2026-07-04: 0 commits2026-07-05: 0 commits2026-07-06: 0 commits2026-07-07: 0 commits2026-07-08: 0 commits2026-07-09: 0 commits2026-07-10: 0 commits2026-07-11: 0 commits2026-07-12: 0 commits2026-07-13: 0 commits2026-07-14: 0 commits2026-07-15: 0 commits2026-07-16: 0 commits2026-07-17: 0 commits2026-07-18: 0 commits2026-07-19: 0 commits2026-07-20: 0 commits2026-07-21: 0 commits2026-07-22: 0 commits2026-07-23: 0 commits2026-07-24: 0 commits2026-07-25: 11 commits2026-07-26: 10 commits2026-07-27: 0 commits2026-07-28: 0 commits2026-07-29: 0 commits2026-07-30: 0 commits2026-07-31: 0 commits2026-08-01: 0 commits
1,481 commits in the last yearLessMore

Signals and awards

derived from tracked data
  • Widely adopted

    46,045 stars

  • Very active

    1,481 commits in 52 weeks

  • Well documented

    High community health score

  • Permissive license

    MIT

  • Repeat trending

    17 trending appearances

What ai-engineering-from-scratch does

This repository provides a highly structured, open-source curriculum dedicated to taking developers from basic programming to advanced AI engineering. It focuses heavily on practical implementation, guiding learners through the process of building scalable, production-ready applications powered by Large Language Models. The course covers foundational concepts like prompt engineering and RAG, before progressing to complex topics such as agentic workflows, model evaluation, and deployment strategies. By emphasizing hands-on projects and real-world architectural patterns over pure theory, it equips developers with the concrete skills needed to construct robust AI systems.

This curriculum is ideal for software engineers, data scientists, and technical product builders who possess basic programming skills (mainly Python).

  • Code-First Pedagogy: Centers learning around functional, reproducible code examples and practical projects rather than abstract theory.
  • Progressive Curriculum: Structured logically from basic API usage to advanced agent orchestration and custom RAG implementations.
  • Production-Oriented Focus: Covers essential engineering practices for AI, including evaluation metrics, guardrails, and deployment CI/CD.
  • Comprehensive RAG Patterns: Details various Retrieval-Augmented Generation strategies including naive, advanced, and agentic RAG architectures.
  • Open Source Tooling Integration: Teaches the integration of popular open-source frameworks like LangChain and LlamaIndex natively.

Where teams use it

Upskilling Software Engineers

For traditional developers wanting to transition into the field of AI engineering by learning how to effectively integrate LLMs into software products.

Building RAG Applications

For teams needing to construct robust, enterprise-grade knowledge retrieval systems using advanced RAG techniques and vector databases.

Developing AI Agents

For builders looking to design autonomous agent systems capable of reasoning, using tools, and executing complex multi-step workflows.

Implementing AI Guardrails

For security-conscious engineers needing to learn how to evaluate and constrain model outputs in production environments safely.

Getting started: Clone the repository and start with the introductory notebooks in the '01-foundations' directory.

README

main branch

AI Engineering from Scratch — reference manual banner

MIT License 503 lessons 20 phases GitHub stars Website

From the creator of Agent Memory - #1 Persistent memory ⭐ GitHub stars which naturally works with any agents or chat assistants.

░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒

84% of students already use AI tools. Only 18% feel prepared to use them professionally. This curriculum closes that gap.

503 lessons. 20 phases. ~320 hours. Python, TypeScript, Rust, Julia. Every lesson ships a reusable artifact: a prompt, a skill, an agent, an MCP server. Free, open source, MIT.

You don't just learn AI. You build it. End-to-end. By hand.

150,639 readers  ·  241,669 page views in the last 30 days  ·  as of 2026-06-07

How this works

Most AI material teaches in scattered pieces. A paper here, a fine-tuning post there, a flashy agent demo somewhere else. The pieces rarely line up. You ship a chatbot but can't explain its loss curve. You hook a function to an agent but can't say what attention does inside the model that's calling it.

This curriculum is the spine. 20 phases, 503 lessons, four languages: Python, TypeScript, Rust, Julia. Linear algebra at one end, autonomous swarms at the other. Every algorithm gets built from raw math first. Backprop. Tokenizer. Attention. Agent loop. By the time PyTorch shows up, you already know what it's doing under the hood.

Each lesson runs the same loop: read the problem, derive the math, write the code, run the test, keep the artifact. No five-minute videos, no copy-paste deploys, no hand-holding. Free, open source, and built to run on your own laptop.

░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒

The shape of the curriculum

Twenty phases stack on top of each other. Math is the floor. Agents and production are the roof. Skip ahead if you already know the lower layers, but don't skip and then wonder why something at the top is breaking.

%%{init: {'theme':'base','themeVariables':{'primaryColor':'#fafaf5','primaryTextColor':'#1a1a1a','primaryBorderColor':'#3553ff','lineColor':'#3553ff','fontFamily':'JetBrains Mono','fontSize':'12px'}}}%%
flowchart TB
  P0["Phase 0 — Setup & Tooling"] --> P1["Phase 1 — Math Foundations"]
  P1 --> P2["Phase 2 — ML Fundamentals"]
  P2 --> P3["Phase 3 — Deep Learning Core"]
  P3 --> P4["Phase 4 — Vision"]
  P3 --> P5["Phase 5 — NLP"]
  P3 --> P6["Phase 6 — Speech & Audio"]
  P3 --> P9["Phase 9 — RL"]
  P5 --> P7["Phase 7 — Transformers"]
  P7 --> P8["Phase 8 — GenAI"]
  P7 --> P10["Phase 10 — LLMs from Scratch"]
  P10 --> P11["Phase 11 — LLM Engineering"]
  P10 --> P12["Phase 12 — Multimodal"]
  P11 --> P13["Phase 13 — Tools & Protocols"]
  P13 --> P14["Phase 14 — Agent Engineering"]
  P14 --> P15["Phase 15 — Autonomous Systems"]
  P15 --> P16["Phase 16 — Multi-Agent & Swarms"]
  P14 --> P17["Phase 17 — Infrastructure & Production"]
  P15 --> P18["Phase 18 — Ethics & Alignment"]
  P16 --> P19["Phase 19 — Capstone Projects"]
  P17 --> P19
  P18 --> P19
Loading
░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒

The shape of a lesson

Each lesson lives in its own folder, with the same structure across the entire curriculum:

phases/<NN>-<phase-name>/<NN>-<lesson-name>/
├── code/      runnable implementations (Python, TypeScript, Rust, Julia)
├── docs/
│   └── en.md  lesson narrative
└── outputs/   prompts, skills, agents, or MCP servers this lesson produces

Every lesson follows six beats. The Build It / Use It split is the spine — you implement the algorithm from scratch first, then run the same thing through the production library. You understand what the framework is doing because you wrote the smaller version yourself.

%%{init: {'theme':'base','themeVariables':{'primaryColor':'#fafaf5','primaryTextColor':'#1a1a1a','primaryBorderColor':'#3553ff','lineColor':'#3553ff','fontFamily':'JetBrains Mono','fontSize':'13px'}}}%%
flowchart LR
  M["MOTTO<br/><sub>one-line core idea</sub>"] --> Pr["PROBLEM<br/><sub>concrete pain</sub>"]
  Pr --> C["CONCEPT<br/><sub>diagrams &amp; intuition</sub>"]
  C --> B["BUILD IT<br/><sub>raw math, no frameworks</sub>"]
  B --> U["USE IT<br/><sub>same thing in PyTorch / sklearn</sub>"]
  U --> S["SHIP IT<br/><sub>prompt · skill · agent · MCP</sub>"]
Loading

Getting started

Three ways in. Pick one.

Option A — read. Open any completed lesson on aiengineeringfromscratch.com or expand a phase under Contents. No setup, no cloning.

Option B — clone and run.

git clone https://github.com/rohitg00/ai-engineering-from-scratch.git
cd ai-engineering-from-scratch
python phases/01-math-foundations/01-linear-algebra-intuition/code/vectors.py

Option C — find your level (recommended). Skip ahead intelligently. Inside Claude, Cursor, Codex, OpenClaw, Hermes, or any agent with the curriculum skills installed:

/find-your-level

Ten questions. Maps your knowledge to a starting phase, builds a personalized path with hour estimates. After each phase:

/check-understanding 3        # quiz yourself on phase 3
ls phases/03-deep-learning-core/05-loss-functions/outputs/
# ├── prompt-loss-function-selector.md
# └── prompt-loss-debugger.md

Prerequisites

  • You can write code (any language; Python helps).
  • You want to understand how AI actually works, not just call APIs.

Built-in agent skills (Claude, Cursor, Codex, OpenClaw, Hermes)

Skill What it does
/find-your-level Ten-question placement quiz. Maps your knowledge to a starting phase and produces a personalized path with hour estimates.
/check-understanding <phase> Per-phase quiz, eight questions, with feedback and specific lessons to review.
░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒

Read it as a book

The whole course compiles into a six-volume book series. EPUB and PDF are built by CI from the same lesson sources and attached to every GitHub release; the links below always resolve to the newest release. Volume numbers index the series, not versions: each copy carries a dated edition stamp, and older editions stay downloadable from their release.

Vol Title Phases Download
1 Foundations · Math, Tooling, and Classical Machine Learning 00-02 EPUB · PDF
2 Deep Learning · Networks, Vision, and Speech 03, 04, 06 EPUB · PDF
3 Language · NLP Foundations and the Transformer 05, 07 EPUB · PDF
4 Large Language Models · Generation, Reinforcement, Pretraining, and Engineering 08-11 EPUB · PDF
5 Agents · Multimodality, Protocols, Autonomy, and Swarms 12-16 EPUB · PDF
6 Production · Infrastructure, Safety, and Capstones 17-19 EPUB · PDF

The book is the snapshot; this repository is the living edition. Every chapter ends with links back to the lesson's animated figures, quiz, and runnable code. Build locally with python3 scripts/build_book.py (pandoc required); pipeline details in book/README.md.

░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒

Every lesson ships something

Other curricula end with "congratulations, you learned X." Each lesson here ends with a reusable tool you can install or paste into your daily workflow.

FIG_001.A prompts
FIG_001 · A
PROMPTS
FIG_001.B skills
FIG_001 · B
SKILLS
FIG_001.C agents
FIG_001 · C
AGENTS
FIG_001.D MCP servers
FIG_001 · D
MCP SERVERS
Paste into any AI assistant for expert-level help on a narrow task. Drop into Claude, Cursor, Codex, OpenClaw, Hermes, or any agent that reads SKILL.md. Deploy as autonomous workers — you wrote the loop yourself in Phase 14. Plug into any MCP-compatible client. Built end-to-end in Phase 13.

Install the lot with python3 scripts/install_skills.py. Real tools, not homework. By the end of the curriculum, you have a portfolio of 503 artifacts you actually understand because you built them.

FIG_002 · A worked sample

Phase 14, lesson 1: the agent loop. ~120 lines of pure Python, no dependencies.

code/agent_loop.py   build it

def run(query, tools):
    history = [user(query)]
    for step in range(MAX_STEPS):
        msg = llm(history)
        if msg.tool_calls:
            for call in msg.tool_calls:
                result = tools[call.name](**call.args)
                history.append(tool_result(call.id, result))
            continue
        return msg.content
    raise StepLimitExceeded

outputs/skill-agent-loop.md   ship it

---
name: agent-loop
description: ReAct-style loop for any tool list
phase: 14
lesson: 01
---

Implement a minimal agent loop that...

outputs/prompt-debug-agent.md

You are an agent debugger. Given the trace
of an agent run, identify the step where
the agent went wrong and explain why...
░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒

Contents

Twenty phases. Click any phase to expand its lesson list.

Phase 0: Setup & Tooling 12 lessons

Get your environment ready for everything that follows.

# Lesson Type Lang
01 Dev Environment Build Python
02 Git & Collaboration Learn
03 GPU Setup & Cloud Build Python
04 APIs & Keys Build Python
05 Jupyter Notebooks Build Python
06 Python Environments Build Shell
07 Docker for AI Build Docker
08 Editor Setup Build
09 Data Management Build Python
10 Terminal & Shell Learn
11 Linux for AI Learn
12 Debugging & Profiling Build Python
Phase 1 — Math Foundations  22 lessons  The intuition behind every AI algorithm, through code.
# Lesson Type Lang
01 Linear Algebra Intuition Learn Python, Julia
02 Vectors, Matrices & Operations Build Python, Julia
03 Matrix Transformations & Eigenvalues Build Python, Julia
04 Calculus for ML: Derivatives & Gradients Learn Python
05 Chain Rule & Automatic Differentiation Build Python
06 Probability & Distributions Learn Python
07 Bayes' Theorem & Statistical Thinking Build Python
08 Optimization: Gradient Descent Family Build Python
09 Information Theory: Entropy, KL Divergence Learn Python
10 Dimensionality Reduction: PCA, t-SNE, UMAP Build Python
11 Singular Value Decomposition Build Python, Julia
12 Tensor Operations Build Python
13 Numerical Stability Build Python
14 Norms & Distances Build Python
15 Statistics for ML Build Python
16 Sampling Methods Build Python
17 Linear Systems Build Python
18 Convex Optimization Build Python
19 Complex Numbers for AI Learn Python
20 The Fourier Transform Build Python
21 Graph Theory for ML Build Python
22 Stochastic Processes Learn Python
Phase 2 — ML Fundamentals  18 lessons  Classical ML — still the backbone of most production AI.
# Lesson Type Lang
01 What Is Machine Learning Learn Python
02 Linear Regression from Scratch Build Python
03 Logistic Regression & Classification Build Python
04 Decision Trees & Random Forests Build Python
05 Support Vector Machines Build Python
06 KNN & Distance Metrics Build Python
07 Unsupervised Learning: K-Means, DBSCAN Build Python
08 Feature Engineering & Selection Build Python
09 Model Evaluation: Metrics, Cross-Validation Build Python
10 Bias, Variance & the Learning Curve Learn Python
11 Ensemble Methods: Boosting, Bagging, Stacking Build Python
12 Hyperparameter Tuning Build Python
13 ML Pipelines & Experiment Tracking Build Python
14 Naive Bayes Build Python
15 Time Series Fundamentals Build Python
16 Anomaly Detection Build Python
17 Handling Imbalanced Data Build Python
18 Feature Selection Build Python
Phase 3 — Deep Learning Core  13 lessons  Neural networks from first principles. No frameworks until you build one.
# Lesson Type Lang
01 The Perceptron: Where It All Started Build Python
02 Multi-Layer Networks & Forward Pass Build Python
03 Backpropagation from Scratch Build Python
04 Activation Functions: ReLU, Sigmoid, GELU & Why Build Python
05 Loss Functions: MSE, Cross-Entropy, Contrastive Build Python
06 Optimizers: SGD, Momentum, Adam, AdamW Build Python
07 Regularization: Dropout, Weight Decay, BatchNorm Build Python
08 Weight Initialization & Training Stability Build Python
09 Learning Rate Schedules & Warmup Build Python
10 Build Your Own Mini Framework Build Python
11 Introduction to PyTorch Build Python
12 Introduction to JAX Build Python
13 Debugging Neural Networks Build Python
Phase 4 — Computer Vision  28 lessons  From pixels to understanding — image, video, 3D, VLMs, and world models.
# Lesson Type Lang
01 Image Fundamentals: Pixels, Channels, Color Spaces Learn Python
02 Convolutions from Scratch Build Python
03 CNNs: LeNet to ResNet Build Python
04 Image Classification Build Python
05 Transfer Learning & Fine-Tuning Build Python
06 Object Detection — YOLO from Scratch Build Python
07 Semantic Segmentation — U-Net Build Python
08 Instance Segmentation — Mask R-CNN Build Python
09 Image Generation — GANs Build Python
10 Image Generation — Diffusion Models Build Python
11 Stable Diffusion — Architecture & Fine-Tuning Build Python
12 Video Understanding — Temporal Modeling Build Python
13 3D Vision: Point Clouds, NeRFs Build Python
14 Vision Transformers (ViT) Build Python
15 Real-Time Vision: Edge Deployment Build Python
16 Build a Complete Vision Pipeline Build Python
17 Self-Supervised Vision — SimCLR, DINO, MAE Build Python
18 Open-Vocabulary Vision — CLIP Build Python
19 OCR & Document Understanding Build Python
20 Image Retrieval & Metric Learning Build Python
21 Keypoint Detection & Pose Estimation Build Python
22 3D Gaussian Splatting from Scratch Build Python
23 Diffusion Transformers & Rectified Flow Build Python
24 SAM 3 & Open-Vocabulary Segmentation Build Python
25 Vision-Language Models (ViT-MLP-LLM) Build Python
26 Monocular Depth & Geometry Estimation Build Python
27 Multi-Object Tracking & Video Memory Build Python
28 World Models & Video Diffusion Build Python
Phase 5 — NLP: Foundations to Advanced  29 lessons  Language is the interface to intelligence.
# Lesson Type Lang
01 Text Processing: Tokenization, Stemming, Lemmatization Build Python
02 Bag of Words, TF-IDF & Text Representation Build Python
03 Word Embeddings: Word2Vec from Scratch Build Python
04 GloVe, FastText & Subword Embeddings Build Python
05 Sentiment Analysis Build Python
06 Named Entity Recognition (NER) Build Python
07 POS Tagging & Syntactic Parsing Build Python
08 Text Classification — CNNs & RNNs for Text Build Python
09 Sequence-to-Sequence Models Build Python
10 Attention Mechanism — The Breakthrough Build Python
11 Machine Translation Build Python
12 Text Summarization Build Python
13 Question Answering Systems Build Python
14 Information Retrieval & Search Build Python
15 Topic Modeling: LDA, BERTopic Build Python
16 Text Generation Build Python
17 Chatbots: Rule-Based to Neural Build Python
18 Multilingual NLP Build Python
19 Subword Tokenization: BPE, WordPiece, Unigram, SentencePiece Learn Python
20 Structured Outputs & Constrained Decoding Build Python
21 NLI & Textual Entailment Learn Python
22 Embedding Models Deep Dive Learn Python
23 Chunking Strategies for RAG Build Python
24 Coreference Resolution Learn Python
25 Entity Linking & Disambiguation Build Python
26 Relation Extraction & Knowledge Graph Construction Build Python
27 LLM Evaluation: RAGAS, DeepEval, G-Eval Build Python
28 Long-Context Evaluation: NIAH, RULER, LongBench, MRCR Learn Python
29 Dialogue State Tracking Build Python
Phase 6 — Speech & Audio  17 lessons  Hear, understand, speak.
# Lesson Type Lang
01 Audio Fundamentals: Waveforms, Sampling, FFT Learn Python
02 Spectrograms, Mel Scale & Audio Features Build Python
03 Audio Classification Build Python
04 Speech Recognition (ASR) Build Python
05 Whisper: Architecture & Fine-Tuning Build Python
06 Speaker Recognition & Verification Build Python
07 Text-to-Speech (TTS) Build Python
08 Voice Cloning & Voice Conversion Build Python
09 Music Generation Build Python
10 Audio-Language Models Build Python
11 Real-Time Audio Processing Build Python
12 Build a Voice Assistant Pipeline Build Python
13 Neural Audio Codecs — EnCodec, SNAC, Mimi, DAC Learn Python
14 Voice Activity Detection & Turn-Taking Build Python
15 Streaming Speech-to-Speech — Moshi, Hibiki Learn Python
16 Voice Anti-Spoofing & Audio Watermarking Build Python
17 Audio Evaluation — WER, MOS, MMAU, Leaderboards Learn Python
Phase 7 — Transformers Deep Dive  14 lessons  The architecture that changed everything.
# Lesson Type Lang
01 Why Transformers: The Problems with RNNs Learn Python
02 Self-Attention from Scratch Build Python
03 Multi-Head Attention Build Python
04 Positional Encoding: Sinusoidal, RoPE, ALiBi Build Python
05 The Full Transformer: Encoder + Decoder Build Python
06 BERT — Masked Language Modeling Build Python
07 GPT — Causal Language Modeling Build Python
08 T5, BART — Encoder-Decoder Models Learn Python
09 Vision Transformers (ViT) Build Python
10 Audio Transformers — Whisper Architecture Learn Python
11 Mixture of Experts (MoE) Build Python
12 KV Cache, Flash Attention & Inference Optimization Build Python
13 Scaling Laws Learn Python
14 Build a Transformer from Scratch Build Python
15 Attention Variants — Sliding Window, Sparse, Differential Build Python
16 Speculative Decoding — Draft, Verify, Repeat Build Python
Phase 8 — Generative AI  14 lessons  Create images, video, audio, 3D, and more.
# Lesson Type Lang
01 Generative Models: Taxonomy & History Learn Python
02 Autoencoders & VAE Build Python
03 GANs: Generator vs Discriminator Build Python
04 Conditional GANs & Pix2Pix Build Python
05 StyleGAN Build Python
06 Diffusion Models — DDPM from Scratch Build Python
07 Latent Diffusion & Stable Diffusion Build Python
08 ControlNet, LoRA & Conditioning Build Python
09 Inpainting, Outpainting & Editing Build Python
10 Video Generation Build Python
11 Audio Generation Build Python
12 3D Generation Build Python
13 Flow Matching & Rectified Flows Build Python
14 Evaluation: FID, CLIP Score Build Python
19 Visual Autoregressive Modeling (VAR): Next-Scale Prediction Build Python
Phase 9 — Reinforcement Learning  12 lessons  The foundation of RLHF and game-playing AI.
# Lesson Type Lang
01 MDPs, States, Actions & Rewards Learn Python
02 Dynamic Programming Build Python
03 Monte Carlo Methods Build Python
04 Q-Learning, SARSA Build Python
05 Deep Q-Networks (DQN) Build Python
06 Policy Gradients — REINFORCE Build Python
07 Actor-Critic — A2C, A3C Build Python
08 PPO Build Python
09 Reward Modeling & RLHF Build Python
10 Multi-Agent RL Build Python
11 Sim-to-Real Transfer Build Python
12 RL for Games Build Python
Phase 10 — LLMs from Scratch  22 lessons  Build, train, and understand large language models.
# Lesson Type Lang
01 Tokenizers: BPE, WordPiece, SentencePiece Build Python, Rust
02 Building a Tokenizer from Scratch Build Python
03 Data Pipelines for Pre-Training Build Python
04 Pre-Training a Mini GPT (124M) Build Python
05 Distributed Training, FSDP, DeepSpeed Build Python
06 Instruction Tuning — SFT Build Python
07 RLHF — Reward Model + PPO Build Python
08 DPO — Direct Preference Optimization Build Python
09 Constitutional AI & Self-Improvement Build Python
10 Evaluation — Benchmarks, Evals Build Python
11 Quantization: INT8, GPTQ, AWQ, GGUF Build Python
12 Inference Optimization Build Python
13 Building a Complete LLM Pipeline Build Python
14 Open Models: Architecture Walkthroughs Learn Python
15 Speculative Decoding and EAGLE-3 Build Python
16 Differential Attention (V2) Build Python
17 Native Sparse Attention (DeepSeek NSA) Build Python
18 Multi-Token Prediction (MTP) Build Python
19 DualPipe Parallelism Learn Python
20 DeepSeek-V3 Architecture Walkthrough Learn Python
21 Jamba — Hybrid SSM-Transformer Learn Python
22 Async and Hogwild! Inference Build Python
25 Speculative Decoding and EAGLE Build Python
View on GitHub

Recent activity

commits and pull requests

Releases and announcements

1 total
  1. Edition 2026.07v2026.07Jul 25, 20264.5K downloads

    First book edition. EPUB and PDF for all six volumes are built by CI from the lesson sources and attached to this release automatically; allow the build a few minutes to upload them. The download links on the site and README always point at the newest release.

Code frequency

additions and deletions
+418K-418KWeek of 2026-03-15: +51,890 linesWeek of 2026-03-15: -1,291 linesWeek of 2026-03-22: +11,988 linesWeek of 2026-03-22: -1,687 linesWeek of 2026-03-29: +54,909 linesWeek of 2026-03-29: -5,471 linesWeek of 2026-04-05: +1,021 linesWeek of 2026-04-05: -11 linesWeek of 2026-04-12: +1,493 linesWeek of 2026-04-12: -648 linesWeek of 2026-04-19: +417,971 linesWeek of 2026-04-19: -274,180 linesWeek of 2026-04-26: +148 linesWeek of 2026-04-26: -0 linesWeek of 2026-05-03: +3,903 linesWeek of 2026-05-03: -3,995 linesWeek of 2026-05-10: +6,652 linesWeek of 2026-05-10: -411 linesWeek of 2026-05-17: +41,869 linesWeek of 2026-05-17: -3,554 linesWeek of 2026-05-24: +86,199 linesWeek of 2026-05-24: -31,581 linesWeek of 2026-05-31: +1,197 linesWeek of 2026-05-31: -613 linesWeek of 2026-06-07: +8,695 linesWeek of 2026-06-07: -73 linesWeek of 2026-06-14: +29 linesWeek of 2026-06-14: -3 linesWeek of 2026-06-21: +7 linesWeek of 2026-06-21: -1 linesWeek of 2026-06-28: +0 linesWeek of 2026-06-28: -0 linesWeek of 2026-07-05: +0 linesWeek of 2026-07-05: -0 linesWeek of 2026-07-12: +0 linesWeek of 2026-07-12: -0 linesWeek of 2026-07-19: +1,882 linesWeek of 2026-07-19: -368 linesWeek of 2026-07-26: +455 linesWeek of 2026-07-26: -32 linesMar 15, 2026Jul 26, 2026
+690.3K lines added, -323.9K removed over the last year.

Commits per week

last 52 weeks
6650Week of 2025-08-03: 0 commitsWeek of 2025-08-10: 0 commitsWeek of 2025-08-17: 0 commitsWeek of 2025-08-24: 0 commitsWeek of 2025-08-31: 0 commitsWeek of 2025-09-07: 0 commitsWeek of 2025-09-14: 0 commitsWeek of 2025-09-21: 0 commitsWeek of 2025-09-28: 0 commitsWeek of 2025-10-05: 0 commitsWeek of 2025-10-12: 0 commitsWeek of 2025-10-19: 0 commitsWeek of 2025-10-26: 0 commitsWeek of 2025-11-02: 0 commitsWeek of 2025-11-09: 0 commitsWeek of 2025-11-16: 0 commitsWeek of 2025-11-23: 0 commitsWeek of 2025-11-30: 0 commitsWeek of 2025-12-07: 0 commitsWeek of 2025-12-14: 0 commitsWeek of 2025-12-21: 0 commitsWeek of 2025-12-28: 0 commitsWeek of 2026-01-04: 0 commitsWeek of 2026-01-11: 0 commitsWeek of 2026-01-18: 0 commitsWeek of 2026-01-25: 0 commitsWeek of 2026-02-01: 0 commitsWeek of 2026-02-08: 0 commitsWeek of 2026-02-15: 0 commitsWeek of 2026-02-22: 0 commitsWeek of 2026-03-01: 0 commitsWeek of 2026-03-08: 0 commitsWeek of 2026-03-15: 70 commitsWeek of 2026-03-22: 22 commitsWeek of 2026-03-29: 70 commitsWeek of 2026-04-05: 3 commitsWeek of 2026-04-12: 5 commitsWeek of 2026-04-19: 665 commitsWeek of 2026-04-26: 2 commitsWeek of 2026-05-03: 16 commitsWeek of 2026-05-10: 64 commitsWeek of 2026-05-17: 139 commitsWeek of 2026-05-24: 360 commitsWeek of 2026-05-31: 23 commitsWeek of 2026-06-07: 17 commitsWeek of 2026-06-14: 2 commitsWeek of 2026-06-21: 2 commitsWeek of 2026-06-28: 0 commitsWeek of 2026-07-05: 0 commitsWeek of 2026-07-12: 0 commitsWeek of 2026-07-19: 11 commitsWeek of 2026-07-26: 10 commitsAug 3, 2025Jul 26, 2026
1.5K commits in the last 52 weeks.

When work happens

weekday and hour
SunMonTueWedThuFriSat036912151821Sun 0:00 — 5 commitsSun 1:00 — 2 commitsSun 2:00 — 0 commitsSun 3:00 — 0 commitsSun 4:00 — 5 commitsSun 5:00 — 1 commitsSun 6:00 — 0 commitsSun 7:00 — 0 commitsSun 8:00 — 1 commitsSun 9:00 — 1 commitsSun 10:00 — 2 commitsSun 11:00 — 6 commitsSun 12:00 — 6 commitsSun 13:00 — 0 commitsSun 14:00 — 1 commitsSun 15:00 — 0 commitsSun 16:00 — 3 commitsSun 17:00 — 1 commitsSun 18:00 — 0 commitsSun 19:00 — 2 commitsSun 20:00 — 0 commitsSun 21:00 — 0 commitsSun 22:00 — 0 commitsSun 23:00 — 5 commitsMon 0:00 — 1 commitsMon 1:00 — 0 commitsMon 2:00 — 0 commitsMon 3:00 — 0 commitsMon 4:00 — 0 commitsMon 5:00 — 0 commitsMon 6:00 — 0 commitsMon 7:00 — 0 commitsMon 8:00 — 0 commitsMon 9:00 — 2 commitsMon 10:00 — 1 commitsMon 11:00 — 7 commitsMon 12:00 — 1 commitsMon 13:00 — 4 commitsMon 14:00 — 1 commitsMon 15:00 — 0 commitsMon 16:00 — 4 commitsMon 17:00 — 13 commitsMon 18:00 — 1 commitsMon 19:00 — 0 commitsMon 20:00 — 81 commitsMon 21:00 — 0 commitsMon 22:00 — 0 commitsMon 23:00 — 3 commitsTue 0:00 — 0 commitsTue 1:00 — 0 commitsTue 2:00 — 0 commitsTue 3:00 — 0 commitsTue 4:00 — 0 commitsTue 5:00 — 0 commitsTue 6:00 — 0 commitsTue 7:00 — 0 commitsTue 8:00 — 0 commitsTue 9:00 — 1 commitsTue 10:00 — 8 commitsTue 11:00 — 16 commitsTue 12:00 — 20 commitsTue 13:00 — 18 commitsTue 14:00 — 25 commitsTue 15:00 — 5 commitsTue 16:00 — 7 commitsTue 17:00 — 10 commitsTue 18:00 — 45 commitsTue 19:00 — 116 commitsTue 20:00 — 57 commitsTue 21:00 — 33 commitsTue 22:00 — 6 commitsTue 23:00 — 9 commitsWed 0:00 — 17 commitsWed 1:00 — 2 commitsWed 2:00 — 0 commitsWed 3:00 — 0 commitsWed 4:00 — 0 commitsWed 5:00 — 0 commitsWed 6:00 — 0 commitsWed 7:00 — 0 commitsWed 8:00 — 0 commitsWed 9:00 — 5 commitsWed 10:00 — 7 commitsWed 11:00 — 14 commitsWed 12:00 — 19 commitsWed 13:00 — 6 commitsWed 14:00 — 20 commitsWed 15:00 — 15 commitsWed 16:00 — 6 commitsWed 17:00 — 20 commitsWed 18:00 — 37 commitsWed 19:00 — 18 commitsWed 20:00 — 16 commitsWed 21:00 — 38 commitsWed 22:00 — 1 commitsWed 23:00 — 30 commitsThu 0:00 — 148 commitsThu 1:00 — 1 commitsThu 2:00 — 0 commitsThu 3:00 — 0 commitsThu 4:00 — 0 commitsThu 5:00 — 0 commitsThu 6:00 — 0 commitsThu 7:00 — 0 commitsThu 8:00 — 0 commitsThu 9:00 — 1 commitsThu 10:00 — 31 commitsThu 11:00 — 4 commitsThu 12:00 — 6 commitsThu 13:00 — 3 commitsThu 14:00 — 0 commitsThu 15:00 — 9 commitsThu 16:00 — 10 commitsThu 17:00 — 35 commitsThu 18:00 — 36 commitsThu 19:00 — 1 commitsThu 20:00 — 1 commitsThu 21:00 — 0 commitsThu 22:00 — 0 commitsThu 23:00 — 0 commitsFri 0:00 — 0 commitsFri 1:00 — 0 commitsFri 2:00 — 0 commitsFri 3:00 — 0 commitsFri 4:00 — 0 commitsFri 5:00 — 0 commitsFri 6:00 — 0 commitsFri 7:00 — 0 commitsFri 8:00 — 0 commitsFri 9:00 — 1 commitsFri 10:00 — 1 commitsFri 11:00 — 12 commitsFri 12:00 — 133 commitsFri 13:00 — 0 commitsFri 14:00 — 4 commitsFri 15:00 — 0 commitsFri 16:00 — 1 commitsFri 17:00 — 3 commitsFri 18:00 — 5 commitsFri 19:00 — 4 commitsFri 20:00 — 6 commitsFri 21:00 — 59 commitsFri 22:00 — 81 commitsFri 23:00 — 0 commitsSat 0:00 — 2 commitsSat 1:00 — 16 commitsSat 2:00 — 8 commitsSat 3:00 — 0 commitsSat 4:00 — 0 commitsSat 5:00 — 0 commitsSat 6:00 — 0 commitsSat 7:00 — 0 commitsSat 8:00 — 0 commitsSat 9:00 — 3 commitsSat 10:00 — 5 commitsSat 11:00 — 2 commitsSat 12:00 — 10 commitsSat 13:00 — 2 commitsSat 14:00 — 5 commitsSat 15:00 — 2 commitsSat 16:00 — 8 commitsSat 17:00 — 1 commitsSat 18:00 — 4 commitsSat 19:00 — 1 commitsSat 20:00 — 3 commitsSat 21:00 — 4 commitsSat 22:00 — 1 commitsSat 23:00 — 2 commits
Commit volume by weekday and hour (UTC). Larger dots mean more commits.

Who is committing

last 52 weeks
Maintainer commits1,551 (94%)
Community commits106 (6%)

1,657 commits in total over the last year.

DateListRankStars gained
Jul 27, 2026daily#22+3
Jul 23, 2026daily#18+4
Jul 21, 2026daily#15+4
Jul 20, 2026daily#7+4
Jun 16, 2026daily#22+14
Jun 6, 2026daily#22+52
Jun 1, 2026daily#12+46
May 30, 2026daily#20+65
May 29, 2026daily#23+36
May 28, 2026daily#9+74
May 27, 2026daily#6+110
May 26, 2026daily#3+146
May 25, 2026daily#4+220
May 24, 2026daily#4+310
May 23, 2026daily#5+274
  • public-apis/public-apis

    A collective list of free APIs

    454.9K stars · Python

  • openclaw/openclaw

    Your own personal AI assistant. Any OS. Any Platform. The lobster way. 🦞

    385.5K stars · TypeScript

  • openclaw/openclaw

    Your own personal AI assistant. Any OS. Any Platform. The lobster way. 🦞

    384.4K stars · TypeScript

  • openclaw/openclaw

    Your own personal AI assistant. Any OS. Any Platform. The lobster way. 🦞

    384.4K stars · TypeScript

  • openclaw/openclaw

    Your own personal AI assistant. Any OS. Any Platform. The lobster way. 🦞

    384.4K stars · TypeScript

  • donnemartin/system-design-primer

    Learn how to design large-scale systems. Prep for the system design interview. Includes Anki flashcards.

    362.2K stars · Python