Back to Tokens attention and architecture
Step 3 of 6· Investigate: Attention weights
Shared AI lesson · Tokens attention and architecture
Investigate: Attention weights
Use the source example: q = (1,0), keys and values (1,0), (0,1), (1,1). Read the three weights and the combined output.
Loading this browser experiment…
More things to try · optional
- Edit one value coordinate while keeping the query and keys unchanged. Confirm that the weights stay fixed.
- Set the query position to 1 and enable the causal mask. Only the first token should contribute. Turn the mask off and explain why that would leak future information during next-token training.
Notes, help and related ideas
My notes and reflection
Compare with your prediction
Compare your result with your prediction. Explain a mismatch, then change one condition and try a new case.
Loading your journal…
Your prediction, observation and next question
Prerequisites and related ideas
Key terms: Attention Queries, keys, and values Softmax Causal mask