logoalt Hacker News

gregdeon • yesterday at 10:41 PM • 1 reply • view on HN

The best possible perplexity is 1, and the best possible log-perplexity is log(1) = 0. The only way to achieve this is with a model that always predicts that the next token has probability 1 -- i.e., a perfect model.

A helpful comparison: suppose you have a model that always outputs a uniform distribution over K possible tokens (assigning probability 1/K to each one), and that the next token is indeed one of those K options. This model has perplexity K. So, in some sense a perplexity of K is comparable to narrowing down the answer to one of K possibilities. This includes the special case of K=1, which is the best possible model.


Replies

a3w • today at 10:47 AM

Great, thank!

Then

> So perplexity [in this graph] starts at [or near] zero, then gets negative?

was correct. Strange that some things are not inverted to be more handy.

Conversly pH/pOH using inverted, then positive numbers, since logs get negative.

(And pH rarly then gets negative, meaning "ten times" when it reaches -1, and that is usually not even taught in school, using 0 and 14 as limits for aqueous solutions there instead.)