Description
Convert a nonpositive log probability from nats to bits.
Log probabilities, logits, guidance scales and sequence scores use different conventions. Temperature changes logit scale, an additive bias changes odds, and a sequence-length penalty changes ranking. One supplied scalar contribution can be checked independently of a complete probability distribution or model-generation process.
Convert a nonpositive log probability from nats to bits.
When to use this tool
Use Log Probability Nats Bits Crosswalk when checking the stated probability, score, guidance or scale contribution.
How to use the tool and how it works
- Enter logProbabilityNats. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read logProbabilityBits, surprisalBits, probability. Use the output convention below.
Convert a nonpositive log probability from nats to bits. logProbabilityBits = logProbabilityNats/ln(2), surprisalBits negates it, probability = exp(logProbabilityNats).1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| logProbabilityNats | Log Probability Nats | Required. Finite number; maximum 0. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| logProbabilityBits | Log Probability Bits | Required. Finite number. |
| surprisalBits | Surprisal Bits | Required. Finite number. |
| probability | Probability | Required. Finite number. |
{
"input": {
"logProbabilityNats": -0.6931471805599453
},
"output": {
"logProbabilityBits": -1,
"surprisalBits": 1,
"probability": 0.5
}
} Limitations and assumptions
- Extremely negative values may underflow to probability zero; this is one supplied log probability, not sequence likelihood or calibrated uncertainty.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
Alternative or Complementary methods
Use the full distribution and model-specific decoding or training objective for normalized probabilities, preference optimization or actual generation.
References
Similar or alternative tools
- Logit Bias One Token Odds Factor
Return one-token logit-bias odds transformation.
- Logit Scale Temperature Composition
Compose a positive logit scale with two temperatures.