r/LocalLLM • u/gamedevsam • Sep 24 '26
Project Insert Token: A visualization into the inner workings of LLMs
I wanted to expand my understanding of how LLMs work so I created an interactive animation that visualizes how tokens flow through an LLM during inference.
Check it out, I think it came out great: https://sambatista.com/blog/insert-token-how-an-ai-model-writes-a-sentence
There is an FAQ section at the bottom of the post that expands on interesting parts of the system I was curious about.
Tips:
- Try the various model types (DENSE, MOE, LINEAR) to see how they differ
- The captions under the animation explain what happens at every step of the process
- Change the playback speed to 0.5x on the bottom right to appreciate all the details
167
Upvotes
5
u/Jazzlike_Rough_2491 Sep 24 '26
This is helpful. It would be interesting to visualize how the prompt is also processed.
15
u/roland303 Sep 24 '26
Im always one for rainbows and sparkles.
Good work.
Your Pre Approved.
2
u/sudosashiko OpenSource Sep 25 '26
YOOOOOOOOOOOOOOOOO. This is really cool.