# Softmax

- **Canonical URL:** https://getaimath.com/dictionary/softmax/
- **Topics:** [LLM Fundamentals](https://getaimath.com/dictionary/category/llm-fundamentals/)
- **Last updated:** 2026-11-25

## What is Softmax?

**In one sentence:** Softmax is a math function that turns a list of raw scores into probabilities that add up to 100%.

It makes big scores bigger and small scores smaller, then scales everything so it sums to 1. This gives a clear chance for each option. It is used for picking the next token and inside attention to decide how much focus each word gets.

![How ChatGPT & Claude Talk: Super-Powered Autocomplete — Simple cartoon diagram showing a sentence chopped into Lego word blocks (tokens), an AI brain weighing the odds of the next word ("mat" 75%, "couch" 18%, "roof" 5%), and snapping "mat" onto the end of the sentence.](https://getaimath.com/diagrams/llm-fundamentals.png)
*Napkin Diagram (LLM Fundamentals): Language models don’t plan whole essays at once—they play a super-smart game of "guess the very next word" over and over.*

## What is an example of Softmax?

Softmax might turn scores [2, 1, 0] into roughly [67%, 24%, 9%].

## Why does Softmax matter?

Softmax is everywhere in neural networks, especially wherever a model has to choose.

## Related Concepts

- [Logits](https://getaimath.com/dictionary/logits/): Logits are the raw scores a model gives every possible next token before they are turned into probabilities.
- [Probability Distribution](https://getaimath.com/dictionary/probability-distribution/): A probability distribution is a list of every possible outcome with the chance of each one happening, adding up to 100%.
- [Repetition Penalty](https://getaimath.com/dictionary/repetition-penalty/): A repetition penalty is a setting that makes a model less likely to repeat the same words or phrases over and over.
- [Next Token Probability](https://getaimath.com/dictionary/next-token-probability/): Next token probability is the chance a model gives to a specific token being the next one in the text.
- [Top-P Sampling](https://getaimath.com/dictionary/top-p-sampling/): Top-P sampling means the model picks from the smallest group of likely tokens whose chances add up to P, such as 90%.
- [Sampling](https://getaimath.com/dictionary/sampling/): Sampling is how a model picks the next token from its list of possible options, using their probabilities.

---
Source: The AI Math Dictionary (https://getaimath.com/dictionary/softmax/)
