A From-First-Principles Tutorial Series

Learn
Generative AI

Ten modules covering the math, the architectures, and the code — from linear algebra through transformers, diffusion models, GANs, and beyond. Each builds on the last.

10 modules PyTorch notebooks LaTeX math & Mermaid diagrams NotebookLM audio & slides
Recommended order

The Learning Path

Three phases, ten weeks. Each phase builds on the last — or skip ahead with an alternative path below.

1

Foundation

Weeks 1 – 3
01 Foundations 02 Transformers 03 Autoencoders
2

The Model Zoo

Weeks 4 – 7
04 Diffusion 05 GANs 06 Flows 07 Autoregressive
3

Putting It Together

Weeks 8 – 10
08 Enc-Dec 09 Multimodal 10 MoE
10 modules

The Modules

Each module includes practitioner-oriented notes, a hands-on PyTorch notebook, and AI-generated study materials.

01 Foundations

Linear algebra, probability, optimization — the math that recurs in every generative model. Softmax, layer norms, residual connections, KL divergence, backpropagation.

02 Transformers

Attention, multi-head attention, and the full transformer block — the backbone of modern AI. The single most important module in the series.

03 Autoencoders

AE → VAE → VQ-VAE: the encoder-decoder paradigm and latent spaces. VAEs power Stable Diffusion's latent space; VQ-VAE connects vision to language.

04 Diffusion Models

DDPM, DDIM, classifier-free guidance, and latent diffusion (Stable Diffusion). The dominant approach for image and video generation.

05 GANs

Adversarial training, StyleGAN, and fast high-quality generation. A different way of thinking about generation — still state-of-the-art for faces.

06 Flow Models

Normalizing flows and flow matching — the theoretically cleanest generative models, with exact likelihood computation. Increasingly important and elegant.

07 Autoregressive

GPT, next-token prediction, RLHF, and scaling laws. The paradigm behind LLMs — if your primary interest is language models, start here after Transformers.

08 Encoder-Decoder

Seq2seq, T5, BART, and cross-attention for conditional generation. The architecture behind translation, summarization, and cross-modal attention.

09 Multimodal

CLIP, text-to-image (DALL-E, Stable Diffusion), image-to-text (LLaVA), video generation (Sora), and the convergence thesis — all modalities becoming tokens.

10 Mixture of Experts

Sparse routing, load balancing, Switch Transformer — scaling via conditional computation. How transformers learned to grow vast by only consulting a few specialists at a time.

Don't have 10 weeks?

Alternative Paths

Four curated sequences for different goals. Each one cherry-picks the modules that matter most for your focus.

"I only care about LLMs"

Language models track
01 02 07 10 08 09

"I only care about image generation"

Vision track
01 02 03 04 05 09

"I want the theoretical foundations"

Math-first track
01 02 03 06 04 05

"Speed run (weekend intensive)"

Fastest path to working knowledge
01 02 04 07 09
⁂ ⁂ ⁂