AI Engineering from Scratch
A free, open-source curriculum of 503 lessons across 20 phases that teaches you to build core AI algorithms from scratch using Python, TypeScript, Rust, and Julia.
AI Engineering from Scratch is an comprehensive, open-source educational curriculum designed to teach the fundamentals of artificial intelligence by constructing core algorithms from raw mathematics. Developed by Rohit Ghumare and various contributors, the project aims to demystify AI by guiding learners through a rigorous, hands-on path that avoids reliance on black-box frameworks until the underlying principles are fully understood. The curriculum consists of 503 lessons organized across 20 distinct phases, spanning a wide technical spectrum from basic linear algebra to the creation of autonomous agent swarms. It utilizes four distinct programming languages—Python, TypeScript, Rust, and Julia—choosing the language that best fits the conceptual needs of each specific lesson.
The project addresses a common gap in AI education where practitioners often learn to use libraries like PyTorch without grasping the mathematical foundations or internal mechanisms of the models they deploy. By requiring learners to derive the math, write the code, and pass the tests for every algorithm, the curriculum ensures a deep understanding of components like backpropagation, tokenization, and attention mechanisms. The content is maintained in a git-based repository and is completely free of charge, paywalls, or gated material, with all lessons licensed under the MIT license.
Some of the key features are:
- Algorithm Construction: Every core AI component is implemented from scratch using raw mathematical derivations rather than importing pre-built libraries.
- Multi-Language Approach: Lessons are implemented in Python, TypeScript, Rust, or Julia to demonstrate versatility across different programming paradigms.
- Structured Learning Path: The curriculum is organized into 20 logical phases, featuring 503 total lessons that scale from foundational mathematics to complex autonomous agent systems.
- Open-Source Transparency: The entire educational framework is available on GitHub, allowing for community contributions, auditing, and peer-reviewed accuracy.
- Artifact-Driven: Every completed lesson results in a tangible artifact, such as a functional skill, an agent, or an MCP server, providing practical outcomes for the learner.
Students interact with the curriculum by following a structured loop: they analyze a problem, derive the required mathematical model, implement the solution in code, and run tests to verify their work. The platform includes interactive tools such as a lesson catalog, a prerequisite roadmap for planning, and a glossary that provides plain-language explanations of complex AI terminology to strip away industry buzzwords. The site is built with minimal overhead using hand-written code without heavy frameworks to ensure accessibility.
Some common use cases include:
- Deepening AI Fundamentals: Software engineers looking to move beyond simple API usage to understand how models function at the architectural level.
- Academic Supplementation: Students seeking a rigorous, practical counterpart to theoretical research papers or secondary AI summaries.
- Practical Skill Acquisition: Developers aiming to build custom, high-performance AI components by leveraging lower-level languages like Rust or C-style implementations.
- Curriculum Development: Educators or individuals interested in reviewing or contributing to a structured, open-source pedagogical resource for machine learning.