初始化项目,由ModelHub XC社区提供模型

Model: fava-uw/fava-model
Source: Original Platform
This commit is contained in:
ModelHub XC
2026-05-14 03:47:45 +08:00
commit fe3ccbba57
32 changed files with 713 additions and 0 deletions

26
README.md Normal file
View File

@@ -0,0 +1,26 @@
---
license: mit
---
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,
)
INPUT = "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] "
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])
```