Why split V from K instead of just reusing K as the value vector?
K is shaped to be findable by queries; V is shaped to be useful content delivered after the match. Two different jobs, two different optimal representations, two separate projections.
Picture browsing a library. A book's title makes it findable on the shelf, but the title is not what you actually read once you pull the book down. The body of the book is what you came for. If every book had to use its title text as its entire content, you'd have a library where the only thing inside any book is its own name repeated. Useless. Real libraries (and real transformers) keep titles separate from contents so each can be designed for its own purpose, finding versus reading.
Detailed answer & concept explanation~6 min readEverything 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. 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.
4m: K's role as lookup key, V's role as content payload, the different gradient signals shaping each, why tying K = V hurts quality empirically, and how this differs from head-level sharing in MQA / GQA.
Real products, models, and research that use this idea.
- Every production transformer since the original Vaswani 2017 paper keeps K and V as separate projections; the design has not been seriously revisited at frontier scale.
- Llama 4 Maverick uses GQA: K and V are shared across query heads (8 KV heads for 64 query heads) but K and V remain distinct tensors per group.
- Claude Opus 4.7 and Gemini 3.1 Pro both use GQA with the same K-vs-V separation.
- DeepSeek V4's MLA compresses K and V into a shared low-rank latent, but decompresses them into distinct K and V tensors before the attention computation.
- Research ablations (DeLighT, several attention-efficiency papers) consistently show 1 to 3 percent perplexity regression when K and V are tied to the same projection.
What an interviewer would ask next. Try answering before peeking at the approach.
QHow is sharing K and V across heads (MQA, GQA) different from tying K to V within a head?
QWhat would happen if you trained V with a non-linear projection (V = relu(xW_V))?
Don't say thisRed flags and common mistakes that signal junior thinking. Click to expand.
Red flags and common mistakes that signal junior thinking. Click to expand.
Believing the V projection adds non-linearity. It doesn't, V is a pure linear projection of the input. The reason for a separate V is functional separation, not non-linearity.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.
Same topic, related formats. Practice these next.