✳flâneur — a map of the web's best reading
An Intuition for Attention | Jay Mody
jaykmody.com · 2,389 words · saved by 1 readers
Deriving the equation for scaled dot product attention.
An Intuition for Attention | Jay Mody An Intuition for Attention October 22, 2022 ChatGPT and other large language models use a special type of neural network called the transformer. The transformer defining feature is the attention mechanism. Attention is defined by the equation: \[\text{attention}(Q, K, V) = \text{softmax}(\frac{QK^T}{\sqrt{d_k}})V\] Attention can come in different forms, but this version of attention (known as scaled dot product attention) was first proposed in the original transformer paper . In this post, we'll build an intuition for the above equation by deriving it from
Explore this link on the map →saved by
related reading
- Understanding Attention in LLMs | Bartosz Milewski's Programming Cafebartoszmilewski.com
- The Illustrated Transformer – Jay Alammar – Visualizing machine learning one concept at a time.jalammar.github.io
- neural networks - What exactly are keys, queries, and values in attention mechanisms? - Cross Validatedstats.stackexchange.com
- Transformers from Scratche2eml.school
- Your Transformer is Secretly an EOT Solver | Elements of a Vector Spaceelonlit.com
- A Mathematical Framework for Transformer Circuitstransformer-circuits.pub
- The Illustrated Transformer – Jay Alammar – Visualizing machine learning one concept at a time.jalammar.github.io
- What is an attention mechanism? | IBMibm.com
- Multi Query Attention (MQA) and Grouped-Query Attention (GQA)tinkerd.net
- Attention Is Off By One – Evan Millerevanmiller.org
- Ask HN: Can someone ELI5 transformers and the “Attention is all we need” paper? | Hacker Newsnews.ycombinator.com
- A Deep Dive into Transformers with TensorFlow and Keras: Part 1 - PyImageSearchpyimagesearch.com