Microsoft-inspired language-model evaluation service reports perplexity from the average token loss. You need to convert the supplied loss into perplexity accurately so model runs can be compared on the same scale.
Convert the mean negative log-likelihood per token (natural logarithm) into perplexity: eloss.
Implement solve(mean_nll).
Returns. Return the perplexity as a Python float.
Example 1
Input:
solve(2.0)
Output:
7.389056
Example 2
Input:
solve(0.0)
Output:
1.0
No results yet
Run your code to check it against the examples, or submit to run every test.