Save this video free

CMU Introduction To Deep Learning 11-785, Fall 2026: Lecture 18

Carnegie Mellon University Deep Learning · 1:28:25 · Watch on YouTube

CMU Introduction To Deep Learning 11-785, Fall 2026: Lecture 18 Watch on YouTube →

Overview

The lecture builds from recurrent sequence-to-sequence translation models to Transformers, showing how attention addresses information loss through dynamically weighted context vectors and how self-attention removes recurrence. It connects query-key-value attention, multi-head layers, positional encodings, and masked decoding to the 2017 Transformer, then explains how decoder-only GPT and encoder-only BERT arise from the same architecture.

Key takeaways

Chapters

0:00 Lecture Roadmap: From Seq2Seq Models to Transformers
4:38 Seq2Seq Recap: Encoder, Decoder, and Teacher Forcing
10:00 Why Encoder-Decoder RNNs Lose Long-Range Information
16:00 Attention Context Vectors Replace a Single Encoder Summary
28:00 Attention Scores, Softmax, and Context Computation
37:00 Query, Key, and Value Vectors Separate Matching from Content
43:00 Conditional Sequence Probabilities and Beam Search
47:20 Attention Maps Reveal Translation Alignments
51:00 Maximum-Likelihood Training and Teacher Forcing
58:00 Multi-Head Attention and Visual Attention Examples
1:02:00 Self-Attention Lets Each Input Token Build Context
1:07:20 Transformer Blocks: Multi-Head Self-Attention and MLPs
1:11:30 Sinusoidal Positional Encodings Add Token Order
1:19:20 Masked Self-Attention Preserves Autoregressive Decoding
1:22:30 The 2017 Transformer: Parallel Attention Replaces Recurrence
1:24:00 GPT and BERT as Decoder-Only and Encoder-Only Transformers
1:25:50 Why Explicit Attention Often Beats Recurrent Memory

Keep these chapters and the full searchable transcript in your own library.

Transcript excerpt

2:02 Mhm. >> Hey.

4:35 >> Begin the class. We're going to be talking about continuing on the topic of sequence to sequence models. And today we're going to build up all the way from the simple translation model that we spoke of in the last class until transformers. So Shut your laptops after you're done. Does anybody want to remind me what the last thing we covered was? So okay, anybody else want to remind me what Yeah, Jacob's right. Anybody else

5:22 want to remind me what the last thing we covered was? Anybody? Mhm? What was the topic? Overall? Language models. We were looking at simple translation models. How did we define the simple translation model? Can you speak up, please? But how did How was the model actually constructed? What did it do? Yeah, I'm getting into the little bits, but the overall structure was that we had an encoder which processes processed the entire input and then generated a representation of the entire input. Then

6:10 we had a decoder which sort of grabbed this input with this hidden representation and then unravelled it into the output sequence. And that's how we got a sequence-to-sequence model. A sequence went in and a sequence came out, right? Now >> With teacher forcing. >> With teacher forcing. What did teacher forcing do and how did we explain it? >> We included the output from each step into the next output's model. >> Yes, and how how what was our explanation for this? How did we justify this? >> How do we justify it? >> Uh-huh. >> To keep it aligned. >> That is the mechanics of it. How did we justify it conceptually? >> Conditional probabilities. >> Conditional probabilities. We said this is a language model and when you do this

This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.

Related notes

Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, Carnegie Mellon University Deep Learning.

Want the full transcript?

Save this video in YouTube Collector to get its complete searchable transcript, your own AI summaries, and a library that keeps every video you collect in one place.