podcasts / The attention family / episode / question
Question

Can the query, key and value space have a different dimension from the input embeddings?

Answered from Q, K, V intuition - self attention with trainable weights | The attention family series - Lecture 6 · The attention family · 2026-09-18

Yes. In Vizuara's Lecture 6, Sreedath Panat projects five tokens of three dimensions each through 3-by-2 weight matrices, so queries, keys and values are all two-dimensional, five rows by two columns. He says the query, key and value spaces share one dimensionality with each other, but many architectures use a size different from the input embedding space. The scaling factor follows the projected size, so this example divides scores by the square root of 2.

Source: our own transcription of the episode. The full conversation is on The attention family (2026-09-18). Read the whole episode summary →

▸More from this episode

Q1What do query, key and value mean in self-attention, according to Vizuara?Q2Why can't self-attention use raw input embeddings for attention scores?Q3How does a key weight matrix change attention scores in Vizuara's dog and ball example?Q4What does an attention-weighted sum of value vectors mean in the transformer formula?Q6How are the W_Q, W_K and W_V weight matrices learned in an LLM?
Transcribe your links. Paste a YouTube, Google Drive or podcast link and WhipScribe gives you the transcript. Transcribe a link →