CoolFace
Modelpublic

fava-uw/fava-model

sourceHugging Facemitupdated 2y agoView on Hugging Face
18likes29downloads
README.md26 linesDownload Raw Back to root
1---2license: mit3---4FAVA, a verification model.5 6```7import torch8import vllm9from transformers import AutoTokenizer, AutoModelForSequenceClassification10 11model = vllm.LLM(model="fava-uw/fava-model")12sampling_params = vllm.SamplingParams(13  temperature=0,14  top_p=1.0,15  max_tokens=1024,16)17 18INPUT = "Read the following references:\n{evidence}\nPlease identify all the errors in the following text using the information in the references provided and suggest edits if necessary:\n[Text] {output}\n[Edited] "19 20output = "" # add your passage to verify21evidence = "" # add a piece of evidence22prompts = [INPUT.format_map({"evidence": evidence, "output": output})]23outputs = model.generate(prompts, sampling_params)24outputs = [it.outputs[0].text for it in outputs]25print(outputs[0])26```