github.comhttps://github.com/huggingface/evaluate/blob/main/metrics/perplexity/perplexity.pyPerplexity - a Hugging Face Space by evaluate-metricPerplexity (PPL) is one of the most common metrics for evaluating language models. It is defined as the exponentiated average negative log-likelihood of a sequence, calculated with exponent base `e...https://huggingface.co/spaces/evaluate-metric/perplexity