Exercises — Queries, keys, and values (Q, K, V)
Self-check questions, exercises, and worked answers
← Back to the lesson: Queries, keys, and values (Q, K, V)
Check the essential idea
Extended exercises on Q/K/V and attention.
Which projections determine attention weights, and which one supplies the aggregated vectors? What happens if V changes while Q and K stay the same?
Show the reasoning
Q and K determine the attention weights; V supplies the vectors whose content is aggregated. Changing Q or K can change the weights. If only V changes, the weights remain unchanged because the scores depend on Q and K; the aggregated content can change, but need not do so: weighted changes can cancel out.