
Perplexity from token probabilities (Kamath Eq 8.1)
Source:R/kamath_llm2_native.R
morie_kamath_ch8_perplexity.Rdexp(mean negative log-likelihood per token).

R/kamath_llm2_native.R
morie_kamath_ch8_perplexity.Rdexp(mean negative log-likelihood per token).