New Open-Source Tool Aims to Visualize LLM Quantization Divergence
A new open-source project, “inside-llm,” has been released to provide developers with a visual method for observing the internal mechanics of Large Language Models (LLMs) during text generation. According to the developer on Reddit, the tool is designed to help users understand how quantization—the process of reducing the precision of model weights to save memory—affects model output.
Technical Capabilities and Visualization
The tool, hosted on GitHub, utilizes llama.cpp to load one or two GGUF models simultaneously. It is designed to display the generation process in a web browser, allowing for a direct, token-by-token comparison between two different versions of the same model.
According to the project documentation, the tool offers several specific visualization modes:
- Stream Comparison: Displays text in columns where brightness represents token probability. It includes a “lockstep” mode for per-position comparison and a “free” mode that tracks models until they diverge.
- Statistical Metrics: Provides data on the probability distribution behind each token, including entropy, Jensen-Shannon divergence, and Kullback–Leibler (KL) divergence.
- Sampler Chain Tracing: Visualizes how various parameters—such as temperature, top-k, top-p, and GBNF grammar—affect the candidate pool at each stage.
- Logit Lens: Offers a 2D map and 3D relief view of what each layer of the model predicts.
The developer notes that the tool uses a C++17 process to read logits and a Svelte 5 frontend to render the data. To ensure reproducibility, the tool uses a seeded sampler for each step.
Hardware Requirements and Limitations
The software is available as self-contained packages for Linux and Windows, supporting CUDA and Vulkan for hardware acceleration. However, the developer has noted several technical constraints. To compare two models, both must share the same tokenizer and must fit into the user’s Video RAM (VRAM) simultaneously. The tool currently uses only one GPU at a time and does not support integrated GPUs (iGPUs), falling back to the CPU if a dedicated GPU is unavailable.
Community Observations on Quantization
While the tool is a new release, discussions on Reddit suggest that the impact of quantization may vary depending on the specific task. One user noted that in technical tasks, such as coding or mathematical reasoning, the differences between high-precision and quantized models are often minimal. Conversely, in creative writing tasks, quantization may lead to a higher frequency of “slop” words or repetitive character names.
The tool is released under the MIT license and is intended for local use, with the developer stating that the software does not collect telemetry or require accounts.
