Hacks·2 min read·Jun 2, 2026

AI Engineering from Scratch: 485 Free Lessons, 27k GitHub Stars

A free, MIT-licensed curriculum that takes you from linear algebra to autonomous multi-agent systems across 20 phases. 485 lessons in Python, TypeScript, Rust, and Julia. Every lesson makes you implement the algorithm by hand before touching a framework.

AI Engineering from Scratch reference manual banner showing the 20-phase curriculum stack

If you wanted to learn AI engineering from the ground up without paying for a bootcamp, this is the repo. 27,000 stars, 485 lessons across 20 phases, completely free under MIT.

Repo: github.com/rohitg00/ai-engineering-from-scratch

What it covers

The curriculum runs from math foundations (linear algebra, calculus, probability) all the way to autonomous multi-agent systems. 20 phases, roughly 320 hours of content. Every lesson follows the same six steps: read the problem, derive the math, write the code from scratch, then rebuild it in a real framework.

You implement backpropagation, tokenizers, and attention mechanisms by hand before you ever touch PyTorch. Four languages throughout: Python, TypeScript, Rust, and Julia.

Key phases

  • Phases 1-3: Math foundations, ML fundamentals, deep learning core
  • Phases 4-6: Computer vision (28 lessons), NLP (29 lessons), speech and audio
  • Phase 10: Build an entire LLM from scratch (tokenizer, pre-training, RLHF, DPO, quantization)
  • Phase 14: Agent engineering (42 lessons, the largest phase). LangGraph, CrewAI, Claude Agent SDK, MCP
  • Phase 16: Multi-agent systems and swarms
  • Phase 18: Ethics, safety, alignment, red-teaming
  • Phase 19: 17 end-to-end capstone projects

Find your level

The companion site has a placement quiz that maps you to the right starting phase based on what you already know. Recommended pace is 1-2 lessons a day, fundamentals first.

Site: aiengineeringfromscratch.com

What you get out of it

Every completed lesson produces a reusable artifact: prompts, installable agent skills, MCP servers, or working code you can put on your CV. By the end you have 485+ portfolio pieces you actually understand, not just certificates.

The tradeoff

320 hours with no instructor, no deadlines, no cohort. "From scratch" means from scratch. The first three phases are pure math before you write a single line of ML code. If you can't self-motivate through linear algebra without a deadline, you'll stall early.

The AI Side Hustle Cookbook

Liked this guide? Shout me a coffee.

$4.99 gets you the full playbook: 50 recipes you can build, ship, and get paid for with Claude Code. Working code in every one. The pricing, the deploy, the pitfalls. Every revision free for life.

Shout me a coffee