Multi-Query Attention (MQA)
What is Multi-Query Attention (MQA)?
In one sentence: Multi-query attention is a faster type of attention where all heads share one set of keys and values but keep separate queries.
What does Multi-Query Attention (MQA) look like?
A model with 32 heads using MQA stores keys and values for just 1 head instead of 32.
Why does Multi-Query Attention (MQA) matter?
MQA makes models cheaper and faster to run, especially with long texts.
Last updated · Fact-checked by The AI Math
Linking to this page from a lesson or article? <a href="https://getaimath.com/dictionary/multi-query-attention-mqa/">Multi-Query Attention (MQA), explained simply</a> (The AI Math Dictionary)