All demos
Attention Explorer
Find a relationship one attention head notices
A transformer has many attention heads. Each can emphasize a different connection among earlier token pieces. Start with a question, compare the heads, then inspect one map closely.
Try this
- Choose a sentence and its reading question.
- Select the token that is doing the reading.
- Compare heads before opening one map.
1. Choose The Token That Is Reading
It can only attend to itself and earlier tokens.
2. Compare What Each Head Notices
Each card lists the three earlier token pieces receiving the most attention. Choose a head to inspect its full map.
3. Inspect The Selected Head
Choose a head above to see its map.
Rows: the token doing the reading. Columns: earlier token pieces it can consider. Darker cells mean stronger attention. The outlined row is the reading token.
Compare this reading token across all layers
For the current head, each layer lists its three strongest links. Select a different layer in Advanced view to update the head comparison.