Training a language model means making one number small: the average surprise of the model at the token that actually came next. That number is the cross-entropy, and its exponential is the perplexity.
You will see how it changes with a better model, write the formula, and make it numerically safe.