lm_polygraph.stat_calculators.sample module
- class lm_polygraph.stat_calculators.sample.BlackboxSamplingGenerationCalculator(samples_n: int = 10)[source]
Bases:
StatCalculatorCalculates several sampled texts for Blackbox model (lm_polygraph.BlackboxModel).
- class lm_polygraph.stat_calculators.sample.SamplingGenerationCalculator(samples_n: int = 10)[source]
Bases:
StatCalculatorFor Whitebox model (lm_polygraph.WhiteboxModel), at input texts batch calculates: * sampled texts * tokens of the sampled texts * probabilities of the sampled tokens generation