# ai-engineering-from-scratch **Repository Path**: zenaster/ai-engineering-from-scratch ## Basic Information - **Project Name**: ai-engineering-from-scratch - **Description**: No description available - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-06-09 - **Last Updated**: 2026-06-09 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README
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. ```mermaid %%{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 ``` ``` ░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒░░░▒▒▒ ``` ## The shape of a lesson Each lesson lives in its own folder, with the same structure across the entire curriculum: ``` phases/FIG_001 · A PROMPTS |
FIG_001 · B SKILLS |
FIG_001 · C AGENTS |
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. |
| **`code/agent_loop.py`** build it ```python 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 ```markdown --- 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`** ```markdown You are an agent debugger. Given the trace of an agent run, identify the step where the agent went wrong and explain why... ``` |
22 lessons The intuition behind every AI algorithm, through code.18 lessons Classical ML — still the backbone of most production AI.13 lessons Neural networks from first principles. No frameworks until you build one.28 lessons From pixels to understanding — image, video, 3D, VLMs, and world models.29 lessons Language is the interface to intelligence.17 lessons Hear, understand, speak.14 lessons The architecture that changed everything.14 lessons Create images, video, audio, 3D, and more.12 lessons The foundation of RLHF and game-playing AI.22 lessons Build, train, and understand large language models.17 lessons Put LLMs to work in production.25 lessons See, hear, read, and reason across modalities — from ViT patches to computer-use agents.23 lessons The interfaces between AI and the real world.42 lessons Build agents from first principles — loop, memory, planning, frameworks, benchmarks, production, workbench.22 lessons Long-horizon agents, self-improvement, and the 2026 safety stack.25 lessons Coordination, emergence, and collective intelligence.28 lessons Ship AI to the real world.30 lessons Build AI that helps humanity. Not optional.85 lessons 17 end-to-end products + 9 deep-build tracks. 20-40 hours per project; 4-12 lessons per track.| FIG_003 · A THE INDUSTRY SIGNAL |
FIG_003 · B FOUNDATIONAL PAPERS COVERED |
|---|---|
|
> *"The hottest new programming language is English."* > — **Andrej Karpathy** ([tweet](https://x.com/karpathy/status/1617979122625712128)) > *"Software engineering is being remade in front of our eyes."* > — **Boris Cherny**, creator of Claude Code > *"Models will keep getting better. The skill that compounds is **knowing what to build**."* > — Industry consensus, 2026 |
- *Attention Is All You Need* — Vaswani et al., 2017 → [Phase 7](#phase-7) - *Language Models are Few-Shot Learners* (GPT-3) → [Phase 10](#phase-10) - *Denoising Diffusion Probabilistic Models* → [Phase 8](#phase-8) - *InstructGPT / RLHF* → [Phase 10](#phase-10) - *Direct Preference Optimization* → [Phase 10](#phase-10) - *Chain-of-Thought Prompting* → [Phase 11](#phase-11) - *ReAct: Reasoning + Acting in LLMs* → [Phase 14](#phase-14) - *Model Context Protocol* — Anthropic → [Phase 13](#phase-13) |