lm_polygraph.stat_calculators.greedy_semantic_matrix module

class lm_polygraph.stat_calculators.greedy_semantic_matrix.BaseGreedySemanticMatrixCalculator(nli_model)[source]

Bases: StatCalculator

Base class for calculating the NLI semantic matrix for generation samples using DeBERTa model.

calculate_semantic_matrix(batch_pairs, batch_invs)[source]
class lm_polygraph.stat_calculators.greedy_semantic_matrix.ConcatGreedySemanticMatrixCalculator(nli_model)[source]

Bases: BaseGreedySemanticMatrixCalculator

Calculates the NLI semantic matrix for generation samples using DeBERTa model.

static meta_info()[source]

Placeholder method to return the list of statistics and dependencies for the calculator.

class lm_polygraph.stat_calculators.greedy_semantic_matrix.GreedySemanticMatrixCalculator(nli_model)[source]

Bases: BaseGreedySemanticMatrixCalculator

Calculates the NLI semantic matrix for generation samples using DeBERTa model.

static meta_info()[source]

Placeholder method to return the list of statistics and dependencies for the calculator.