Some Intuition on Attention and the Transformer
ChatGPT and other chatbots (e.g., Bard, Claude) have thrust LLMs into the mainstream. As a result, more and more people outside ML and NLP circles are trying to grasp the concept of attention and the Transformer model. Here, we’ll address some questions and try to provide intuition on the Transformer architecture. The intended audience is people who have read the paper and have a basic understanding of how attention works. To keep it simple, I’ll mostly refer to “words” in a “sentence”. Nonetheless, attention can apply to any generic set of items in a sequence. For example, instead of words, we could have tokens, events, or products. And instead of a sentence, we could have a paragraph, in-session behavior, or purchase history. Consider machine translation as an example. Before attention, most translation was done via an encoder-decoder network. The encoder encodes the input sentence (“I love you”) via a recurrent model and the decoder decodes it into another language (“我爱你”). Encoding
Some Intuition on Attention and the Transformer eugeneyan Start Here Writing Speaking Prototyping About Some Intuition on Attention and the Transformer [ deeplearning llm ] · 8 min read ChatGPT and other chatbots (e.g., Bard, Claude) have thrust LLMs into the mainstream. As a result, more and more people outside ML and NLP circles are trying to grasp the concept of attention and the Transformer model. Here, we’ll address some questions and try to provide intuition on the Transformer architecture. The intended audience is people who have read the paper and have a basic understanding of how atte
Explore this link on the map →saved by
related reading
- The Illustrated Transformer – Jay Alammar – Visualizing machine learning one concept at a time.jalammar.github.io
- The Illustrated Transformer – Jay Alammar – Visualizing machine learning one concept at a time.jalammar.github.io
- A Mathematical Framework for Transformer Circuitstransformer-circuits.pub
- transformer_attention.pdfarxiv.org
- Everything About Transformerskrupadave.com
- Transformers from Scratche2eml.school
- A Conceptual Guide to Transformers: Part Ibenlevinstein.substack.com
- 1706.03762arxiv.org
- Transformers Explained Visually (Part 3): Multi-head Attention, deep dive | Towards Data Sciencetowardsdatascience.com
- What is an attention mechanism? | IBMibm.com
- Attention is all you need: Discovering the Transformer paper | Towards Data Sciencetowardsdatascience.com
- 9 Transformers – 6.390 - Intro to Machine Learningintroml.mit.edu