lm_polygraph.estimators.semantic_entropy_token module

class lm_polygraph.estimators.semantic_entropy_token.SemanticEntropyToken(tokenizer_path: str, tokenizer_save_path: str, semantic_bert_path: str = 'sentence-transformers/bert-base-nli-mean-tokens', batch_size: int = 10)[source]

Bases: Estimator

lm_polygraph.estimators.semantic_entropy_token.split_classes(tokens: List[str], batch_size: int, semantic_bert_path: str = 'sentence-transformers/bert-base-nli-mean-tokens', sim_threshold: float = 0.85) ndarray[source]