Analysis results
Distribution comparison
Interpretation
Sampling preview
Calculated token table
| Token | Token ID | Dataset | Step | Raw logit | Adjusted logit | Original probability | Adjusted probability | Log probability | Rank | Cumulative | Surprise | Selected | Filtered |
|---|
Formula used
How to use
- Enter tokens with logits or probabilities.
- Assign datasets and generation steps for comparisons.
- Choose temperature, filtering, penalties, and sampling settings.
- Select a plot type and display configuration.
- Calculate, inspect metrics, and export the analysis.
Example data
| Token | Logit | Approximate probability | Selected |
|---|---|---|---|
| learning | 4.20 | 42% | Yes |
| model | 3.65 | 24% | No |
| system | 3.10 | 14% | No |
| network | 2.70 | 9% | No |
| data | 2.30 | 6% | No |
Frequently asked questions
What is a token probability?
It is the model probability assigned to one candidate token. Higher values indicate stronger preference at that generation step.
What is a logit?
A logit is an unnormalized model score. Softmax converts all candidate logits into probabilities that sum to one.
Why use stable softmax?
Subtracting the largest logit prevents numerical overflow. It preserves the final probability distribution.
How does temperature change probabilities?
Lower temperature sharpens the distribution. Higher temperature spreads probability across more tokens.
What does top-k filtering do?
It keeps only the k highest-probability candidates. Remaining probabilities are normalized again.
What does top-p filtering do?
It keeps the smallest ranked token set reaching a chosen cumulative probability. This adapts candidate count to uncertainty.
What is typical-p filtering?
It favors tokens whose information content stays near distribution entropy. It can remove unusually surprising candidates.
What does entropy measure?
Entropy measures uncertainty across candidate tokens. Lower entropy indicates a more concentrated prediction.
How is perplexity interpreted?
Perplexity represents effective uncertainty. Smaller values mean fewer equally plausible token choices.
Why can the selected token differ from rank one?
Random sampling can select lower-ranked candidates. Filtering and temperature also change selection probabilities.
What are KL and Jensen–Shannon divergence?
They compare probability distributions. Jensen–Shannon divergence is symmetric and usually easier to interpret safely.
Can this calculator compare generation steps?
Yes. Add rows with matching datasets and different step numbers, then choose heatmap or trajectory plots.