By Team Edtoolkits · AI learning
Change a query in a hand-built attention example and trace how matching keys change the value mixture.
Use the guide alongside the working tool.
Open Queries, Keys and Values: The Library Lookup →Explore the lesson
Watch a query search the shelves for matching keys.
Turn the dials of the query and see the match change.
Read what the word pulled in from the values.
A comparison to try
Keep the keys and values fixed and switch what the query is looking for. Follow the matching scores into attention weights, then inspect which value dimensions dominate the mixture.
Read the result
Keys determine how strongly an item is selected; values supply the information being blended. A highly weighted item contributes more of its value vector, rather than simply copying its displayed word into the answer.
A mistake to avoid
The six-number vectors are hand-written teaching data. Their labelled dimensions are easier to interpret than learned representations, and the strongest attention weight alone does not explain a real model's final decision.
Teaching model and privacy
The query, key and value numbers are small and written by hand (6 numbers per word). In a real model they come from learned weights and are much longer. Nothing leaves your browser.
Ready to apply this workflow?
Try Queries, Keys and Values: The Library Lookup →Explore a related workflow
- Choose a course entry point and verify saved progress
Use prior knowledge to select a starting chapter while distinguishing local progress from an account or a qualification.
- AI Tokens: Inspect Pieces, Spaces and Stable Teaching IDs
Compare common words, rare words and numbers without using the playground as an exact provider counter.
- Inspect candidates before continuing text
Compare normalized next-word probabilities with the choices sampled from them.
- Choose complexity using held-out error
Compare training and test curves before calling a detailed fit an improvement.
Found unclear instructions or an unexpected result? Contact Team Edtoolkits.