Skip to main content

Perplexity (PPL)

Perplexity (PPL)

  • Core concepts
  • Stage 4 · Under the Hood
  • refs checked 2026-11-19
What problem it solves

The most common intrinsic metric for language models: how surprised the model is by test text.

What it is
Perplexity is the exponentiated average negative log-likelihood of a sequence, token by token. Equivalently, the exponent of the average cross-entropy loss; lower perplexity means the model predicts the text more confidently. It is sensitive to tokenization: compare it directly only between models sharing the same tokenizer. It applies to autoregressive models and is ill-defined for masked models like BERT.
Why it matters

Papers and model cards report this number. Knowing it is only comparable across same-tokenizer models keeps you from being misled by cross-vendor figures.

Sources
  • Hugging Face docs: Perplexity of fixed-length models ↗
  • Jurafsky & Martin, Speech and Language Processing, §3.3 and §7.7.1 ↗
Use this term in a task

Don’t stop at the definition: use the task handbook for the order and checks, or filter three tool candidates for the job at hand.

Task handbooks → · Filter three candidates →