Skip to content

Inside the Transformer

Multi-Head Attention

8 min+85 XPStep 1/10

One head, one viewpoint

A single attention pass produces one set of weights — one answer to 'who should I listen to?' But a sentence needs many answers at once.

Take 'The trophy didn't fit in the suitcase because it was too big.' Resolving 'it' requires a size comparison. At the same moment, something must track that 'trophy' is the subject and 'didn't fit' is the verb. One softmax can't rank all of that simultaneously.