Index Ai Academy
Glossary · Phase 2 · Math, when you need it

Perplexity

How many words a language model is effectively choosing between at each step. Lower is better; it's e to the cross-entropy.

A loss like 1.5 nats is hard to picture. Perplexity turns it into something you can picture: a number of equally likely choices.

Try it now

Pick which word actually came next. Raise its score and the loss falls toward 0; give probability to the wrong words and it climbs. Training nudges the logits exactly this way.

Learn it properly

Cross-entropy and KL divergence · The loss function language models are trained on. About 30 minutes.

Create a free account See what's in the lesson

Other terms from the same lesson

Never trained an AI?

Teach a small one to write, right in your browser. It takes about 20 seconds and needs no account.

Teach it to write