Ground Truth.
AI, checked against the source.

Learn · Beginner

Perplexity: the number that tells you a model still works

Perplexity measures how surprised a language model is by text it has never seen. The number can be read directly: a perplexity of 8 means that, on average, the model was effectively choosing between 8 equally likely words at each position. Lower is less confused. It is the oldest number in language modeling and still the fastest way to tell whether a model works at all.

The idea traces to Claude Shannon, who in his 1948 paper founding information theory asked how much information a message actually carries. His insight was that information and surprise are the same quantity. A message you could have predicted tells you nothing. A message you could not tells you a lot. Perplexity is that idea pointed at a language model: give it real text and ask how surprised it was.

How it works

A language model does exactly one thing: given some text, it assigns a probability to every possible next token. Feed it "the cat sat on the" and it produces a distribution -- maybe 40 percent on "mat," 15 percent on "floor," 8 percent on "couch," and a long tail of everything else.

To compute perplexity, you take a piece of text the model has never seen and walk through it token by token. At each position you ask: what probability did the model give to the word that actually appeared? If it said "mat" was 40 percent likely and "mat" is what came next, that is a decent guess. If it gave "mat" a 0.001 percent chance, it was badly wrong.

Average the model's surprise across every position -- that average is called the cross-entropy loss, and it is the same number the model was trained to minimize. Then exponentiate it. That is perplexity, and exponentiating is what makes it readable: instead of an abstract loss value, you get a count. A perplexity of 8 means the model was, in effect, picking from a bag of 8 words at each step. A perplexity of 2 means it had narrowed it to a coin flip.

The analogy: imagine someone reading a novel aloud and pausing before each word so you can guess it. If you know the book, you guess right almost every time -- your perplexity is near 1. If it is in a language you half-speak, you might narrow each word to a handful of candidates -- perplexity around 5. If it is a language you do not speak at all, every word is a shock, and your perplexity is roughly the size of the vocabulary. The number is your ignorance, counted in words.

Why it matters

Perplexity is the cheapest useful measurement in machine learning. It needs no human raters, no answer key, no carefully designed task -- just a pile of text the model has not seen. That makes it the industry's smoke test.

It is also what the scaling laws are built on. The 2020 scaling laws paper and DeepMind's Chinchilla work found strikingly smooth relationships between model size, data, compute, and loss -- and the loss they plotted is the same quantity underneath perplexity. Those curves are why anyone was confident that spending more would produce a better model.

And it is where compression research lives. KronQ, accepted at a major conference this year, reports that the dominant compression method applied to a 70-billion-parameter model at 2 bits per weight produces perplexity above 2000, while its own method reaches 7.93. You do not need to know anything about the method to read that. Single digits means the model still speaks English. Two thousand means it does not know what language is. That is the whole value of perplexity -- it makes catastrophic failure unmistakable.

The traps

The number is not portable. Perplexity depends on the dataset and the tokenizer. A model that splits text into different pieces is answering a different question, so its perplexity is not comparable. Two models are only comparable on identical text with identical tokenization -- which is why standard benchmarks like WikiText exist at all.

Low perplexity does not mean good. It measures one thing: how well the model predicts text that looks like its evaluation set. It says nothing about whether the model is truthful, helpful, safe, or able to follow an instruction. A model that predicts internet text beautifully can still confidently make things up -- hallucination and low perplexity coexist comfortably.

Contamination inflates it. If the evaluation text was in the training data, the model is not predicting -- it is remembering, and the score is a lie.

It stops discriminating at the top. Between two strong models, a small perplexity gap tells you almost nothing about which is more useful, which is why task benchmarks and human preference took over for frontier comparisons.

So perplexity is not the scoreboard anymore. It is the pulse -- a cheap, honest signal that the patient is still alive, and the first thing anyone checks when a model comes out of the compressor.

Key papers
A Mathematical Theory of Communication (Shannon, 1948)
Pointer Sentinel Mixture Models (WikiText benchmark, 2016)
Scaling Laws for Neural Language Models (2020)
Training Compute-Optimal Large Language Models (Chinchilla, 2022)
Language Models are Few-Shot Learners (GPT-3, 2020)

Key questions

What does perplexity actually measure?

How surprised a model is by text it did not write. Formally it is the exponential of the average cross-entropy loss, and it can be read as the effective number of equally likely words the model was choosing between at each position.

What counts as a good perplexity score?

It depends entirely on the dataset and the tokenizer, so the number is only meaningful in comparison. On a standard English benchmark, strong models sit in the single digits or low teens; anything in the hundreds or thousands means the model is producing noise.

Why do researchers still use perplexity when we have better benchmarks?

Because it needs no human judgment, no answer key, and no task design -- just text. That makes it the cheapest possible smoke test, ideal for catching a broken model, even though it says nothing about whether the model is helpful or truthful.
Cite this

APA

Ground Truth. (2026, July 14). Perplexity: the number that tells you a model still works. Ground Truth. https://groundtruth.day/learn/perplexity.html

BibTeX

@misc{groundtruth:perplexity,
  title  = {Perplexity: the number that tells you a model still works},
  author = {{Ground Truth}},
  year   = {2026},
  month  = {jul},
  url    = {https://groundtruth.day/learn/perplexity.html}
}

Topics: fundamentals · evaluation · language-models · metrics · perplexity