inside-llm
An open-source tool for visualizing the internal states of LLMs. It loads GGUF models via llama.cpp and compares the token-by-token generation process of different quantized versions in the browser, offering streaming views, candidate distributions, sampling-chain tracing, timeline branching, and Logit Lens.
Timeline (last 90 days)
The developer has released the open-source tool inside-llm, which loads one or two GGUF models based on llama.cpp and displays the model's internal state in real time in the browser as it generates text.
inside-llm's streaming view displays each model's text stream in columns, where each token's brightness represents the probability level, and is marked in magenta when the two models' choices differ.
inside-llm offers two streaming comparison modes, lockstep mode and free mode: in lockstep mode the two models read the same text, while in free mode each generates according to its own choices until they diverge.
inside-llm's candidate distribution module compares models A and B with mirrored bar charts and computes entropy, effective number of options, Jensen-Shannon divergence, and bidirectional KL divergence.
inside-llm's sampling chain trace (Gates) traces stage by stage through penalty, top-k, top-p, min-p, temperature, GBNF grammar and other stages, showing the number of candidates retained after each stage and the distribution changes, and the chain order and random seed are configurable to ensure experimental reproducibility.
inside-llm maintains a KV state snapshot for each model, so that clicking any historical node in the branch tree can directly restore the K/V cache at that point and continue generation without recomputing the prefix from scratch; the snapshots occupy storage space proportional to sequence length, which is also one of the reasons the tool requires both models to be placed in VRAM at the same time.
Via the --lens parameter, inside-llm can display each layer's prediction of the next token, presented as a 2D heatmap or a 3D relief plot.
inside-llm uses a single C++17 process directly linking llama.cpp (currently using the stable branch), sends compact binary frames to a Svelte 5 + Canvas 2D page via WebSocket, lazily loads three.js for the 3D relief plot, and embeds the web page within the binary.
inside-llm's recorded sessions are obtained by compressing the same frame stream, and can be replayed in a static page without an engine, model or GPU.
inside-llm provides self-contained packages for Linux (glibc 2.35+) and Windows, supports CUDA or Vulkan (Vulkan covers AMD, Intel Arc and NVIDIA); the tool only listens on 127.0.0.1, has no accounts, no telemetry, and uses the MIT license.
1 more timeline events
All Facts (11)
inside-llm's limitations include: the two models must share a tokenizer; both models must be placed in VRAM simultaneously and only one GPU is used at a time; integrated graphics are not used and it falls back to CPU when there is no discrete GPU; only text is supported, and sharded GGUF and embedding models are not supported.
50%Unverifiedinside-llm's streaming view displays each model's text stream in columns, where each token's brightness represents the probability level, and is marked in magenta when the two models' choices differ.
50%Unverifiedinside-llm offers two streaming comparison modes, lockstep mode and free mode: in lockstep mode the two models read the same text, while in free mode each generates according to its own choices until they diverge.
50%Unverifiedinside-llm's candidate distribution module compares models A and B with mirrored bar charts and computes entropy, effective number of options, Jensen-Shannon divergence, and bidirectional KL divergence.
50%Unverifiedinside-llm's sampling chain trace (Gates) traces stage by stage through penalty, top-k, top-p, min-p, temperature, GBNF grammar and other stages, showing the number of candidates retained after each stage and the distribution changes, and the chain order and random seed are configurable to ensure experimental reproducibility.
50%Unverifiedinside-llm maintains a KV state snapshot for each model, so that clicking any historical node in the branch tree can directly restore the K/V cache at that point and continue generation without recomputing the prefix from scratch; the snapshots occupy storage space proportional to sequence length, which is also one of the reasons the tool requires both models to be placed in VRAM at the same time.
50%UnverifiedVia the --lens parameter, inside-llm can display each layer's prediction of the next token, presented as a 2D heatmap or a 3D relief plot.
50%Unverifiedinside-llm uses a single C++17 process directly linking llama.cpp (currently using the stable branch), sends compact binary frames to a Svelte 5 + Canvas 2D page via WebSocket, lazily loads three.js for the 3D relief plot, and embeds the web page within the binary.
50%Unverifiedinside-llm's recorded sessions are obtained by compressing the same frame stream, and can be replayed in a static page without an engine, model or GPU.
50%Unverifiedinside-llm provides self-contained packages for Linux (glibc 2.35+) and Windows, supports CUDA or Vulkan (Vulkan covers AMD, Intel Arc and NVIDIA); the tool only listens on 127.0.0.1, has no accounts, no telemetry, and uses the MIT license.
50%UnverifiedThe developer has released the open-source tool inside-llm, which loads one or two GGUF models based on llama.cpp and displays the model's internal state in real time in the browser as it generates text.
50%