Perplexity is a measurement of how well a language model predicts a sample of text. Lower perplexity means the model is less «surprised» by the text, indicating it has learned the underlying patterns better. It is calculated as the exponent of the average negative log-likelihood per token. Perplexity is commonly used to compare language models during development, though it does not directly measure task performance or human preference. A model with perplexity of 10 is better calibrated than one with perplexity of 100.