DECODE · INSPECT · EXPLAIN
Temperature sampling: reshape and inspect probabilities
Compute stable softmax and see how temperature changes probability concentration.
Your experiment
Compare temperatures 0.2, 1 and 2 using the same score row. Probabilities must sum to one. Greedy decoding should keep the same highest-scoring token; a fixed sampling draw can cross a changed cumulative boundary.
Press Play for a full minute at 1×, or use 0.5× for two minutes. Pause to read a stage. Next stage and the timeline reveal the same computed history; changing any model input resets the inspection without autoplay.
What the calculation means
Temperature divides logits before softmax. A lower temperature sharpens the distribution; it is not a guarantee of factual correctness.
The timeline is teaching time, not measured inference latency. A five-stage inspection is allocated to each generated token, with the complete trace spread over 60 seconds.
Visible arithmetic
| Token | Logit | Penalized | Scaled | Softmax | Filtered |
|---|
Context and cache inspector
Offline teaching fixture, not a trained transformer. An explicit eight-token score table uses only the last context token; unknown last tokens use the “the” row. Prompt tokens are whitespace-separated, not BPE tokens. Greedy or fixed-seed sampling operates on exact visible probabilities. EOS or the selected token limit ends decoding. Cache dimensions are accounting inputs only: no attention matrices or real model weights are executed. Changing cache settings must not change this fixture’s output tokens. Cache mechanics · Decoding reference · Official AICassindra articles.