Why use multiple attention heads?
Reveal the answer and explore the explanation.
05MediumHigh priorityWhy use multiple attention heads?
Answer
MediumHigh priority
Why use multiple attention heads?
Answer
Runs multiple learned attention projections in parallel and combines their outputs.
Deeper understanding
Each head has separate learned projections of queries, keys and values. Outputs are concatenated and projected to model width. Multiple heads can learn different relationships but the attention weights are not guaranteed faithful causal explanations.
Practical example
Let different heads capture different relations.
Reference: Further reading ↗