# install this lib : pip install {PATH}/ParaPLUIE from PPLUIE import ppluie from PPLUIE.config import show_available_models template = "FS-DIRECT" device = "cuda:1" # to show LLM already tested with ParaPLUIE show_available_models() scorer = ppluie("mistralai/Mistral-7B-Instruct-v0.2", device) scorer.setTemplate(template) # to show available prompting templates styles scorer.show_templates() # to show how is the prompt encoded, to ensure that the correct numbers of special tokens are removed # and Yes / No words fit on one token scorer.chech_end_tokens_tmpl() S = "Have you ever seen a tsunami ?" H = "Have you ever seen a tiramisu ?" score = scorer(S, H) print("Result score : ",score)