CONCEPT 57 / Language and Transformers / Interactive study
Query, key, and value.
See how one word searches the sentence: its Query [Q] matches other words' Keys [K] to blend their Values [V].
Query [Q] × Keys [K] → Attention weights → Blended Value [V]
Begin with the loaded example. Change one control and watch the diagram and numbers update together.
57 / LIVE LABORATORYLoaded example
All calculations shown here run in the browser from the visible controls and bundled examples.
Inside the calculation
Why it matters
Think of Q as what a word is looking for, K as each word's label, and V as the information it shares.
All calculations shown here run in the browser from the visible controls and bundled examples.