rohitg00/ai-engineering-from-scratch — explained in plain English
Analysis updated 2026-05-18
Follow a structured, phase-by-phase path from math foundations to building AI agents and LLMs from scratch.
Use a built-in placement quiz inside Claude, Cursor, or Codex to find the right starting phase for your level.
Learn how a production tool like PyTorch works internally by first implementing the same algorithm by hand.
| rohitg00/ai-engineering-from-scratch | microsoft/qlib | hkuds/nanobot | |
|---|---|---|---|
| Stars | 42,014 | 42,100 | 41,803 |
| Language | Python | Python | Python |
| Setup difficulty | easy | moderate | moderate |
| Complexity | 3/5 | 4/5 | 3/5 |
| Audience | developer | researcher | developer |
Figures from each repo's GitHub metadata at analysis time.
Lessons can be read online with no setup, or run locally after cloning with just Python and the other listed languages as needed.
AI Engineering from Scratch is a large, free curriculum for learning how AI actually works by building it yourself, rather than just learning to call existing APIs. It contains 503 lessons spread across 20 phases and roughly 320 hours of material, written in Python, TypeScript, Rust, and Julia. The curriculum stacks like a staircase, starting with math foundations and general machine learning, moving through deep learning, computer vision, natural language processing, and speech, then into transformers, generative AI, and building large language models from scratch. From there it moves into tool use, AI agents, autonomous systems, multi-agent swarms, production infrastructure, and ethics, ending with capstone projects that combine everything. Every lesson follows the same pattern: state the one-line core idea, describe a concrete problem it solves, explain the concept with diagrams, build the algorithm by hand from raw math with no frameworks, then use the equivalent tool in a production library such as PyTorch, and finally ship a reusable artifact such as a prompt, an AI agent skill, an agent, or an MCP server. Each lesson lives in its own folder containing runnable code, a written explanation, and its output artifacts. There are three ways to get started: reading finished lessons on the project's website with no setup, cloning the repository and running individual Python files directly, or using a built-in placement quiz skill inside an AI coding tool like Claude, Cursor, or Codex that asks ten questions and builds a personalized learning path with time estimates. A separate per-phase quiz skill lets a learner check their understanding after finishing a phase. The project expects that a reader can already write some code, ideally Python, and wants to understand how AI works under the hood rather than only using existing AI APIs. It is free, open source, and released under the MIT license. The full README is longer than what was shown.
AI Engineering from Scratch is a free, 503-lesson curriculum across 20 phases that teaches how AI actually works by building algorithms from raw math before using production libraries.
Mainly Python. The stack also includes Python, TypeScript, Rust.
MIT license: use freely for any purpose, including commercial use, as long as you keep the copyright notice.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.