#447 overall
Karpathy lecture on attention and transformers
YouTube
1 recommender · 1 thread · recommended in 1 year, 2023 · score 1.0
A video lecture by Andrej Karpathy explaining the attention mechanism used in transformers, covering queries, keys, values, and how their dot products measure affinity between tokens.
The commenter calls it the best video for learning attention, praising how it explains queries, keys, and values as message passing between vectors.
Machine Learning & AIintermediatefreevideo lectures#attention#transformers#karpathy#queries and keys#deep learning
Recommendations by year
20062026
Here’s another awesome Karpathy lecture from Stanford:
https://youtu.be/XfpMkf4rD6E?si=1_EmuYDFfi7RNEhz
This video is the best for learning attention, specifically where he explains:
Think of attention like a directed graph of vectors passing messages to each other
Keys are what other tokens are communicating to you,
Queries are what you are interested in,
and Values are what you are projecting out yourself.
When you matrix multiply the queries x keys(transposed), you measure the interestingness or affinity between the two.