Save this video free

Visualizing transformers and attention | Talk for TNG Big Tech Day '24

Grant Sanderson · 57:45 · Watch on YouTube

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

Overview

Grant Sanderson explains how GPT-style Transformers turn text into token vectors, use stacked attention and feed-forward layers to build context, and predict the next token. He traces attention through learned query, key, and value matrices, dot products, softmax weights, causal masking, and multi-head updates, then connects the architecture’s parallel computation and self-supervised training to its ability to scale across text, images, and sound.

Key takeaways

Chapters

0:00 Next-Token Prediction Turns a Language Model into a Chatbot
4:11 From Tokens to Transformer Layers and Training Loss
13:30 Word Embeddings Encode Meaning in High-Dimensional Spaces
22:20 Why Attention Needs Positional Information and Learned Matrices
25:40 Queries, Keys, and Dot Products Build Attention Scores
31:45 Softmax, Causal Masking, and the Cost of Long Contexts
39:35 Value Vectors Turn Attention Weights into Contextual Updates
43:45 Multi-Head Attention Runs Different Relationships in Parallel
46:15 Why Transformers Scale Across Data and Modalities
49:40 Q&A: Interpretability, Residual Connections, and Analog Computing
55:45 Q&A: Representing Two-Dimensional Images as Tokens

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

Transcript excerpt

0:00 I've been working on this project um about visually explaining Transformers as he said I love visually explaining all sorts of things usually in math but I'm happy to stray into the adjacent Fields the target audience here is always a little bit tricky because I know many of you are engineers and are quite technical but I don't necessarily want to assume too much background from people the one thing I will assume is that you're maximally curious that you're hungry to dig into the details of what's going on for example I think most people know that large language models consume a lot of computation they take a lot of resources and anybody who has looked at the market cap of Nvidia recently will also know that they tend to be run on gpus because they're very parallelizable one of the things I would like you to come away from this talk with is a deep to your bones visceral sense for what those actual computations are what the number crunching happening is and why it's so conducive to

0:49 parallelization which is one of the big reasons for the success so Transformers um were introduced in this now very famous paper called attention is all you need from 2017 and that paper was focused on a specific use case of machine translation you might imagine it used for Google translate and things like that but since then it's seen a flourishing in all sorts of other tasks it's not just useful for machine translation but it's good for transcription with tools like whisper it's good for going the other way around having tools that will take in a piece of text and synthesize speech um it's even good for image classification it's it's a remarkably flexible framework but

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, Grant Sanderson.

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.