lm_polygraph.utils.token_restoration module

lm_polygraph.utils.token_restoration.collect_sample_token_level_uncertainties(model_output, batch_size, num_return_sequences, vocab_size, pad_token_id, length_penalty=1.0, ensemble_uncertainties={})[source]
lm_polygraph.utils.token_restoration.collect_token_level_uncertainties(model_output, batch_size, beam_size, vocab_size, pad_token_id, length_penalty=1.0, ensemble_uncertainties={})[source]
lm_polygraph.utils.token_restoration.get_collect_fn(model_output)[source]
lm_polygraph.utils.token_restoration.update_token_level_scores(scores, batch_scores)[source]