lm_polygraph.estimators.token_entropy module
- class lm_polygraph.estimators.token_entropy.MeanTokenEntropy[source]
Bases:
EstimatorEstimates the sequence-level uncertainty of a language model by calculating the mean entropy among all tokens in the generation. Works only with whitebox models (initialized using lm_polygraph.utils.model.WhiteboxModel).