Skip to content

Lecture Slides

One deck per chapter, for instructors who teach the book in a course and for readers who want a chapter they can page through in ten minutes.

Every deck follows its chapter in order: where the chapter sits on the book's map, what it builds on, one idea per slide with the chapter's own figure, the code and its real output, a lab step, a business example, a discussion question, a recap, check-your-understanding questions and references. Every number and every line of terminal output on the slides comes from the book, whose scripts produced them; nothing is typed in by hand. Each deck opens with a timing budget for a 75-minute class and carries speaker notes with a source line for every fact (open the deck's Markdown source to read them).

Table S.1: The decks, one per chapter.

Module Deck
1: Foundations Chapter 1: Environment Setup
Chapter 2: What Is an LLM?
Chapter 3: Tensors and PyTorch
Chapter 4: Tokenization
Chapter 5: Embeddings
2: Building the Model Chapter 6: Self-Attention
Chapter 7: Multi-Head Attention
Chapter 8: Feed-Forward and Norms
Chapter 9: The Transformer Block
Chapter 10: The Full GPT Architecture
Chapter 11: Causal Language Modeling
3: Training and Generation Chapter 12: Dataset and DataLoader
Chapter 13: The Training Loop
Chapter 14: Checkpointing
Chapter 15: Greedy and Sampling
Chapter 16: Temperature and Top-k
Chapter 17: Putting It All Together

Teaching with the decks

  • One chapter per class. Each deck budgets about 70 minutes of a 75-minute session and marks the live run or lab as the part to protect when time runs short.
  • The live run is the point. Every deck has a slide where the instructor runs one of the book's scripts in front of the class; the numbers on the slide are what the script prints.
  • Students read the PDF afterwards. Every technical term is glossed on the slide itself, so the deck stands on its own without the notes.
  • The sources are editable. The decks are written in Marp Markdown and live in the slides/ folder of the code repository, with the theme and a build script; the notes and the timing budget are in the source.

The slides carry the same license as the book text, CC BY-NC-ND 4.0.