Save this video free

11/11/26: Lect-11 (cont.)

Joseph Zambreno · 1:13:02 · Watch on YouTube

Part of Iowa State EE/CPRE/CYBE 3250. See all 12 lectures and search them

These notes were made with YouTube Collector. Paste any YouTube link and get the same: a summary, chapters and a searchable transcript.

Overview

Joseph Zambreno explains how the Transformer replaces recurrent sequence processing with parallel self-attention, using learned query, key, and value projections to connect tokens directly. He builds from attention scores and causal masking through positional encodings, beam search, and multi-head attention, then describes the encoder-decoder Transformer and demonstrates GPT-2 with 768-dimensional embeddings, 12 attention heads, and 12 layers.

Key takeaways

Chapters

0:00 From Recurrent Encoders to the Attention Is All You Need Idea
7:43 Queries, Keys, and Values as a Soft Information Lookup
13:00 Why Attention Is a Soft Lookup Instead of an Exact Match
18:03 Setting Up a Four-Token Self-Attention Example
21:08 Calculating Token Attention with QK Scores and Weighted Values
27:50 Why Scaled Dot-Product Attention Divides by Square Root of D
31:18 Self-Attention, Cross-Attention, and Convolutional Connectivity
35:17 Causal Masks Prevent Transformers from Seeing Future Tokens
38:25 Positional Encodings Restore Word Order to Self-Attention
44:48 Parallel Teacher-Forced Training Versus Sequential Generation
48:01 Beam Search Keeps Multiple Candidate Token Sequences
54:01 Multi-Head Attention Learns Several Token Relationships
58:13 Transformer Blocks Combine Attention, MLPs, Layer Norm, and Residuals
1:04:53 GPT-2 Explainer Demonstrates Tokenization and Next-Word Generation

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

Transcript excerpt

0:00 Let's go ahead and get started. Where we left off and we we covered a lot of ground on Monday is we were talking about first encoder decoder architectures for sequence to sequence translation style sequence modeling tasks. And we somewhat motivated it. We tried to kind of show what that means in practice, motivated by looking at how when you have these recurrent networks, there is this information that gets passed from input through successive hidden states as they get computed and recomputed that gets passed from the input through the encoder side and then finally as a context that's shared with the decoder side. And the perceived shortcoming or limitation of that is that as your sequence gets longer and

0:48 longer, the ability for a long network to actually retain information about those earlier tokens becomes more challenging and and more limited as the sequence depth itself increases here. That was some of the motivation for the original idea behind calculating computing attention, what we were calling bottom-up or bottom-up attention here, which is we had those hidden states in our RNN on the encoder side and they're getting updated for every token update H of T update H of T. Originally kind of discard all that information along the way. The attention mechanism tries to answer the question of is there a useful way in one can make use of that hidden state information as it is being processed while it's it's

1:36 it is in the the process of being calculated here. And that was what the attention mechanism was attempting to do. We had this concept of queries, keys, and values and I think it's important enough we're going to we're going to strip that down to its more simplest form here in just a moment here. And we

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

In this course

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, Joseph Zambreno.

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.