Skip to content
Query Feedz
  • News
  • Business
    • Digital Marketing
      • Marketing & Sales
      • SEO
      • Content Marketing
      • AEO and GEO
    • Startups
      • Founder Stories
      • Funding & VC
      • Product & Growth
    • Money
      • Investing
      • Markets & Economy
      • Saving & Budgeting
  • AI & Technology
    • Technology
      • Consumer Tech
      • CRM
      • Cyber Security
      • Software Engineering
      • WordPress
      • Hardware
    • Artificial IntelligenceAI Glossary
      • LLMs
      • Machine Learning
      • AI Fundamentals
      • Generative AI
      • Deep Learning
    • AI Use Cases
      • Automation
      • Content
      • Customer Support
      • Finance
      • Marketing
      • View All
  • Tools & Software
  • Account
    • Submit Guest Post
    • Submit a tool
    • My listing
  • Contact
QueryFeedz
  • News
  • Business
    • Digital Marketing
      • Marketing & Sales
      • SEO
      • Content Marketing
      • AEO and GEO
    • Startups
      • Founder Stories
      • Funding & VC
      • Product & Growth
    • Money
      • Investing
      • Markets & Economy
      • Saving & Budgeting
  • AI & Technology
    • Technology
      • Consumer Tech
      • CRM
      • Cyber Security
      • Software Engineering
      • WordPress
      • Hardware
    • Artificial IntelligenceAI Glossary
      • LLMs
      • Machine Learning
      • AI Fundamentals
      • Generative AI
      • Deep Learning
    • AI Use Cases
      • Automation
      • Content
      • Customer Support
      • Finance
      • Marketing
      • View All
  • Tools & Software
  • Account
    • Submit Guest Post
    • Submit a tool
    • My listing
  • Contact
QueryFeedz
  1. Home /
  2. AI Glossaries /
  3. LLMs /
  4. What is a Logit?
LLMs

What is a Logit?

Updated September 26, 2026 Read 3 min

A logit is the raw, unnormalised score a model produces for each possible output before those scores are converted into probabilities. In an LLM, there is one logit per token in the vocabulary at every generation step.

Contents 11
  1. 01Key takeaways
  2. 02A logit explained in simple terms
  3. 03From logits to probabilities
  4. 04Why models output logits rather than probabilities
  5. 05Practical uses of logits
  6. 06Logprobs
  7. 07Logits in classification
  8. 08Limitations
  9. 09Common Use Cases
  10. 10Frequently Asked Questions
  11. 11Related Terms

A logit is the raw, unnormalised score a model produces for each possible output before those scores are turned into probabilities. In an LLM, the final layer produces one logit for every token in the vocabulary at each step. Softmax then converts the full set of logits into a probability distribution. The terms “logit” and “logits” are used interchangeably; logits are simply the vector of all these scores.

Key takeaways

  • Logits are scores, not probabilities: they can be negative and do not sum to 1.
  • Only the relative differences between logits matter, not their absolute values.
  • Softmax turns logits into probabilities; temperature divides logits first.
  • Logit bias can push specific tokens up or down before sampling.
  • Logprobs, returned by some APIs, are the logarithms of the resulting probabilities.

A logit explained in simple terms

Imagine judges scoring contestants with raw points: 8.2, 5.1, −1.4. These points are not percentages and do not add to 100. To express them as chances of winning, you convert them with a formula. Logits are the raw points; softmax is the conversion.

From logits to probabilities

Softmax exponentiates each logit and divides by the total:

Worked example with three candidate tokens:

TokenLogite^logitProbability
” Mumbai”3.020.090.78
” Pune”1.54.480.17
” Delhi”0.21.220.05

The exponentials sum to 25.79, so the probabilities are about 0.78, 0.17 and 0.05. Note how a logit gap of 1.5 becomes a large probability gap: softmax strongly favours the highest scores.

Why models output logits rather than probabilities

  • Numerical stability: loss functions such as cross-entropy are computed more stably directly from logits.
  • Flexibility: temperature, top-k and top-p all operate on logits before the final conversion.
  • Efficiency: softmax over a vocabulary of 100,000+ tokens is applied once, at the end.

Practical uses of logits

UseHow it works
Logit biasAdd a positive or negative value to specific tokens to encourage or forbid them
Constrained decodingSet logits of invalid tokens to negative infinity to enforce structured output
Confidence signalsCompare the top logits to see how decisive the model is
Classification with LLMsCompare logits of label tokens such as “yes” and “no”
Speculative decodingVerify a draft model’s tokens against the main model’s logits

Logprobs

Many APIs expose logprobs: the natural logarithm of each token’s probability. A logprob of 0 means probability 1, and more negative values mean less likely. They are useful for measuring confidence, ranking alternatives and detecting uncertain answers. Note that low confidence does not guarantee an error, and high confidence does not guarantee correctness.

Logits in classification

Outside LLMs, the same term applies: a classifier’s final layer produces logits, which sigmoid or softmax converts into class probabilities. The word comes from the logit function in statistics, the log-odds, which is the inverse of the logistic function.

Limitations

  • Raw logit values are not comparable across models or runs.
  • Large vocabularies make logit processing costly at each step.
  • Logits are often poorly calibrated: high confidence can still be wrong.

Common Use Cases

01

Constrained generation

Block invalid tokens to enforce JSON or grammar rules.

02

Forbidding words

Use negative logit bias to prevent specific tokens appearing.

03

Classification with LLMs

Compare logits for label tokens to get a decision and a score.

04

Confidence checks

Use logprobs to flag low-confidence answers for review.

05

Speculative decoding

Verify drafted tokens against the main model's logits.

06

Evaluation

Compute loss and perplexity directly from logits.

Frequently Asked Questions

The raw, unnormalised score a model outputs for each possible class or token before softmax converts it into a probability.

Logits can be any real number and do not sum to 1. Probabilities are between 0 and 1 and sum to 1 after softmax.

A value added to specific tokens' logits to make them more or less likely to be selected.

The logarithms of token probabilities, often returned by APIs to indicate model confidence.

Logits are numerically stable for loss computation and allow temperature, top-k and top-p adjustments before the final conversion.

Related Terms

  • Probability Distribution in an LLM
  • Temperature in LLMs
  • Cross-Entropy Loss
  • Vocabulary in an LLM
  • Structured Output
  • Next-Token Prediction

Related AI Terms

What is an Attention Head?An attention head is a single attention unit inside a transformer layer, with its own query, key and…What is Prefix Tuning?Prefix tuning is a parameter-efficient fine-tuning method that learns trainable vectors inserted into the attention keys and values…What is an Attention Mechanism?An attention mechanism is a technique that lets a neural network focus on the most relevant parts of…What is Self-Attention?Self-attention is a mechanism where each position in a sequence attends to every other position in the same…What is Multi-Head Attention?Multi-head attention runs several attention operations in parallel, each with its own learned projections, so a model can…What is RoPE (Rotary Positional Embedding)?RoPE (rotary positional embedding) encodes a token's position by rotating its query and key vectors by an angle…

Contents

  1. 01Key takeaways
  2. 02A logit explained in simple terms
  3. 03From logits to probabilities
  4. 04Why models output logits rather than probabilities
  5. 05Practical uses of logits
  6. 06Logprobs
  7. 07Logits in classification
  8. 08Limitations
  9. 09Common Use Cases
  10. 10Frequently Asked Questions
  11. 11Related Terms

AI Topic

  • LLMs

Related Terms

  • What is an Attention Head?
  • What is Prefix Tuning?
  • What is an Attention Mechanism?
  • What is Self-Attention?
  • What is Multi-Head Attention?
  • What is RoPE (Rotary Positional Embedding)?

Quick Navigation

  • Common Use Cases
  • Frequently Asked Questions
  • Related Terms
  • Back to top

Details

Updated
September 26, 2026
Read
3 min
  • Forum
  • Submit a tool
  • Submit Guest Post
  • List Your Startup
  • Privacy Policy
  • Editorial Policy
  • Account
  • Contact
  • AI Productivity
  • AI Video
  • AI Coding
  • AI Chatbots
  • Sales
  • AI Business
  • View All Tools

Subscribe our Newsletter

Get weekly exclusive content - No spam.

Copyright © 2026 -  Query Feedz

Manage Consent
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
  • Manage options
  • Manage services
  • Manage {vendor_count} vendors
  • Read more about these purposes
View preferences
  • {title}
  • {title}
  • {title}