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
141
38
2 weeks ago 00:05:03 1
Present Perfect Tense
3 weeks ago 00:01:55 1
𝐓𝐞𝐫𝐦𝐢𝐧𝐚𝐭𝐨𝐫 𝟐: 𝐓-𝟖𝟎𝟎 𝐋𝐢𝐟𝐞-𝐒𝐢𝐳𝐞 𝐁𝐮𝐬𝐭 𝐔𝐧𝐛𝐨𝐱𝐢𝐧𝐠
3 weeks ago 01:21:20 1
Miss Monique - Sunset Dj Mix in Mykonos, Greece 2024 [Melodic Techno & Progressive House ]
3 weeks ago 00:00:26 4
Literally my favorite thing in the world RN 🦑Her rage is delicious. All credit @drewonthekit #metal
3 weeks ago 00:02:02 12
DayZ Update Teaser
3 weeks ago 00:50:20 1
L’HUMANITÉ EN DANGER : HYPNOSE, CONTRÔLE MENTAL ET ENTITÉS DÉMONIAQUES | MARIE-PASCALE REMY | GPTV
3 weeks ago 01:23:58 1
Symbols of an Alien Sky, Episode 2: The Lightning-Scarred Planet Mars
4 weeks ago 00:57:07 1
How the pro-Israel lobby influences US policy during Gaza war | Stephen Walt | Real Talk
4 weeks ago 09:16:52 1
Healing The Inner Child | Free Yourself From Trauma | Release Old Wounds | 417 Hz Music Therapy
4 weeks ago 00:04:38 1
Starbomb - Kiss The Elden Ring (Official Music Video)
4 weeks ago 00:01:30 1
Sense - A Cyberpunk Ghost Story Trailer (Nintendo Switch)
4 weeks ago 03:33:33 1
Manifest Love & Miracles | 528Hz Positive Change & Self-Love Healing Frequency | Meditation & Sleep
4 weeks ago 00:40:35 1
ЗВЕЗДА ТРЕТЬЕГО РЕЙХА! Марика Рекк. Актриса немецкого кино.
4 weeks ago 01:04:15 1
The Very Best Cover Of Enigma 90s Cynosure Chillout Music Mix 2023💖
4 weeks ago 01:28:47 1
PINCHING PENNY 🎬 Exclusive Full Thriller Action Movie 🎬 English HD 2023
4 weeks ago 00:07:33 1
Jeep Avenger 4xe The North Face Edition - NON PLUG-IN AWD
4 weeks ago 00:02:26 19
Beautiful Girl Buffalo Riding | Unseen Pakistani Village Life | Ancient Culture | Stunning Pakistan
4 weeks ago 01:25:25 1
Heavenly Father • Music for Praise and Worship, Soaking Worship #soaking
4 weeks ago 01:45:45 1
Timberlake - Bones (Best Popular Remix Risad 2024) Новая коллекция популярных песен 2024 Trending
4 weeks ago 00:14:05 1
A quest for love: Shahab and love for others
4 weeks ago 00:04:01 1
Laura Branigan - Self Control - All Night Fuji (1984)
4 weeks ago 00:03:35 1
Dj Ramezz “Que Pasa“ 2023 ( New Eurodance)
4 weeks ago 00:03:45 1
Dj Ramezz & Pete D Moore “ Don’t Waste My Time“ 2023 (New Eurodance)