tomashmon Hacker News • Recommends
On “The Illustrated Transformer (2018)”
#transformer#attentionmechanism#self-attention
8.7M subscribers • 42 videos on Hallway
Intermediate. Assumes working knowledge.
4.8M views2 years ago5 recommendations
AI and machine learningTransformers and LLMsNeural networks and deep learningMath for machine learning
Grant Sanderson provides a visual, step-by-step explanation of the attention mechanism inside transformers and LLMs.
Demystifying attention, the key mechanism inside transformers and LLMs. Instead of sponsored ad reads, these lessons are funded directly by viewers: 3b1b.co/support Special thanks to these supporters: 3blue1brown.com/lessons/attention#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: 3b1b.co/support The first pass for the translated subtitles here is machine-generated and, therefore, notably imperfect. To contribute edits or fixes, visit criblate.com Звуковая дорожка на русском языке: Влад Бурмистров. ------------------ Here are a few other relevant resources Build a GPT from scratch, by Andrej Karpathy youtu.be/kCc8FmEb1nY If you want a conceptual understanding of language models from the ground up, @vcubingx just started a short series of videos on the topic: youtu.be/1il-s4mgNdI?si=XaVxj6bsdy3VkgEX 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. transformer-circuits.pub/2021/framework/index.html Site with exercises related to ML programming and GPTs gptandchill.ai/codingproblems History of language models by Brit Cruise, @ArtOfTheProblem youtu.be/OFS90-FX6pg An early paper on how directions in embedding spaces have meaning: arxiv.org/pdf/1301.3781.pdf ------------------ Timestamps: - Recap on embeddings - Motivating examples - The attention pattern - Masking - Context size - Values - Counting parameters - Cross-attention - Multiple heads - The output matrix - Going deeper - Ending ------------------ These animations are largely made using a custom Python library, manim. See the FAQ comments here: 3b1b.co/faq#manim github.com/3b1b/manim github.com/ManimCommunity/manim/ All code for specific videos is visible here: github.com/3b1b/videos/ The music is by Vincent Rubinetti. vincentrubinetti.com vincerubinetti.bandcamp.com/album/the-music-of-3blue1brown open.spotify.com/album/1dVyjwS8FBqXhRunaG5W5u ------------------ 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 whichWhat people say. Highly recommended as one of the clearest and most intuitive visual explanations of transformer attention.
tomashmon Hacker News • Recommends
On “The Illustrated Transformer (2018)”
onlyrealcuzzoon Hacker News • Recommends
On “Claude Opus 4.8”
MAXPOOLon Hacker News • Recommends
On “The Engineer’s Guide to Deep Learning: Understanding the Transformer Model”
superkuhon Hacker News • Recommends
On “LLMs Aren't Thinking, They're Just Counting Votes”
wren6991on Hacker News • Recommends
On “Can I Buy Your KV Cache?”
lolinderon Hacker News • Disputes
On “YouTube seems to once again be rolling out its widely hated new web redesign”
rahimnathwanion Hacker News • Mentions
On “Visualizing Attention, a Transformer's Heart [video]”
peterlaion Hacker News • Mentions
On “3Blue1Brown Follow-Up: From Hypothetical Examples to LLM Circuit Visualization”