Building an LLM from Scratch

A practical, implementation-focused course covering the core ideas behind large language models — built from scratch.

Format: Implementation-focused Modules: 7

About This Course

This course is designed for experienced programmers who want to understand large language models through implementation, not just theory. By building working examples yourself, you develop deep understanding of what’s actually happening inside modern AI systems.

You’ll progress from first-principles building blocks — starting with a tiny autograd engine — through neural networks, sequence models, and attention, up to the transformer architecture that powers modern LLMs. Every concept is grounded in code you write yourself.

Prerequisites: programming experience, mathematical maturity (calculus + linear algebra, OK if rusty). No prior ML knowledge required.

Learning Path

The modules are designed to be followed sequentially — concepts compound. Rough phase breakdown:

Phase Modules Focus
Foundations 1 Autograd, gradients, a tiny neural net from scratch
Neural networks 2 Deep learning fundamentals
Sequence models 3–4 CNNs, RNNs, LSTMs
Attention & transformers 5–6 Attention mechanisms, transformer architecture
Beyond 7 To be determined

Download

The original course documents are available as a single archive: course.zip