I wanted to actually see what a model is doing when it writes, so I built this. It runs a small model (SmolLM2-135M) completely in your browser. You type a few words and it continues the sentence one word at a time. For each word you can see the options it was choosing between, and links between words showing which earlier tokens it was "most looking at" to predict the next token. You can click any word to see where most of its attention went. It uses a small LLM (135M params only), so the model is not very good at predictions but the whole idea of this project was to visualize attention mechanism 😄 Code: https://github.com/talhatahir-10xe/attention-galaxy Demo: https://talhatahir-10xe.github.io/attention-galaxy/   submitted by   /u/Minute-Mountain2665 [link]   [comments]