See the model's real next-token probabilities — then reshape them with temperature, top-k, and top-p, and build the text one token at a time.
Text-completion model gpt-3.5-turbo-instruct (the
/v1/completions endpoint — it continues your text rather than
answering it) via a Netlify Function that hides the API key.
The function returns the model's true next-token probabilities
(exp(logprob) from the top 20 alternatives, at neutral temperature 1.0).
Temperature, top-k, and top-p then reshape and sample that distribution
entirely in your browser — so you watch the real probabilities transform.
Each bar shows a candidate's real probability; greyed-out rows are the ones
your top-k / top-p settings pull out of sampling (they still show their true probability).
Source on GitHub.