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.

Level: intermediateTopic: Evaluation metrics

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

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.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.