Next-Token Prediction

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.

0 / 500
Sampling meta-parameters
1.0
0 · focused2 · wild
5
1 · greedy20 · all shown
1.00
0.1 · narrow1.0 · off
Show probability

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).