Open jacopobandonib opened 10 months ago
from alignscore import AlignScore scorer = AlignScore(model='roberta-large', batch_size=1, ckpt_path ="models/AlignScore/checkpoint/AlignScore-large.ckpt", device= "cpu", evaluation_mode='nli') print(scorer.score(contexts=['hello world.'], claims=['hello world.'])) Evaluating: 100%|██████████| 1/1 [00:01<00:00, 1.96s/it] [0.9887175559997559]
During loading model checkpoint I as well got warned about not initialized model weights, as outlined in the previous issue (https://github.com/yuh-zha/AlignScore/issues/7 ).
From their codebase, the inference function for NLI only returns the score for "Aligned" class (the first class of the three). You may need to modify the inference code a bit to obtain all three.
During loading model checkpoint I as well got warned about not initialized model weights, as outlined in the previous issue (https://github.com/yuh-zha/AlignScore/issues/7 ).