Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shouldn't perplexity range from [1 to inf)? #566

Closed
ivanmkc opened this issue Mar 30, 2024 · 2 comments
Closed

Shouldn't perplexity range from [1 to inf)? #566

ivanmkc opened this issue Mar 30, 2024 · 2 comments

Comments

@ivanmkc
Copy link

ivanmkc commented Mar 30, 2024

The range of this metric is [0, inf). A lower score is better.

perplexity = e**(sum(losses) / num_tokenized_tokens)

If sum(losses) = 0, then perplexity = 1.

@simpleParadox
Copy link

simpleParadox commented Apr 6, 2024

@ivanmkc
Perplexity ranges between zero and inf because the exponent can be negative (The sum of negative log likelihoods).
Check out the following blog post for a better understanding.
Perplexity of fixed-length models.

@ivanmkc
Copy link
Author

ivanmkc commented Apr 9, 2024

Thanks, will take a look.

@ivanmkc ivanmkc closed this as completed Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants