Save this video — free

Transformer configurations & tokenization

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

Transformer configurations & tokenization Watch on YouTube →

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.

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.