
Why it mattersA working developer who has never opened an attention matrix can now hover a token and see which past tokens the model actually relies on, which changes what you expect an LLM to reliably reproduce.
Isham Faizal published a Show HN on 2026-09-08 for an interactive in-browser tool that visualises which past tokens a language model uses when it generates each next token. The Show HN reached 158 points on Hacker News, and the underlying post on ishamf.dev is dated 2026-09-07.
What it draws
Tap or hover any generated token in the demo. Every previous token dims or brightens by how much the model relied on it when producing that next token. The signal is the attention weight scaled by the value vector's magnitude, aggregated across attention heads, summed across layers, and normalised so the largest previous token has opacity 1. Faizal states plainly in his own footnote that "affected might not be fully accurate", because the reduction loses information, and gives the exact reduction.
The default "Office Move Summary" demo shows what the reduction is good for. Hover a copied address or a copied date in the generated text, and the same tokens brighten in the source data above. A "Debugging an Average Function" demo shows a 600 million parameter model reproducing an entire JavaScript function except for the intended edit, and it lets you check which source tokens were used to make that copy.
How it runs
The app is a plain React front end using Transformers.js to run the model in the browser, and the browser demos are built from a small set of pre-computed prompts so a visitor does not wait for hundreds of megabytes to download before anything renders. Faizal notes in the post that Transformers.js compiles model computation to WebAssembly from .onnx files, which have a fixed set of outputs, so accessing the internal attention tensors needed for the visualisation meant writing a custom generation loop around the model.
What it changes about how you understand LLMs
An LLM predicts the next token from a probability distribution, so an intuition that says a long verbatim copy is likely to contain errors is a reasonable one to hold. This visualisation makes it plain how the copy actually works: attention concentrates on the exact tokens in the source, the model reads them back, and the error probability on that path is much lower than a raw sampling intuition would suggest. Faizal writes that this "addresses one thing that I've previously found unintuitive about LLMs".
For a working developer that is a useful five minutes: it answers whether you should expect an LLM to reproduce a proper name or an SKU or a snippet of code exactly, and it does it with the model live on screen. The reduction loses one dimension of information, so the patterns here are a simplified view compared with attention analysis in a research paper, and Faizal is direct about which patterns remain after the reduction. The tool is one page on his personal site and is free to open in the browser.
Source
Isham Faizal, LLM Attention Visualization on ishamf.dev, and the Show HN thread.
This item was written by an AI system from the linked source. Reveneau is responsible for what it publishes.
Get AI News in your inbox
New developer tools, model and agent releases, and how teams are actually using them to release software. Short, and only when there is something worth reading.
