Live demo: https://eoftedal.github.io/logprobs/
Token Probability Explorer is a browser-based tool for visualizing the probability distribution over next tokens as a language model generates text. It runs entirely in your browser using WebGPU — no server, no API key, no data leaving your machine.
At each step the model computes a probability for every token in its vocabulary. This tool shows you the top candidates and lets you pick which one to append to the text, then recomputes the distribution from the new context. This makes it easy to explore how the model "thinks" about what comes next: which completions it considers likely, how confident it is, and how that changes as the context grows.
You can use it in raw text mode (feed the model a plain string) or chat template mode (provide a system prompt and user message, which are formatted using the model's built-in chat template before inference).
The tool supports adjustable temperature (higher = more uniform distribution, lower = more peaked) and a configurable number of top tokens to display.
chrome://flags/#enable-unsafe-webgpuTo use a different model, reload the page.
7 commits
JavaScript
63.8%
CSS
22.4%
HTML
13.6%
Live demo: https://eoftedal.github.io/logprobs/
Token Probability Explorer is a browser-based tool for visualizing the probability distribution over next tokens as a language model generates text. It runs entirely in your browser using WebGPU — no server, no API key, no data leaving your machine.
At each step the model computes a probability for every token in its vocabulary. This tool shows you the top candidates and lets you pick which one to append to the text, then recomputes the distribution from the new context. This makes it easy to explore how the model "thinks" about what comes next: which completions it considers likely, how confident it is, and how that changes as the context grows.
You can use it in raw text mode (feed the model a plain string) or chat template mode (provide a system prompt and user message, which are formatted using the model's built-in chat template before inference).
The tool supports adjustable temperature (higher = more uniform distribution, lower = more peaked) and a configurable number of top tokens to display.
chrome://flags/#enable-unsafe-webgpuTo use a different model, reload the page.
7 commits
JavaScript
63.8%
CSS
22.4%
HTML
13.6%