Course notes / Autumn 2025

CME295Transformers & LLMs

Nine lectures, from the foundations of attention to reasoning and agents. Explore detailed study notes, lecture slides, and questions for review.

Stanford CME29509 lecturesEnglish notes

The lectures

01 — 09
  1. 01

    Transformers

    From tokens and embeddings to self-attention and the transformer architecture.

  2. 02

    Transformer-based models & tricks

    Position embeddings, normalization, attention variants, and efficient inference.

  3. 03

    Transformers & large language models

    How transformer architectures become large language models.

  4. 04

    LLM training

    Data, pretraining objectives, and the foundations of training at scale.

  5. 05

    LLM tuning

    Fine-tuning, human preferences, and aligning model behavior.

  6. 06

    LLM reasoning

    Reasoning methods, reinforcement learning, and inference-time computation.

  7. 07

    Agentic LLMs

    Tool use, retrieval, and language models that act across multiple steps.

  8. 08

    LLM evaluation

    Benchmarks, human judgments, and measuring model quality.

  9. 09

    Recap & current trends

    A course review, multimodal models, and emerging directions for LLMs.