The model doesn't know the next word. It guesses.
Pick a prompt below, then adjust temperature, top-K and top-P to see how the next-token distribution changes.
The capital of France is
- Probability distribution
- At each step, the model doesn't just pick a word. It calculates how likely every possible next word is (the bars below). A word is then chosen based on those odds. This is called sampling.
- Temperature
- Controls how safe or adventurous that choice is. Low temperature makes the model almost always pick the single most likely word: predictable, sometimes repetitive. High temperature makes it more willing to pick less-likely words: more varied, but riskier.
- Top-K
- Instead of considering every possible word, only look at the K most likely ones, then choose among just those. A small K (e.g. 3) keeps output focused; turning it off considers everything.
- Top-P (nucleus sampling)
- Instead of a fixed count, keep adding the next most likely words until their combined probability reaches P (e.g. 90%), then choose among that group. It adapts automatically: a small group when the model is confident, a bigger one when it's unsure.
1.00
Balanced
off
off