logoalt Hacker News

Show HN: LLM Attention Visualization

95 pointsby ifztoday at 4:59 PM18 commentsview on HN

Comments

MCP123today at 9:33 PM

This is great, thank you. I have to teach this stuff on Friday so perfect timing. It's hard to explain the attention mechanism in a way that becomes intuitive because the weighting scheme does not help much with the intuition. Having a visualization like this helps a lot. Don't move that page please since I'll link to it!

fuddletoday at 6:49 PM

This is great, I've read multiple books and watched videos about the attention mechanism. Now that I understand it, this is the clearest example I've seen on how attention works.

wopaktoday at 6:46 PM

neat, combining info from two phrases is hard to see without such a tool.

are you worried later-layer attention gets drowned out by earlier layers just because there are more of them contributing to the sum?

itsnasmetoday at 6:34 PM

I like the visualisation. Pretty cool

ex-aws-dudetoday at 8:05 PM

I don't know much about LLMs but does that mean you have N^2 computation with the context size since every token needs to track how it relates to every other token?

show 3 replies
sva_today at 5:50 PM

I highly question this simplistic idea of high vector magnitude = high influence.

show 3 replies
staredtoday at 6:49 PM

I am curious what's the actual formula.

I mean, there so many headers and layers, it is tricky to make a choice that will resonate with our intuition . Is it some weighted average? Or maybe ablation test?

show 1 reply
colophontiotoday at 5:33 PM

[dead]

Yyylovtoday at 9:16 PM

[dead]