Browse Foundations

What Is a Logit? The Raw Numbers Behind Every AI-Generated Word

Before a model picks its next word, it produces a raw score for every possible token — that score is a logit, and how it gets turned into a choice matters more than you'd think.

A raw score for every possible next token

A logit is the raw, unprocessed number a model outputs for each token in its vocabulary, representing how strongly it favors that token as the next one — before those numbers get converted into anything resembling probabilities. Every generation step produces one logit per vocabulary entry, all at once.

From logits to a probability distribution

A function called softmax converts the full set of logits into a proper probability distribution — values between 0 and 1 that sum to 1 across the whole vocabulary — which is what actually gets used to select (or sample) the next token, rather than the raw logits themselves.

Why this matters beyond the internals

Settings like temperature work by adjusting how those logits get converted into probabilities before a token is chosen — reshaping the distribution to be more or less concentrated on the highest-scoring options, which is the actual mechanism behind "more creative" or "more predictable" output.

Frequently Asked Questions

What is a logit in AI?

The raw, unprocessed score a model assigns to each possible next token, before those scores are converted into a probability distribution via a function called softmax.

Are logits the same as probabilities?

No — logits are raw scores that get converted into an actual probability distribution (summing to 1) through the softmax function, which is what's used to select the next token.

Keep Exploring