File size: 542 Bytes
3567692 cd26cef 3567692 cd26cef 3567692 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
FAVA, a verification model.
```
import torch
import vllm
from transformers import AutoTokenizer, AutoModelForSequenceClassification
model = vllm.LLM(model="fava-uw/fava-model")
sampling_params = vllm.SamplingParams(
temperature=0,
top_p=1.0,
max_tokens=1024,
)
output = "" # add your passage to verify
evidence = "" # add a piece of evidence
prompts = [INPUT.format_map({"evidence": evidence, "output": output})]
outputs = model.generate(prompts, sampling_params)
outputs = [it.outputs[0].text for it in outputs]
print(outputs[0])
``` |