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

Cross-entropy

Also written: log loss, binary cross-entropy

A score for how surprised a model is by the right answer. Lower is better; it's the usual training loss for classifiers and language models.

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