π Get Started Β Β·Β π€ AI-Native Β Β·Β πΊοΈ The Journey Β Β·Β π§° Toolkit Β Β·Β π Glossary Β Β·Β π£οΈ Roadmap Β Β·Β π€ Contribute Β Β·Β π Website
283+ lessons. 20 phases. ~320 hours. From linear algebra to autonomous agent swarms. Python, TypeScript, Rust, Julia. Every lesson produces something reusable: prompts, skills, agents, and MCP servers.
You don't just learn AI. You learn AI with AI. Then you build real things. Then you ship tools others can use.
| πΊ Traditional Courses | π§ This Course |
|---|---|
| Scope One slice (NLP or Vision or Agents) |
Scope π Everything β math Β· ML Β· DL Β· NLP Β· vision Β· speech Β· transformers Β· LLMs Β· agents Β· swarms |
| Languages Python only |
Languages π Python Β· π¦ TypeScript Β· π¦ Rust Β· π£ Julia |
| Output "I learned something" |
Output π¦ A portfolio of tools, prompts, skills, and agents you can install |
| Depth Surface-level or theory-heavy |
Depth π¬ Build from scratch first, then use frameworks |
| Format Videos you watch |
Format π» Runnable code + docs + web app + AI-powered quizzes |
| Style Passive consumption |
Style π€ AI-native β Claude Code skills test you as you go |
# π§ͺ Find where to start based on what you already know
/find-your-level
# β
Quiz yourself after completing a phase
/check-understanding 3
# π¦ Every lesson produces a reusable artifact
ls phases/03-deep-learning-core/05-loss-functions/outputs/
# βββ prompt-loss-function-selector.md
# βββ prompt-loss-debugger.mdOther courses end with "congratulations, you learned X." Our lessons end with a reusable tool:
|
π |
π΄ |
π€ |
π |
277-term searchable glossary. Full lesson catalog. ~306 hours of content with per-lesson time estimates.
π Browse the website β
|
π£ Phase 1 β Math Foundations Β 22 lessonsΒ The intuition behind every AI algorithm, through code.
| # | Lesson | Type | Lang |
|---|---|---|---|
| 01 | Linear Algebra Intuition | π π£ | |
| 02 | Vectors, Matrices & Operations | π π£ | |
| 03 | Matrix Transformations & Eigenvalues | π π£ | |
| 04 | Calculus for ML: Derivatives & Gradients | π | |
| 05 | Chain Rule & Automatic Differentiation | π | |
| 06 | Probability & Distributions | π | |
| 07 | Bayes' Theorem & Statistical Thinking | π | |
| 08 | Optimization: Gradient Descent Family | π | |
| 09 | Information Theory: Entropy, KL Divergence | π | |
| 10 | Dimensionality Reduction: PCA, t-SNE, UMAP | π | |
| 11 | Singular Value Decomposition | π π£ | |
| 12 | Tensor Operations | π | |
| 13 | Numerical Stability | π | |
| 14 | Norms & Distances | π | |
| 15 | Statistics for ML | π | |
| 16 | Sampling Methods | π | |
| 17 | Linear Systems | π | |
| 18 | Convex Optimization | π | |
| 19 | Complex Numbers for AI | π | |
| 20 | The Fourier Transform | π | |
| 21 | Graph Theory for ML | π | |
| 22 | Stochastic Processes | π |
π΅ Phase 2 β ML Fundamentals Β 18 lessonsΒ Classical ML β still the backbone of most production AI.
| # | Lesson | Type | Lang |
|---|---|---|---|
| 01 | What Is Machine Learning | π | |
| 02 | Linear Regression from Scratch | π | |
| 03 | Logistic Regression & Classification | π | |
| 04 | Decision Trees & Random Forests | π | |
| 05 | Support Vector Machines | π | |
| 06 | KNN & Distance Metrics | π | |
| 07 | Unsupervised Learning: K-Means, DBSCAN | π | |
| 08 | Feature Engineering & Selection | π | |
| 09 | Model Evaluation: Metrics, Cross-Validation | π | |
| 10 | Bias, Variance & the Learning Curve | π | |
| 11 | Ensemble Methods: Boosting, Bagging, Stacking | π | |
| 12 | Hyperparameter Tuning | π | |
| 13 | ML Pipelines & Experiment Tracking | π | |
| 14 | Naive Bayes | π | |
| 15 | Time Series Fundamentals | π | |
| 16 | Anomaly Detection | π | |
| 17 | Handling Imbalanced Data | π | |
| 18 | Feature Selection | π |
π’ 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 | π | |
| 02 | Multi-Layer Networks & Forward Pass | π | |
| 03 | Backpropagation from Scratch | π | |
| 04 | Activation Functions: ReLU, Sigmoid, GELU & Why | π | |
| 05 | Loss Functions: MSE, Cross-Entropy, Contrastive | π | |
| 06 | Optimizers: SGD, Momentum, Adam, AdamW | π | |
| 07 | Regularization: Dropout, Weight Decay, BatchNorm | π | |
| 08 | Weight Initialization & Training Stability | π | |
| 09 | Learning Rate Schedules & Warmup | π | |
| 10 | Build Your Own Mini Framework | π | |
| 11 | Introduction to PyTorch | π | |
| 12 | Introduction to JAX | π | |
| 13 | Debugging Neural Networks | π |
π Phase 4 β Computer Vision Β 28 lessonsΒ From pixels to understanding β image, video, 3D, VLMs, and world models.
π΄ Phase 5 β NLP: Foundations to Advanced Β 29 lessonsΒ Language is the interface to intelligence.
π’ Phase 6 β Speech & Audio Β 17 lessonsΒ Hear, understand, speak.
| # | Lesson | Type | Lang |
|---|---|---|---|
| 01 | Audio Fundamentals: Waveforms, Sampling, FFT | π | |
| 02 | Spectrograms, Mel Scale & Audio Features | π | |
| 03 | Audio Classification | π | |
| 04 | Speech Recognition (ASR) | π | |
| 05 | Whisper: Architecture & Fine-Tuning | π | |
| 06 | Speaker Recognition & Verification | π | |
| 07 | Text-to-Speech (TTS) | π | |
| 08 | Voice Cloning & Voice Conversion | π | |
| 09 | Music Generation | π | |
| 10 | Audio-Language Models | π | |
| 11 | Real-Time Audio Processing | π π¦ | |
| 12 | Build a Voice Assistant Pipeline | π | |
| 13 | Neural Audio Codecs β EnCodec, SNAC, Mimi, DAC | π | |
| 14 | Voice Activity Detection & Turn-Taking | π | |
| 15 | Streaming Speech-to-Speech β Moshi, Hibiki | π | |
| 16 | Voice Anti-Spoofing & Audio Watermarking | π | |
| 17 | Audio Evaluation β WER, MOS, MMAU, Leaderboards | π |
π’ Phase 7 β Transformers Deep Dive Β 14 lessonsΒ The architecture that changed everything.
| # | Lesson | Type | Lang |
|---|---|---|---|
| 01 | Why Transformers: The Problems with RNNs | π | |
| 02 | Self-Attention from Scratch | π | |
| 03 | Multi-Head Attention | π | |
| 04 | Positional Encoding: Sinusoidal, RoPE, ALiBi | π | |
| 05 | The Full Transformer: Encoder + Decoder | π | |
| 06 | BERT β Masked Language Modeling | π | |
| 07 | GPT β Causal Language Modeling | π | |
| 08 | T5, BART β Encoder-Decoder Models | π | |
| 09 | Vision Transformers (ViT) | π | |
| 10 | Audio Transformers β Whisper Architecture | π | |
| 11 | Mixture of Experts (MoE) | π | |
| 12 | KV Cache, Flash Attention & Inference Optimization | π | |
| 13 | Scaling Laws | π | |
| 14 | Build a Transformer from Scratch | π |
π Phase 8 β Generative AI Β 14 lessonsΒ Create images, video, audio, 3D, and more.
| # | Lesson | Type | Lang |
|---|---|---|---|
| 01 | Generative Models: Taxonomy & History | π | |
| 02 | Autoencoders & VAE | π | |
| 03 | GANs: Generator vs Discriminator | π | |
| 04 | Conditional GANs & Pix2Pix | π | |
| 05 | StyleGAN | π | |
| 06 | Diffusion Models β DDPM from Scratch | π | |
| 07 | Latent Diffusion & Stable Diffusion | π | |
| 08 | ControlNet, LoRA & Conditioning | π | |
| 09 | Inpainting, Outpainting & Editing | π | |
| 10 | Video Generation | π | |
| 11 | Audio Generation | π | |
| 12 | 3D Generation | π | |
| 13 | Flow Matching & Rectified Flows | π | |
| 14 | Evaluation: FID, CLIP Score | π |
π£ Phase 9 β Reinforcement Learning Β 12 lessonsΒ The foundation of RLHF and game-playing AI.
| # | Lesson | Type | Lang |
|---|---|---|---|
| 01 | MDPs, States, Actions & Rewards | π | |
| 02 | Dynamic Programming | π | |
| 03 | Monte Carlo Methods | π | |
| 04 | Q-Learning, SARSA | π | |
| 05 | Deep Q-Networks (DQN) | π | |
| 06 | Policy Gradients β REINFORCE | π | |
| 07 | Actor-Critic β A2C, A3C | π | |
| 08 | PPO | π | |
| 09 | Reward Modeling & RLHF | π | |
| 10 | Multi-Agent RL | π | |
| 11 | Sim-to-Real Transfer | π | |
| 12 | RL for Games | π |
π§ Phase 10 β LLMs from Scratch Β 22 lessonsΒ Build, train, and understand large language models.
| # | Lesson | Type | Lang |
|---|---|---|---|
| 01 | Tokenizers: BPE, WordPiece, SentencePiece | π | |
| 02 | Building a Tokenizer from Scratch | π | |
| 03 | Data Pipelines for Pre-Training | π | |
| 04 | Pre-Training a Mini GPT (124M) | π | |
| 05 | Distributed Training, FSDP, DeepSpeed | π | |
| 06 | Instruction Tuning β SFT | π | |
| 07 | RLHF β Reward Model + PPO | π | |
| 08 | DPO β Direct Preference Optimization | π | |
| 09 | Constitutional AI & Self-Improvement | π | |
| 10 | Evaluation β Benchmarks, Evals | π | |
| 11 | Quantization: INT8, GPTQ, AWQ, GGUF | π π¦ | |
| 12 | Inference Optimization | π | |
| 13 | Building a Complete LLM Pipeline | π | |
| 14 | Open Models: Architecture Walkthroughs | π | |
| 15 | Speculative Decoding and EAGLE-3 | π | |
| 16 | Differential Attention (V2) | π | |
| 17 | Native Sparse Attention (DeepSeek NSA) | π | |
| 18 | Multi-Token Prediction (MTP) | π | |
| 19 | DualPipe Parallelism | π | |
| 20 | DeepSeek-V3 Architecture Walkthrough | π | |
| 21 | Jamba β Hybrid SSM-Transformer | π | |
| 22 | Async and Hogwild! Inference | π |
π₯ Phase 11 β LLM Engineering Β 15 lessonsΒ Put LLMs to work in production.
| # | Lesson | Type | Lang |
|---|---|---|---|
| 01 | Prompt Engineering: Techniques & Patterns | π | |
| 02 | Few-Shot, CoT, Tree-of-Thought | π | |
| 03 | Structured Outputs | π π¦ | |
| 04 | Embeddings & Vector Representations | π | |
| 05 | Context Engineering | π π¦ | |
| 06 | RAG: Retrieval-Augmented Generation | π π¦ | |
| 07 | Advanced RAG: Chunking, Reranking | π | |
| 08 | Fine-Tuning with LoRA & QLoRA | π | |
| 09 | Function Calling & Tool Use | π | |
| 10 | Evaluation & Testing | π | |
| 11 | Caching, Rate Limiting & Cost | π | |
| 12 | Guardrails & Safety | π | |
| 13 | Building a Production LLM App | π | |
| 14 | Model Context Protocol (MCP) | π | |
| 15 | Prompt Caching & Context Caching | π |
π© Phase 12 β Multimodal AI Β 25 lessonsΒ See, hear, read, and reason across modalities β from ViT patches to computer-use agents.
π¦ Phase 13 β Tools & Protocols Β 23 lessonsΒ The interfaces between AI and the real world.
| # | Lesson | Type | Lang |
|---|---|---|---|
| 01 | The Tool Interface | π | |
| 02 | Function Calling Deep Dive | π | |
| 03 | Parallel and Streaming Tool Calls | π | |
| 04 | Structured Output | π | |
| 05 | Tool Schema Design | π | |
| 06 | MCP Fundamentals | π | |
| 07 | Building an MCP Server | π | |
| 08 | Building an MCP Client | π | |
| 09 | MCP Transports | π | |
| 10 | MCP Resources and Prompts | π | |
| 11 | MCP Sampling | π | |
| 12 | MCP Roots and Elicitation | π | |
| 13 | MCP Async Tasks | π | |
| 14 | MCP Apps | π | |
| 15 | MCP Security I β Tool Poisoning | π | |
| 16 | MCP Security II β OAuth 2.1 | π | |
| 17 | MCP Gateways and Registries | π | |
| 18 | MCP Auth in Production β DCR + JWKS on iii | π | |
| 19 | A2A Protocol | π | |
| 20 | OpenTelemetry GenAI | π | |
| 21 | LLM Routing Layer | π | |
| 22 | Skills and Agent SDKs | π | |
| 23 | Capstone β Tool Ecosystem | π |
π§ Phase 14 β Agent Engineering Β 30 lessonsΒ Build agents from first principles β loop, memory, planning, frameworks, benchmarks, production.
π© Phase 15 β Autonomous Systems Β 22 lessonsΒ Long-horizon agents, self-improvement, and the 2026 safety stack.
π© Phase 16 β Multi-Agent & Swarms Β 25 lessonsΒ Coordination, emergence, and collective intelligence.
β¬ Phase 17 β Infrastructure & Production Β 28 lessonsΒ Ship AI to the real world.
πͺ Phase 18 β Ethics, Safety & Alignment Β 30 lessonsΒ Build AI that helps humanity. Not optional.
π Phase 19 β Capstone Projects Β 17 projectsΒ 2026 end-to-end shippable products, 20-40 hours each.
Every lesson produces a reusable artifact β a prompt, skill, agent, or MCP server you can install and use immediately. By the end of the course you have:
outputs/
βββ π prompts/ Prompt templates for every AI task
βββ π΄ skills/ SKILL.md files for AI coding agents
βββ π€ agents/ Agent definitions ready to deploy
βββ π mcp-servers/ MCP servers you built during the course
π‘ Install them with SkillKit. Plug them into Claude Code, Cursor, or any AI agent. These are real tools, not homework.
phases/XX-phase-name/NN-lesson-name/
βββ π» code/ Runnable implementations (Python, TS, Rust, Julia)
βββ π docs/
β βββ en.md Lesson documentation
βββ π¦ outputs/ Prompts, skills, agents produced by this lesson
| Step | What happens |
|---|---|
| π― Motto | One-line core idea that sticks |
| β Problem | A concrete scenario where not knowing this hurts |
| π§ Concept | Mermaid diagrams and intuition β no code yet |
| π¨ Build It | Implement from scratch in pure Python. No frameworks. |
| βοΈ Use It | Same thing with PyTorch, sklearn, or the real tool |
| π’ Ship It | The prompt, skill, or agent this lesson produces |
π The Build It / Use It split is the key. You understand what the framework does because you built it yourself first.
Pick any completed lesson from the website or expand any phase above.
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.pyIf you already know some ML/DL, don't start from Phase 1. Use the built-in assessment:
# In Claude Code:
/find-your-levelThis 10-question quiz maps your knowledge to a starting phase and builds a personalized path with hour estimates.
- You can write code (Python or any language)
- You want to understand how AI actually works, not just call APIs
| π§βπ» You are... | πͺ Start at... | β±οΈ Time to complete |
|---|---|---|
| π± New to programming + AI | Phase 0 (Setup) | ~306 hours |
| π Know Python, new to ML | Phase 1 (Math) | ~270 hours |
| π Know ML, new to DL | Phase 3 (Deep Learning) | ~200 hours |
| π§ Know DL, want LLMs/agents | Phase 10 (LLMs from Scratch) | ~100 hours |
| π Senior eng, want agents only | Phase 14 (Agent Engineering) | ~60 hours |
|
|
We welcome contributions of all kinds β new lessons, translations, fixes, and outputs.
| π Want to... | π Read |
|---|---|
| Contribute a lesson or fix | CONTRIBUTING.md |
| Fork for your team or school | FORKING.md |
| See the lesson template | LESSON_TEMPLATE.md |
| Track progress | ROADMAP.md |
| Code of conduct | CODE_OF_CONDUCT.md |
π Built with care by Rohit Ghumare and the community.
π MIT License β Use it however you want. Fork it. Teach it. Sell it. Ship it.
β¨ From linear algebra to autonomous agent swarms β one lesson at a time. β¨