Three learned views of the same input let one token ask, advertise and carry information separately.
Made for you now: slide lessons from basics to production, usually with code and a quiz. See a finished one
Each token vector x is multiplied by three learned matrices to produce a query (what I am looking for), a key (what I offer) and a value (what I hand over if chosen).
Using separate projections lets the model decide independently what to match on and what to pass along.
If queries and keys were the raw vectors, similarity would be fixed by the embedding alone. Learned projections let each layer define its own notion of relevance.
Step 1
Token states X
One vector per token.
Step 2
Multiply by W_Q, W_K, W_V
Three learned matrices.
Step 3
Q, K, V
Ask, advertise, carry.
Step 4
Feed attention
Q and K score; V is mixed.