Key (K)
What is Key (K)?
In one sentence: In attention, a key is a list of numbers that describes what a word offers, so queries can find it.
If queries are questions, keys are like name tags. The model compares each query with every key to score how well they match. A strong match means "this word is relevant, pay attention to it."
What does Key (K) look like?
The key for "ball" might signal "I am a round object that can bounce," which matches the query of "it" in "it was bouncy."
Why does Key (K) matter?
Keys make it possible for attention to find the right information quickly.
Last updated · Fact-checked by The AI Math
Linking to this page from a lesson or article? <a href="https://getaimath.com/dictionary/key-k/">Key (K), explained simply</a> (The AI Math Dictionary)