Zenaique

Why split V from K instead of just reusing K as the value vector?

MCQ·Easy·4.0 · 0·~1 min·Asked atCerebrasLightning AiMckinsey·Relevant atMicrosoft
Attempt it
TL;DR

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.

Memory aid
Sign in to see the mnemonic that makes this stick.
Easy to grasp

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.

Concept explanation~2 min read

Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.

The K vs V separation is the cleanest example of role-driven design inside the attention block. Each projection serves a distinct purpose, and the two purposes pull on the optimizer in different directions during training. Forcing K and V into the same vector collapses a degree of freedom the model genuinely uses, which is why tied K = V is rarely seen in production despite the obvious memory savings.

The right way to think about it: attention is a soft retrieval. Q is the question being asked. K is the lookup key, the thing that determines whether this token gets retrieved. V is the payload, the content that gets delivered when the token is selected. Three different roles, three different projections.

This deep dive walks through the role of each projection, the gradient signals that shape them differently during training, the empirical evidence that tied K = V costs quality, and the contrast with head-level sharing (MQA, GQA) which is a different kind of weight sharing that doesn't have the same cost.

The three projections and their roles

Attention computes three projections from each input vector x: Q = x W_Q, K = x W_K, V = x W_V. Each plays a distinct role in the attention computation.

Q: the lookup probe

Q is what the current token is asking about. The attention score for token i attending to token j is (q_i dot k_j) / sqrt(d_k). The role of Q is to encode the lookup criterion: 'what kind of token am I looking for?'

During training, Q's gradient signal shapes it toward being a good probe for the K vectors that should be retrieved. Q learns to align with relevant Ks and misalign with irrelevant ones.

K: the lookup key

K is what each token advertises so it can be found. Token j's K vector is what gets dot-producted with every Q in the sequence to compute attention weights. The role of K is to encode the 'findability' of this token: 'what kinds of queries should retrieve me?'

During training, K's gradient signal shapes it toward alignment with the queries that should retrieve this token. K is optimized for discriminability in the query-vector space.

V: the content payload

V is what gets delivered when a token is selected. The output for query i is output_i = sum_j a_ij V_j. V is consumed only in this weighted sum, after attention weights have been decided.

During training, V's gradient signal shapes it toward carrying features that the downstream FFN can productively use. V is optimized for informativeness in the output space.

Three projections, three roles, three distinct gradient signals. The separation isn't cosmetic; it's how the optimizer encodes three distinct objectives into three distinct subspaces.

Why K and V want different representations
Empirical evidence for the separation
K vs V tying is not the same as MQA / GQA
Sign in to unlock the full deep dive.

Situations where this technique stops working.

Sign in to see when this approach fails.

2–4 min · Everything important, quickly.

Sign in to see the quick scan of the deep dive.

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.
Sign in to see more production examples.

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?
A

MQA and GQA share along the head axis, where the model has demonstrable redundancy: many heads learn similar attention patterns, so collapsing some of them via grouping loses little. Tying K = V shares within a head between the lookup role and the delivery role, where the model has structural distinction. Sharing along an axis with redundancy is cheap; sharing along an axis with distinction is expensive.

2 more follow-ups an interviewer would ask next. Sign in to reveal them.

Red flags & common mistakes

The phrases that signal junior thinking. Click to expand.

Most common mistake

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.

Sign in to see all red flags and common mistakes.

60 second bullets to scan on the way to the call.

  • What K does in the attention computation

  • What V does in the attention computation

Sign in to unlock the revision sheet.

Primary sources. Browse if you want the original framing.

Similar questions

Same topic, related formats. Practice these next.

4 curated
Next question
Explain scaled dot product attention.
Short answer·Medium