lm_polygraph.estimators.pointwise_mutual_information module
- class lm_polygraph.estimators.pointwise_mutual_information.MeanPointwiseMutualInformation[source]
Bases:
EstimatorEstimates the sequence-level uncertainty of a language model using Pointwise Mutual Information. The sequence-level estimation is calculated as average token-level PMI estimations. Works only with whitebox models (initialized using lm_polygraph.utils.model.WhiteboxModel).