Logit
The raw, unnormalised score a model assigns to each vocabulary token before converting to probabilities.
PromptItIn team

What it means
Logits are the output of a language model's final linear layer — one scalar value per token in the vocabulary (typically 32,000–128,000 tokens) representing the model's raw preference for each possible next token.
Logits are unnormalised and can be any real number; they are converted to probabilities via the softmax function. Temperature scaling divides the logits before softmax, making them sharper (lower temperature) or flatter (higher temperature).
Advanced sampling strategies (top-k, top-p, min-p) operate on the logit distribution. Direct access to logits, available from open-weight models, enables nuanced sampling strategies not possible when only probabilities are returned.
Examples
- A model outputting logit scores of [15.2, 3.1, -2.4, ...] for the next token, with 'Paris' receiving the highest score when completing 'The capital of France is'.
- Logit bias: adding -100 to a specific token's logit to make the model never output that token.
Related terms
Softmax
A function that converts a vector of real numbers into a probability distribution summing to 1.
Temperature
A sampling parameter that controls the randomness and creativity of model outputs.
Top-P (Nucleus Sampling)
A sampling strategy that limits token selection to the smallest set covering a cumulative probability.
Put this into practice
PromptItIn applies techniques like logit for you: describe what you want and it builds the prompt.
You might also like