T
In September 2025 the lab Thinking Machines asked the open model Qwen3-235B a thousand times in a row to tell about the physicist Richard Feynman. The temperature was set to zero — at which the model must take the most probable word every time, so all one thousand answers should have matched letter for letter. Only the first 102 tokens matched. At the 103rd, in 992 answers Feynman was born in “Queens, New York”, and in eight, in “New York City”. In all, there were 80 different texts. Where does randomness come from when it has been switched off? The answer is in section 03.
A language model does not write a word all at once: it gives a score — a logit — to each of the tens of thousands of tokens in its vocabulary. To pick one, the logits are divided by the temperature and turned into probabilities, and then a lot is drawn. A small T widens the gap between the leader and the rest; a large one smooths it. This page has a roulette for your own logits, a translator of settings between six services, a text generator with top_k, top_p and min_p cut-offs, the Boltzmann physics the formula itself came from, and an analysis of why zero is not zero.
Calculator
What temperature will do to your options
Enter candidates and their logits separated by semicolons. The logprobs from an API response will do as well: softmax does not change if you add the same number to all logits, and a logprob is a logit minus a common constant. Then set the temperature and cut-offs — you will see how likely each option is to come up, and how often a long answer will turn off the most probable path.
One task — six services
The same number means different things in different services. Anthropic’s scale ends at one, DeepSeek quietly multiplies your temperature by 0.3, and the transformers library does not notice it at all without the do_sample flag. Pick a task and a service — you get the parameters and a ready code snippet.
Etymology
Mixture, specimen and soft maximum
The word “temperature” came into neural networks not from meteorology but from statistical physics: the token-choice formula is literally the Boltzmann distribution, with the logit of opposite sign in place of energy. And temperature itself once meant not degrees but the right proportion of a mixture.
01 · Definition and a cup of something hot
The model scores, the draw decides
At each step the model outputs one number — a logit — for every token in the vocabulary. Logits are not probabilities by themselves: they are scores and can be negative. The softmax function raises e to the power of each score and divides by the sum — giving shares that add up to one. Temperature sits in the denominator of the exponent: the logits are divided by T before exponentiation.
Dividing by a number below one stretches the gap: for a leader ahead by 0.3 at T = 0.1 the lead becomes threefold, and the exponential gives it almost everything. Dividing by a number above one squeezes the gap, and even “asphalt” gets a chance in the cup. Move the slider on the left and pour some cups: at zero all twenty will be tea.
Lab · three experiments with a draw
Generator, cut-off and Boltzmann gas
“Generator” is a tiny language model that has learned the word pairs of this page right in your browser and writes text with the settings you choose. “Cut-off” shows the distribution after one word and which options top_k, top_p and min_p cut away. “Boltzmann” is a vessel of particles on six energy levels: at the same temperature they settle exactly by the same formula as tokens.
03 · Why zero is not zero
A thousand answers at T = 0
At zero temperature there is no sampling: the model takes the leader. But the leader is determined by logits, and logits are sums of millions of products computed by a graphics card. Adding floating-point numbers depends on the order: (0.1 + 10²⁰) − 10²⁰ gives 0, while 0.1 + (10²⁰ − 10²⁰) gives 0.1. The server bundles your request into a batch with other people’s, and the batch size decides the order in which the kernels add the numbers. When two tokens have almost equal logits, a tiny difference in the last digit changes the winner — and after that the answers diverge for good.
04 · Temperature in code
One word, eight behaviors
The parameter is called almost the same everywhere, but defaults, limits and the order of cut-offs differ between programs. The main traps are transformers without do_sample, a different scale in DeepSeek, and the reverse order of cut-offs in llama.cpp. Tap a row to read the details.
Recompute logprobs from an API response for another temperature; turn on sampling with min_p in transformers; put temperature last in the llama.cpp chain.
05 · Writing rules
06 · Neighbouring units
07 · Historical section
From gas in a vessel to a chatbot
Temperature entered computing before neural networks. In 1983 the IBM physicists Scott Kirkpatrick, Daniel Gelatt and Mario Vecchi invented simulated annealing: searching for the best solution to a problem the way a smith anneals metal. At first it is “hot” — the algorithm accepts even worse steps in order to jump out of a pit. Then the temperature is slowly lowered, and the system freezes into a good solution. This is how microchips were laid out on a die and travelling-salesman routes were planned.
In language models temperature is usually not lowered during an answer, but the idea is the same: heat means variety and risk, cold means reliability and repetition. Try the “Cool slowly” button in the “Boltzmann” experiment: the particles gather on the lowest level, like metal that has set without cracks.
Series · AI
units of language modelsHow a neural network is measured
Temperature is the last step before the word: the model with its parameters has already computed the logits over the whole context, and temperature decides how a token is drawn from them. It also changes the entropy of the answer, and so its perplexity. On the left is the information about one request, where each row leads to its own page; on the right are the pages of the series.
Catalogue of quantities
the whole index →The seven SI base units
A drop of acid changes the colour of the juice, salt colours the flame, water freezes at a tap. Below them are all Simetrium sheets, by discipline and alphabetically.
Open the index →





