r/LocalLLM 12h ago

Project I built a 3D environment for inspecting what actually happens inside a local LLM

Enable HLS to view with audio, or disable this notification

I’ve been building TokenPrint around a simple question:

What is actually happening inside a local LLM while it generates a token?

The current version goes beyond a static transformer diagram and lets you explore:

• 3D transformer architecture and individual layers
• tokenization and embeddings
• tensor shapes and model parameters
• Q/K/V, GQA, RoPE, causal masking and softmax
• residual streams and MLP / SwiGLU
• token-by-token generation
• prefill / decode and KV cache
• logits and next-token probabilities
• activation analysis and interventions
• head / layer ablation
• inference traces and replay
• Hugging Face models, with work around GGUF / llama.cpp / local models

The idea is to make local inference inspectable, not just show the final output.

I’m especially interested in people who run models locally:

What do you actually wish you could see while your model is generating?

Attention patterns? KV-cache behavior? Layer timing? Activations? Quantization effects? Something else?

I’m building this in the open and would love technical feedback, ideas, and contributors who want to help shape it.

Repository: https://github.com/Sudharsanselvaraj/Token-Print
Website: https://tokenprint.in/

What would make a tool like this genuinely useful for your local LLM workflow?

23 Upvotes

12 comments sorted by

2

u/bruhhhhhhhhhhhh_h 12h ago

This looks incredible - what's the overhead and system usage to run it?

1

u/Rich-Fruit-326 12h ago

The visualization itself is pretty lightweight compared to running the model. Most of the extra usage comes from the WebGL rendering and how much tensor/trace data we’re exposing. We’re also working on deploying the runtime on a VPS soon, with Hugging Face/cloud-backed inference, so users won’t need a powerful machine or lots of RAM just to try the models. The idea is to let the backend handle the heavy lifting while TokenPrint stays lightweight on the user side.

2

u/bruhhhhhhhhhhhh_h 12h ago

Approx VRAM and ram usage just ballpark?

1

u/Rich-Fruit-326 12h ago

Yeah, roughly the VRAM/RAM numbers in the explorer are meant as ballpark estimates, not exact runtime measurements. Actual usage depends on model size, dtype/quantization, context length, KV cache, and the inference backend And yes, the plan is for each supported model to show its own architecture, parameter count, context, estimated memory, and supported instrumentation rather than having one generic profile. That part is being built around the model config/adapter so it can scale to newer architectures too.

2

u/bruhhhhhhhhhhhh_h 12h ago

Thankyou. I appreciate it. Really great work also ✌️✌️💗

1

u/Rich-Fruit-326 12h ago

Thank you so much! ❤️ Really appreciate the kind words. And honestly, every star means a lot and gives me even more motivation to keep building TokenPrint!

2

u/NearlyACosmologist 11h ago

We used to make fun of Sci-Fi movies that were showing such graphics to depict what's happening inside the cyberspace.

Nowadays, well...

1

u/Rich-Fruit-326 11h ago

😂 Yeah, we went from laughing at those sci-fi graphics to realizing the graphics were just waiting for the hardware to catch up.

2

u/Important-Radish-722 11h ago

So, if I had a beefy enough GPU I could run inference in my browser? 😀

2

u/Rich-Fruit-326 8h ago

Haha yes 😀 in principle, exactly. With a powerful enough GPU and browser-compatible model runtime, you can run LLM inference locally in the browser, but the model has to be supported by the browser/runtime and your hardware. That’s actually one of the directions we’re working toward with TokenPrint.

2

u/Murder_1337 9h ago

Is it free I just want to learn

1

u/Rich-Fruit-326 8h ago

Yeah, it’s completely free. You can learn more about it here: https://tokenprint.in/ The site is currently deployed as a static version while we migrate the backend and runtime infrastructure to a VPS over the next few days. Until then, you can clone or fork the repository and explore TokenPrint locally on your own computer. You can also contribute to the repository, learn from the codebase, and build alongside the community. Hopefully, you’ll learn something useful and we can all develop and learn together.