AI engineering glossary · Evaluation metrics
What is PPL (perplexity)?
Perplexity (also called PPL): A measure of how well a language model predicts text: the exponential of the average negative log-probability per token. Roughly, it is the number of equally likely choices the model is torn between at each step, so lower is better. It cannot be compared across different tokenisers.
Perplexity: an example
A model that is equally unsure among 4 possible next words at every step has a perplexity of 4.
Related terms
More Evaluation metrics terms
- Pinball loss
- Platt scaling
- Precision at k
- Precision-recall break-even point
- Precision-recall curve
- Precision-recall trade-off
- Prediction interval coverage
- Prevalence
Where you learn it
Perplexity is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.