Attention in transformers, visually explained | Chapter 6, Deep Learning
Demystifying attention, the key mechanism inside transformers and LLMs.
Instead of sponsored ad reads, these lessons are funded directly by viewers:
Special thanks to these supporters: #thanks
An equally valuable form of support is to simply share the videos.
Demystifying self-attention, multiple heads, and cross-attention.
Instead of sponsored ad reads, these lessons are funded directly by viewers:
The first pass for the translated subtitles here is machine-generated, and therefore notably imperfect. To contribute edits or fixes, visit
And yes, at 22:00 (and elsewhere), “breaks“ is a typo.
------------------
Here are a few other relevant resources
Build a GPT from scratch, by Andrej Karpathy
If you want a conceptual understanding of language models from the ground up, @vcubingx just started a short series of videos on the topic:
If you’re interested in the herculean task of interpreting what these large networks might actually be doing, the Transformer Circuits posts by Anthropic are great. In particular, it was only after reading one of these that I started thinking of the combination of the value and output matrices as being a combined low-rank map from the embedding space to itself, which, at least in my mind, made things much clearer than other sources.
Site with exercises related to ML programming and GPTs
History of language models by Brit Cruise, @ArtOfTheProblem
An early paper on how directions in embedding spaces have meaning:
------------------
Timestamps:
0:00 - Recap on embeddings
1:39 - Motivating examples
4:29 - The attention pattern
11:08 - Masking
12:42 - Context size
13:10 - Values
15:44 - Counting parameters
18:21 - Cross-attention
19:19 - Multiple heads
22:16 - The output matrix
23:19 - Going deeper
24:54 - Ending
------------------
These animations are largely made using a custom Python library, manim. See the FAQ comments here:
#manim
All code for specific videos is visible here:
The music is by Vincent Rubinetti.
------------------
3blue1brown is a channel about animating math, in all senses of the word animate. If you’re reading the bottom of a video description, I’m guessing you’re more interested than the average viewer in lessons here. It would mean a lot to me if you chose to stay up to date on new ones, either by subscribing here on YouTube or otherwise following on whichever platform below you check most regularly.
Mailing list:
Twitter:
Instagram:
Reddit:
Facebook:
Patreon:
Website:
1 view
172
44
2 months ago 00:22:28 1
Мягко от Тревоги l L-теанин l Активатор Мозга l Стресс и Память l L-theanine - Benefits
2 months ago 00:10:14 1
5 Reasons Why ADHD Is Actually Your Unfair Advantage
2 months ago 00:03:53 1
Falling In Reverse - “Popular Monster“
2 months ago 00:12:11 1
Social Skills To Look Confident If You’re Quiet
2 months ago 00:00:00 1
Alan Walker, Dua Lipa, Coldplay, Martin Garrix & Kygo, The Chainsmokers Style 🔥 Summer Vibes #4
2 months ago 00:31:51 1
Les Garçons Bouchers. Шаболовка. 1993 год
2 months ago 00:09:10 1
A Group of Polish Army Officers Was Wiped Out In LVIV┃RU Just One Step Away From Capturing SELIDOVO
2 months ago 01:27:15 1
BIG PHARMA ET CORRUPTION DE LA MÉDECINE : ILS CIBLENT MAINTENANT LES ENFANTS ! | GPTV
2 months ago 00:52:22 1
The Secret Communications Between The IRA And Nazi Germany
2 months ago 00:21:10 1
АСМР Макияж для Лучшей Подруги • ASMR Best Friends Doing Your Makeup
2 months ago 00:04:43 1
TUNGSTEN - The Grand Inferno (Official Music Video)
2 months ago 01:59:13 1
S4E73 | Jennifer Guskin - MK ULTRA & Sex Trafficking Survivor on Epstein, CPS & Witnessing Blackmail
2 months ago 00:00:23 1
Ragnar Lothbrok and Rollo Adventure in the City with Viking Costumes #vikings #fyp
2 months ago 00:50:03 1
Man Builds Amazing Full-Size HELICOPTER | Start to Finish DIY by @Dodoan123
2 months ago 00:02:05 1
The Sims 4 Lovestruck Expansion Pack: Official Reveal Trailer
2 months ago 00:46:54 2
Matussek! im Gespräch mit Martin Sellner
2 months ago 00:01:36 1
The Twilight Saga 6: The New Chapter - Teaser Trailer | Robert Pattinson, Mackenzie Foy
2 months ago 00:47:22 1
RUSSIA vs USA || V1 Beatmaking Battle 2024 || Beatsbyjblack & DaTrackAddict vs Moskvin & Nick Brown