Skip to content
Field Guide Free Course Transformers Video Lectures

Stanford CME295:
A Free Course on Transformers and LLMs, With Every Lecture

From tokenization to GRPO and on-policy distillation in nine lectures. Stanford posts every recording on YouTube, with free slides and a cheatsheet. Every lecture is here with its chapter links, plus what is still to come this quarter.

Updated: November 2, 2026  ·  Term: Autumn 2026  ·  Released: 4 of 9 lectures  ·  Cost to follow: free

Share

At a glance

  • Course: CME295 Transformers and Large Language Models, Stanford University, Autumn 2026. It is the second edition; the 2025 syllabus is still online.
  • Taught by: twin brothers Afshine Amidi and Shervine Amidi, both adjunct professors at Stanford and authors of the course textbook.
  • Format: one lecture of about 1 hour 45 minutes each Friday, recorded and posted to YouTube by Stanford Online. No homework, a midterm and a final.
  • Level: for anyone with calculus, linear algebra and basic machine learning. There is no programming homework.
  • Free to follow: lecture videos, slide PDFs, the midterm with solutions, and an illustrated cheatsheet in 15 languages.

Watch the full playlist

All the lectures live in one Stanford Online playlist on YouTube, which picks up new lectures as they are posted. Start from lecture 1 and let it play through.

Stanford CME295 Transformers and Large Language Models, Autumn 2026 playlist

Opens on YouTube: Stanford has turned off playback on other websites for these videos.

What it teaches

CME295 explains how a modern LLM works, from the first token to a reasoning model. In the course's words, students learn "the evolution of NLP methods, the core components of the Transformer architecture, along with how they relate to LLMs as well as techniques to enhance model performance for real-world applications." The first four lectures build the model and train it. The last five cover what happens around it: systems, agents, evaluation, diffusion LLMs and current trends.

The model

Tokens, embeddings, attention, the Transformer, then the LLM: mixture of experts, RoPE, GQA and normalization choices.

The training

Pretraining, SFT and LoRA, preference tuning with RLHF and DPO, then the RL math behind PPO, GRPO and on-policy distillation.

The system

Distributed training and inference, AI agents and MCP, LLM-as-a-judge evaluation, diffusion LLMs and multimodality.

The lectures so far

Press play to open a lecture on YouTube, or pick a chapter to start it at that point. The chapter times are the ones Stanford published with each video.

1

Lecture 1: Transformers

Sep 25 · 1:44:28
Stanford CME295 Lecture 1, Transformers, video thumbnail

Starts from the history of NLP and builds the Transformer piece by piece: how text becomes tokens and vectors, why recurrent networks struggled, and how attention fixed it. It ends with a full worked example.

16 chapters
  1. 0:00Welcome
  2. 3:43Difference from last year’s edition
  3. 5:01Class logistics
  4. 12:42Timeline
  5. 16:56Tokenization
  6. 37:27Word2vec (CBOW, Skip-gram)
  7. 48:26RNN, LSTM
  8. 55:18Attention
  9. 57:16Self-attention mechanism
  10. 59:54Query, key, value
  11. 1:09:35Transformer architecture
  12. 1:12:19Input
  13. 1:16:27Transformer Encoder
  14. 1:18:19Transformer Decoder
  15. 1:22:16Computational tricks
  16. 1:27:35End-to-end example

Slides (PDF) · Watch on YouTube

Still to come

The rest of the quarter, from the course syllabus. Videos join the playlist above as they are posted, so far within about a week of each lecture.

DateLectureTopics
Oct 23MidtermExam and solutions (PDF), taken after lectures 1 to 4
Oct 305. LLM systemsDistributed training, inference optimizations, KV caching, speculative decoding, efficient kernels, Flash Attention, hardware trade-offs. Slides are out; video coming.
Nov 66. AI agentsTool calling, MCP, memory and retrieval, context compaction, harness optimization, coding agents, skills and plugins
Nov 137. LLM evaluationLLM-as-a-judge, best practices, biases and pitfalls, agent evaluation, benchmarks
Nov 208. Diffusion LLMsContinuous, discrete and masked diffusion, training and inference
Dec 49. Trending topicsRecap, multimodality, closing thoughts
Dec 9Final examCovers the full course

How to follow it on your own

What is open to everyone
  • Every lecture video, on the playlist above
  • Slide PDFs for each lecture on the syllabus page
  • The midterm and its solutions, a ready-made self-test
  • The illustrated cheatsheet, in 15 languages
What is for enrolled students
  • Ed Discussion and the Canvas course
  • Sitting and grading of the exams
  • Staff support and office hours
  • The textbook is paid, though Stanford's library holds a copy

With no homework, the course is easy to follow at home: one lecture a week, slides open alongside, takes about two hours. The chapter links make it easy to rewatch a single idea, such as RoPE or the GRPO objective, without scrubbing through a full session. Try the midterm after lecture 4, before you look at the solutions.

The textbook is the Amidis' Super Study Guide: Transformers & Large Language Models, built from the same illustrated style as their widely shared Stanford cheatsheets. The free cheatsheet is a good substitute if you want the diagrams without the book.

Our take

This is the course we would point a product leader or engineer to who wants to understand what is inside the model, not just call it. It is short, it is current, and it keeps up: the Autumn 2026 edition now covers on-policy distillation, GRPO variants like DAPO and Dr. GRPO, context rot, and a full lecture on agents with MCP, skills and plugins. Lectures 3 and 4 alone are among the clearest free explanations of post-training we have seen.

It pairs well with our other course guide. CME295 explains the model; Harvard CS2680 is about building and serving the system around it, with hands-on assignments. Watch CME295 first, then build with CS2680.

Source: the CME295 course site, its syllabus and FAQ, and the Stanford Online YouTube playlist, as of November 2, 2026. Videos are hosted on YouTube and belong to Stanford. This guide is independent and not affiliated with Stanford. Spot something out of date? Tell us.