What is attention head?
One of several attention operations that run side by side in a layer, each with its own weights, so that different relationships between tokens can be followed at once.
Where it is taught
Heads, layers and what they learn. One attention pattern is not enough. A transformer runs several side by side and stacks them many layers deep, and each ends up with a job of its own.
What the lesson leaves you with
- Multi-head attention runs several smaller attention operations in parallel.
- Stacking layers lets later attention build on relationships found earlier.
- The roles of heads are discovered by training, not assigned by people.
Questions
- What is attention head?
- One of several attention operations that run side by side in a layer, each with its own weights, so that different relationships between tokens can be followed at once.
- Where is attention head used in AI?
- One attention pattern is not enough. A transformer runs several side by side and stacks them many layers deep, and each ends up with a job of its own.
- What is the key idea to remember about attention head?
- Multi-head attention runs several smaller attention operations in parallel.
- Where can I learn attention head step by step?
- In the lesson “Heads, layers and what they learn” in Gradient’s course on the maths behind AI, with interactive diagrams and questions.