AI & LLMs

Logits

The raw, unnormalized scores a model outputs before softmax turns them into probabilities.

Logits are the raw numbers a model produces in its final layer, before any normalization. Applying softmax to the logits turns them into a probability distribution that sums to one.

Worked example: for next-token prediction the model emits one logit per vocabulary token; temperature scales the logits before softmax (dividing by T), and controls like top-p and top-k operate on the resulting distribution. Gotcha: logits are only meaningful relative to each other — adding a constant to all of them changes nothing after softmax — so a single logit value in isolation tells you little.