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
1
0
7 months ago 00:04:04 1
Slipknot - Before I Forget [OFFICIAL VIDEO] [HD]
7 months ago 01:02:48 1
TECHNO MIX 2024 | Hi-LO, Space 92, Cosmic Boys | Mixed by Konrad (Italy)
7 months ago 00:07:21 1
Illustrator Tutorials | Luxury Background Black and Gold #mardangraphicsdesigner
7 months ago 00:00:46 1
Crochet Zebra, Giraffe, and Hippopotamus Baskets #crochetbasket #crochetanimals #crochetideas
7 months ago 05:09:03 1
Sacral Chakra: 417Hz Creative Flow: Ignite Passion and Sensuality with Sacral Chakra
7 months ago 00:01:20 5
Trap Sample Pack Night Racer | Drum Pads 24
7 months ago 00:02:15 1
Little Amal | The Walk Highlights 2021
7 months ago 00:08:23 1
Storage Bag For Clothes Or Blankets / To Gift or Sell
7 months ago 00:04:06 1
Only Two Seams / Winter Turban Headband In 5 Minutes / Sew And Sell
7 months ago 00:17:42 1
♡これさえ見れば【ZARA】のシルク【スカーフの巻き方】は簡単!27アレンジ!how to wear a ZARA silk scarf 27 ways
7 months ago 00:01:33 1
Bond 26 - First Trailer | Henry Cavill, Margot Robbie
7 months ago 00:01:24 1
Rambo 6: New Blood - Teaser Trailer | Sylvester Stallone, Jon Bernthal
7 months ago 00:09:11 1
Intermittent Fasting: Handle Your Health Problems The Natural Way
7 months ago 00:04:15 2
Sam Ryder - Fought & Lost (Official Lyric Video)
7 months ago 00:03:50 1
Dua Lipa - Break My Heart (Official Video)
7 months ago 00:08:08 1
The most delicious potato recipe of my grandmother! You will do it every day! Easy dinner!
7 months ago 11:55:00 1
880 Hz Lung Healing Frequency: Music to Detox Lung & Clear Mucus
7 months ago 00:05:20 1
SAVAGE-44 - New wave ♫ New Eurodance 2023 ♫
7 months ago 00:07:53 1
JoLang Reaction to the Song “Homeland“ by Sergei Trofimov
7 months ago 00:20:49 1
Excess deaths and data deficit
7 months ago 00:03:19 1
Strong fire at factory producing weapons and electrical equipment in Russia’s Voronezh region
7 months ago 01:03:18 1
“ 𝙮𝙤𝙪𝙧 𝙘𝙤𝙢𝙛𝙤𝙧𝙩 𝙘𝙝𝙖𝙧𝙖𝙘𝙩𝙚𝙧 𝙞𝙨𝙣’𝙩 𝙧𝙚𝙖𝙡“ a playlist
7 months ago 00:44:01 1
’I Heard God Speak’: Columbine Survivor’s ’God’ Moment Amid Horror
7 months ago 00:30:53 1
Make your Home Cozy. Sewing project - Geese. Start of gardening work. Simple rural life