HackerTube
HomeLongsLikedHistoryWatch laterCategoriesPlaylistsSettings

Attention in transformers, step-by-step | Deep Learning Chapter 6

3Blue1Brown5 HN recommenders · recommended in 4 months, 2024-2026
YouTube
4.8M views · 2 years ago · explainer · evergreen

3Blue1Brown's visual walkthrough of the attention mechanism inside transformers, covering self-attention, multiple heads and cross-attention. It is chapter 6 of his deep learning series.

HN treats it as the go-to visual explanation of attention, recommended to people who find text-based transformer explainers hard to follow.

LLMs & generative AIMachine learning & deep learning#attention#transformers#llm#deeplearning#visualization#3blue1brown

8 comments from Hacker News

@wren69912026 · in “Can I Buy Your KV Cache?”

If you want the actual maths instead of handwaving, I recommend: link For something gentler, 3Blue1Brown: ▶ this video (this is part of a series)

RecommendsView on HN
@onlyrealcuzzo2026 · in “Claude Opus 4.8”

Because it doesn't work like how you think at all. You're still thinking it works like Chain of Thought. It doesn't. And the difference is key! It works by introducing probabilistic noise, and exploring N paths fully (each with noise) in parallel (all compressed). It's reasoning at a much, much smaller (probabilistic) level than running everything through the expensive large model (deterministic) and sometimes catching that it said, "I think 1.12 is greater than 1.9 because 12 is bigger than 9, final answer". The easiest way to think about it is: if you understand how hyper words work, it's as if it's searching for different versions of the hyper words that probilisticslly would lead to better outcomes IF it fed them to the LLM before it even does. That's not actually how it works exactly. But I think it is close enough to be helpful to understand where the gain is, a rough idea of what's happening (searching paths), and how it can potentially have huge orders of magnitude improvements (doing so without paying the full price of exploring the paths through the expensive and huge model). And also why it is so much harder to determine what it's "thinking". If you aren't familiar with hyper words, this is an amazing series: ▶ this video The general idea is that a token is a multidimensional vector to represent a word -> think like "man" is a [noun, singular, English, pronoun, masculine, contemporary, ...]. Each time is sees a new word, it mutates this word to mean some new token (ofte

Strongly recommendsView on HN
@peterlai2025 · in “3Blue1Brown Follow-Up: From Hypothetical Examples to LLM Circuit Visualization”

About a year ago, I watched this 3Blue1Brown LLM tutorial ( ▶ this video ) on how a model’s self-attention mechanism is used to predict the next token in a sequence, and I was surprised by how little we know about what actually happens when processing the sentence “A fluffy blue creature roamed the verdant forest.” A year later, the field of mechanistic interpretability has seen significant advancements, and we're now able to "decompose" models into interpretable circuits that help explain how LLMs produce predictions. Using the second iteration of an LLM "debugger" I've been working on, I compare the hypothetical representations used in the tutorial to the actual representations I see when extracting a circuit that describes the processing of this specific sentence. If you're into model interpretability, please take a look! link

CitesView on HN
@superkuh2024 · in “LLMs Aren't Thinking, They're Just Counting Votes”

> when an LLM tells us that the sun rises in the east, it's not because it truly understands astronomy or the solar system. Rather, it has seen the phrase "sun rises in the east" repeated so many times in its training data that this becomes the highest probability answer. It's less about understanding and more about pattern recognition. This is not too different from most human person's experience with basic education ( link ). Though it is obvious that humans can do more than that too. And while "voting" that may be a close-enough metaphor for the multi-layer perceptron layers, it is not what is happening in the attention layers. I suggest checking out 3blue1brown's videos on gradient descent link and "How might LLMs store facts" link versus how attention works ▶ this video

RecommendsView on HN
@MAXPOOL2024 · in “The Engineer’s Guide to Deep Learning: Understanding the Transformer Model”

There are many others that are better. 1/ The Annotated Transformer Attention is All You Need link 2/ Transformers from Scratch link 3/ Andrej Karpathy has really good series of intros: link Let's build GPT: from scratch, in code, spelled out. link GPT with Andrej Karpathy: Part 1 link 4/ 3Blue1Brown: But what is a GPT? Visual intro to transformers | Chapter 5, Deep Learning link Attention in transformers, visually explained | Chapter 6, Deep Learning ▶ this video Full 3Blue1Brown Neural Networks playlist link

RecommendsView on HN
@tomashm2024 · in “The Illustrated Transformer (2018)”

This is good, but what bade me finally understand the transformer architecture [0] and attention [1], are 3Blue1Brown's videos. 0. link 1. ▶ this video

Strongly recommendsView on HN
@lolinder2024 · in “YouTube seems to once again be rolling out its widely hated new web redesign”

Eh, insightful and thoughtful videos tend to have better comments than the low brow videos, but they're still not useful . The best of them read like a decent-but-not-great subreddit's comment thread. Taking one example, 3Blue1Brown's Deep Learning series, episode 6. Here are the top few comments [0]: > I'm a university lecturer with a PhD in AI, and I cannot compete with the quality of this work. Videos like this put the entire higher education system to shame. Fantastic! This is a nice comment, but doesn't contribute anything to my day. I'm sure the creator is glad to see it and I'm glad someone said it, but I don't need to read it. > Are you kidding me? ONE WEEK FOR 2 MASTERPIECES?! > Thank you so much! Same story. > I've got to say - "Attention Is All You Need" is an incredible title for a research paper. And now we're down to the reddit comments. > As a graduating PhD student working in Natural Language Processing, I still found that video to be extremely beneficial. Awesome! Nice. > 3b1b is the only content producer whose videos I start by first making coffee, then upvoting, then hitting the play button. Nice. > Attention existed before the 2017 paper "Attention Is All You Need". > The main contribution was that attention was... all you needed for sequence processing (you didn't need recurrence). Self-attention specifically was novel though. Finally a comment that contributed something. Not much, mind you (the video doesn't actually claim otherwise), but something . Unf

CriticalView on HN
@rahimnathwani2024 · in “Visualizing Attention, a Transformer's Heart [video]”

He lists Ring Attention and half a dozen other techniques, but they're not within the scope of this video: ▶ this video

CitesView on HN
Transformers, the tech behind LLMs | Deep Learning Chapter 527:14

Transformers, the tech behind LLMs | Deep Learning Chapter 5

3Blue1Brown
11.6M views • 2 years ago
CS480/680 Lecture 19: Attention and Transformer Networks1:22:38

CS480/680 Lecture 19: Attention and Transformer Networks

Pascal Poupart
374K views • 7 years ago
Attention Is All You Need27:07

Attention Is All You Need

Yannic Kilcher
814K views • 8 years ago
LSTM is dead. Long Live Transformers!28:48

LSTM is dead. Long Live Transformers!

Seattle Applied Deep Learning
540K views • 6 years ago
But how do AI images and videos actually work? | Guest video by Welch Labs37:20

But how do AI images and videos actually work? | Guest video by Welch Labs

3Blue1Brown
2.2M views • 1 year ago
Large Language Models from scratch8:25

Large Language Models from scratch

Graphics in 5 Minutes
375K views • 4 years ago
Deep Dive into LLMs like ChatGPT3:31:24

Deep Dive into LLMs like ChatGPT

Andrej Karpathy
10.2M views • 1 year ago
Do we need Attention? - Linear RNNs and State Space Models (SSMs) for NLP39:43

Do we need Attention? - Linear RNNs and State Space Models (SSMs) for NLP

Sasha Rush
35K views • 3 years ago
Let's build GPT: from scratch, in code, spelled out.1:56:20

Let's build GPT: from scratch, in code, spelled out.

Andrej Karpathy
8.2M views • 3 years ago
AI Language Models & Transformers - Computerphile20:39

AI Language Models & Transformers - Computerphile

Computerphile
354K views • 7 years ago
State of GPT | BRK216HFS42:40

State of GPT | BRK216HFS

Microsoft Developer
785K views • 3 years ago
Lecture 1 | Introduction to Convolutional Neural Networks for Visual Recognition57:57

Lecture 1 | Introduction to Convolutional Neural Networks for Visual Recognition

Stanford University School of Engineering
2.9M views • 9 years ago
[1hr Talk] Intro to Large Language Models59:48

[1hr Talk] Intro to Large Language Models

Andrej Karpathy
4.3M views • 2 years ago
A Hackers' Guide to Language Models1:31:13

A Hackers' Guide to Language Models

Jeremy Howard
580K views • 3 years ago
Deep Visualization Toolbox3:54

Deep Visualization Toolbox

Jason Yosinski
270K views • 11 years ago
A Style-Based Generator Architecture for Generative Adversarial Networks6:18

A Style-Based Generator Architecture for Generative Adversarial Networks

Tero Karras FI
1.3M views • 7 years ago
An Observation on Generalization57:21

An Observation on Generalization

Simons Institute for the Theory of Computing
210K views • 3 years ago
But what is a neural network? | Deep learning chapter 118:40

But what is a neural network? | Deep learning chapter 1

3Blue1Brown
25.1M views • 9 years ago
Backpropagation calculus | Deep Learning Chapter 410:18

Backpropagation calculus | Deep Learning Chapter 4

3Blue1Brown
4M views • 9 years ago
Let's build the GPT Tokenizer2:13:35

Let's build the GPT Tokenizer

Andrej Karpathy
1.3M views • 2 years ago