lm_polygraph.estimators.num_sem_sets module

class lm_polygraph.estimators.num_sem_sets.NumSemSets(verbose: bool = False)[source]

Bases: Estimator

Estimates the sequence-level uncertainty of a language model following the method of “Number of Semantic Sets” as provided in the paper https://arxiv.org/abs/2305.19187. Works with both whitebox and blackbox models (initialized using lm_polygraph.utils.model.BlackboxModel/WhiteboxModel).

U_NumSemSets(i, stats)[source]
find_connected_components(graph)[source]