Define a single attention head, what does one head actually own and produce?
Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
A head owns its own Q, K, V projections of width d_head, runs its own softmax, and produces a d_head-dimensional context vector per token.
Think of a panel of judges scoring an audition. Each judge has a private notebook for what they care about, a private notebook for what each contestant offers, and a private notebook for the contestant's actual material. Every judge scores the contestants independently using only their own three notebooks, never peeking at another judge's notes. After scoring, each judge writes down a short personal verdict. The verdicts are then stapled together and handed to a single producer who reads the whole stack and writes the final result on the show. Each judge is one independent scorer in the layer; the producer at the end is the one who mixes the verdicts back into the show.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
6-8 min: what a head owns + shape of W_Q, W_K, W_V + d_head formula + parallel execution + concat + W_O mixing + GQA and MQA variants.
Real products, models, and research that use this idea.
What an interviewer would ask next. Try answering before peeking at the approach.
Red flags and common mistakes that signal junior thinking. Click to expand.
Saying heads share Q, K, and V projections. They do not in standard multi-head attention. Each head has its own (d_model x d_head) projection matrices.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.