Cross-Entropy
Cross-Entropy
What problem it solves
Measure how far the predicted distribution is from the true one; the default loss for classification and language models.
What it is
Cross-entropy is the negative log-likelihood of the true distribution: the lower the probability given to the right answer, the larger the penalty.
PyTorch’s CrossEntropyLoss combines log-softmax and negative log-likelihood.
Why it matters
Perplexity is the exponential of cross-entropy. Before comparing loss numbers, check the unit and the vocabulary denominator.
Chinese aliases
Terms in the same area
What you can do now
Models atlas: which quantisations exist and which tier fits your VRAM ↗
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.