Instructions to use vectara/hallucination_evaluation_model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use vectara/hallucination_evaluation_model with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="vectara/hallucination_evaluation_model", trust_remote_code=True)# Load model directly from transformers import AutoModelForSequenceClassification model = AutoModelForSequenceClassification.from_pretrained("vectara/hallucination_evaluation_model", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
New Commit Causing Inference Error
NoneType object not callable error occurs with new commit e2b6d9ec13ef307933e82ed6a7ca13ca77fee2d1
Unable to use the text-classification pipeline.
classifier = pipeline(
"text-classification",
model="vectara/hallucination_evaluation_model",
trust_remote_code=True,
)
...
classifier("sample document[SEP]sample summary") <<< errors
Hi @izimmerman please see the new usage here
https://huggingface.co/vectara/hallucination_evaluation_model#using-with-pipeline
Let us know if you have additional questions.
Note that you can no longer use [SEP] to connect the premise and the hypothesis. We now use an instructional prompt template. If you want to save the hassle, you can use our end-to-end solution here: https://huggingface.co/vectara/hallucination_evaluation_model#using-with-automodel
@izimmerman Could you please let us know whether you are able to use HHEM-2.1-Open now? If you need further assistance, feel free to let us know.