lm_polygraph.utils.deberta module

class lm_polygraph.utils.deberta.Deberta(deberta_path: str = 'microsoft/deberta-large-mnli', batch_size: int = 10, device: str = None, hf_cache: str = None)[source]

Bases: object

Allows for the implementation of a singleton DeBERTa model which can be shared across different uncertainty estimation methods in the code.

property deberta
property deberta_tokenizer
setup()[source]

Loads and prepares the DeBERTa model from the specified path.

to(device)[source]
class lm_polygraph.utils.deberta.MultilingualDeberta(deberta_path: str = 'MoritzLaurer/mDeBERTa-v3-base-xnli-multilingual-nli-2mil7', batch_size: int = 10, device: str = None, hf_cache: str = None)[source]

Bases: Deberta

Allows for the implementation of a singleton multilingual DeBERTa model which can be shared across different uncertainty estimation methods in the code.

setup()[source]

Loads and prepares the DeBERTa model from the specified path.