lm_polygraph.stat_calculators.greedy_probs module

class lm_polygraph.stat_calculators.greedy_probs.GreedyProbsCalculator(output_attentions: bool = True, output_hidden_states: bool = False, n_alternatives: int = 10)[source]

Bases: StatCalculator

For Whitebox model (lm_polygraph.WhiteboxModel), at input texts batch calculates: * generation texts * tokens of the generation texts * probabilities distribution of the generated tokens * attention masks across the model (if applicable) * embeddings from the model

static meta_info() Tuple[List[str], List[str]][source]

Returns the statistics and dependencies for the calculator.