8 ms·
It's really simple, basically just the magnitude of the value vector, weighted by QK dot product, summed across all attention heads and layers. When I started,
by ifz 27d ago
It's really simple, basically just the magnitude of the value vector, weighted by QK dot product, summed across all attention heads and layers.
When I started, I expected I'd have to experiment a lot to find something comprehensible. But this simple computation can already show some patterns.
- stared 27d agoNice! Sometimes the simplest approaches work the best.
- nullbio 26d agoMight be cool to try different colors for the different attention heads instead of summing them across all attention heads, and making the backgrounds composed of stacked color layers? So you can see how each attention head attends to tokens individually.