Save this video free

Transformer configurations & tokenization

Mohit Iyyer · 1:12:01 · Watch on YouTube

Part of University of Maryland CMSC 723. See all 20 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

Mohit Iyyer compares transformer attention masks, explaining how prefix-LM, sliding-window, and document-packing masks change context access, training behavior, and inference cost. He then motivates byte-pair encoding (BPE) as a data-driven alternative to word- or character-level tokenization, showing how frequent adjacent pairs become vocabulary merges and how language imbalance affects token lengths.

Key takeaways

Chapters

0:00 Class Agenda and Course Logistics
2:16 Decoder, Encoder, and Encoder–Decoder Attention Masks
4:00 Prefix LM Combines Input and Output in One Transformer
8:15 Why Bidirectional Input Helps Prefix-LM Translation
11:51 Why Pre-Trained Language Models Keep Causal Attention
17:06 Prefix-LM Masks Complicate KV Caching in Conversations
22:19 Sliding-Window Attention Limits Each Token’s Context
27:05 Document-Packing Masks Reduce Padding Waste
31:09 Local Attention’s Effective Window Grows with Depth
39:39 Block Boundaries Stop Context Growth Across Documents
45:12 Tokenizer Goals: Coverage, Shared Vocabulary, and Short Sequences
53:03 Why Word-Level and Character-Level Tokenization Fall Short
58:43 BPE Builds a Vocabulary by Merging Frequent Pairs
1:07:07 BPE Language Imbalance and Vocabulary Finalization

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

Transcript excerpt

0:15 Okay, let's get started everyone. So today um we are going to continue where we left off yesterday talking about the uh transformer configurations. Um, we're going to go into a little more detail about different attention masks and what kind of impact they have on the model. Um, and then for the second half of class, we will talk about tokenization, which is the way in which we break up an input to the model into uh tokens that it eventually gets trained on. Um before that, uh note that we extended the project proposal deadline to Friday because we were um a little slacking off on the autograder.

1:05 It should all be working now. Um so please try it out with your proposals and um remember if you pass the AI detection check, you are free to um submit and we will um grade your proposal. uh other things um your first homework we're still uh finishing that up and we will release it after the exam. So it'll cover both uh both some pre-training and post-training related um concepts. So it'll be a good um practice for the second exam where we might might ask some more um implementation related questions. Uh okay. Oh and uh I will not be here on Wednesday. So, we have no class on

1:51 Wednesday. Um, and my office hours will be cancelled as well, but um you can look out for the uh I think one of the TAs will have their office hours tomorrow if you have any last minute questions about your proposal. Okay, any questions about logistics? All right. So let us uh get started then with our um continuing discussion of transformer configurations. [snorts] So so far we've seen the um kind of decoder um config which is the standard uh

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, Mohit Iyyer.

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.