Phase 8 · 13 lessons · 45 h · about 5 weeks

✨ LLMs & Generative AI

How frontier models are built, aligned, prompted, sampled, evaluated and understood

Lessons

8.1The LLM lifecycle and model landscapeFrom trillions of web tokens to a chat assistant — and how to pick one3 h8.2Fine-tuning and PEFTTeach a model new behavior with a fraction of the parameters⚡ demo · 3 h 30 min8.3Alignment: RLHF, PPO, DPO, GRPO and Constitutional AITurning 'predict the next token' into 'be helpful, honest and harmless'4 h8.4Prompting as programmingConditioning a model precisely: instructions, examples, structure and evaluation2 h 30 min8.5Decoding and samplingFrom a probability distribution to the next token — every knob explained⚡ demo · 2 h8.6Reasoning models and test-time computeModels that think before they answer — and what that buys2 h 30 min8.7Evaluating LLMsBenchmarks, arenas, judges — and the eval set that actually matters: yours3 h8.8Generative models I: VAEs and GANsLearning p(x): latent variables, the ELBO, and the adversarial game3 h 30 min8.9Generative models II: Diffusion and flow matchingDestroy data with noise, learn to reverse it — the math behind image and video models⚡ demo · 4 h8.10Multimodal modelsOne model, many senses: CLIP, vision-language models, text-to-image, speech and video3 h8.11Interpretability: what is happening insideCircuits, features, superposition and sparse autoencoders3 h8.12Safety, risks and responsible AIHallucination, injection, bias, privacy, alignment findings and governance3 h8.13Project: fine-tune a small LLM with LoRA and ship a chat appFrom dataset to QLoRA training to evaluation to a deployed chat interface8 h

About this phase

You now know how a transformer computes. This phase is about the systems built on top of it: how a raw next-token predictor becomes a helpful assistant (pretraining → supervised fine-tuning → preference optimization and RL), how to adapt models cheaply with LoRA, how to prompt and decode them well, how reasoning models spend compute at test time, and how to evaluate any of it honestly. The second half opens the generative-modeling toolbox beyond text — VAEs, GANs, diffusion and flow matching, and multimodal models that join images, audio and language — then looks inside the network with mechanistic interpretability and closes with safety, risk and a hands-on fine-tuning project. Every lesson keeps the math explicit, from the ELBO to the DPO loss to classifier-free guidance.

By the end you can

  • Explain the three-stage LLM lifecycle and read a model card or technical report critically
  • Derive and implement LoRA, and choose between prompting, RAG and fine-tuning for a given problem
  • Write down and explain the RLHF objective, the DPO loss and GRPO's advantage estimate
  • Control generation with temperature, top-k/top-p and constrained decoding, and know what each does to the distribution
  • Derive the VAE ELBO and the diffusion training objective, and sample from a diffusion or flow-matching model
  • Design an evaluation that survives contamination and judge bias, and apply a safety checklist to an LLM product