abhika-m commited on
Commit
cd26cef
1 Parent(s): 3567692

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +13 -3
README.md CHANGED
@@ -2,9 +2,19 @@ FAVA, a verification model.
2
 
3
  ```
4
  import torch
 
5
  from transformers import AutoTokenizer, AutoModelForSequenceClassification
6
 
7
- tokenizer = AutoTokenizer.from_pretrained("abhika-m/FAVA")
8
- fava = AutoModelForSequenceClassification.from_pretrained("abhika-m/FAVA")
9
-
 
 
 
 
 
 
 
 
 
10
  ```
 
2
 
3
  ```
4
  import torch
5
+ import vllm
6
  from transformers import AutoTokenizer, AutoModelForSequenceClassification
7
 
8
+ model = vllm.LLM(model="fava-uw/fava-model")
9
+ sampling_params = vllm.SamplingParams(
10
+ temperature=0,
11
+ top_p=1.0,
12
+ max_tokens=1024,
13
+ )
14
+ output = "" # add your passage to verify
15
+ evidence = "" # add a piece of evidence
16
+ prompts = [INPUT.format_map({"evidence": evidence, "output": output})]
17
+ outputs = model.generate(prompts, sampling_params)
18
+ outputs = [it.outputs[0].text for it in outputs]
19
+ print(outputs[0])
20
  ```