Skip to main content

perplexity

Function perplexity 

Source
pub fn perplexity(total_nll: f64, n_tokens: usize) -> f64
Expand description

Perplexity from a summed NLL (nats) over n_tokens: exp(total_nll / n_tokens).