AI Grounds

Open AI Grounds on a desktop

These interactive lessons need a larger screen. Please continue on a desktop or laptop computer.

Guided discovery

How Tokens Become an Answer

Choose one token. Extend the prefix.

Authored transitions · reproducible draws · no live LLM. Each displayed word is one toy token; EOS stops the sequence.

Current prefix

The cat

Original prompt: The cat · Generated tokens: 0 / 6.

Next-token probabilities

Bars show the filtered distribution. Removed candidates have probability zero. The exact table also shows the distribution before filtering.

sat
50.00%
slept
30.00%
ran
20.00%

Draw 0.650000 selects from cumulative intervals. Predict, then append to observe the choice.

Decoding mode

Positive scale applied to ln(authored weight) before softmax. This does not judge sentence quality. Use arrow keys on the slider. Press Enter or leave the number field to apply an exact edit.

Used only by Sample. You may set an exact draw; appending advances the reproducible sequence. Use arrow keys on the slider. Press Enter or leave the number field to apply an exact edit.

This length limit and EOS stopping work together. A limit can truncate an unfinished sequence. Use arrow keys on the slider. Press Enter or leave the number field to apply an exact edit.

Setting edits affect the next token and preserve the generated prefix. Reset restores the experiment's prompt and settings. After EOS, Reset is required to start another sequence.

Exact probabilities and cumulative intervals
Sorted by base probability; intervals are lower-inclusive, upper-exclusive. Greedy chooses the first retained row.
TokenBaseKept?FilteredDraw interval
sat0.500000Yes0.500000[0.000000, 0.500000)
slept0.300000Yes0.300000[0.500000, 0.800000)
ran0.200000Yes0.200000[0.800000, 1.000000)
Authored transition bank and limits

The cat → sat 0.5 / slept 0.3 / ran 0.2. The dog → barked 0.6 / slept 0.4. Any prefix ending sat → on0.6 / near 0.3 / EOS 0.1; slept → EOS 0.7 / soundly 0.3; ran → away 0.8 / EOS 0.2; barked → loudly 0.5 / EOS 0.5. Endings on or near → the 1; the → mat 1; all other endings → EOS 1. These are fixed teaching weights, not learned probabilities. No factual or language-quality guarantee follows.

For reproducible draws: seed=floor(draw×2³²); next=((1664525×seed+1013904223) mod2³²)/2³², rounded to six decimals and capped at0.999999. This teaching PRNG is not a cryptographic generator. Greedy also advances it, but ignores the draw when choosing. Changing Next draw seeds the next advance. EOS counts as a generated token and is omitted from the displayed text.

The Curious Case of Neural Text Degeneration · Nucleus sampling