Run this model with HF Jobs
Run vectara/hallucination_evaluation_model on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/vectara/hallucination_evaluation_model. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/vectara/hallucination_evaluation_model on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
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)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForSequenceClassification model = AutoModelForSequenceClassification.from_pretrained("vectara/hallucination_evaluation_model", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Finetuning
Thanks for this model!
I'd like to finetune it on my own data and have a question:
In the Vitamin C dataset, the label is an ordinal variable which has 3 levels: "REFUTES", "NOT ENOUGH DATA", and "SUPPORTS".
However, your training code expects the label to be an int:
for i, row in df_train.iterrows():
train_examples.append(InputExample(texts=[row['source'], row['summary']], label=int(row['label'])))
Could you please elaborate how are these levels converted to ints?
I'm not the author, but I'd imagine you convert REFUTES to 0, SUPPORTS to 1, and then you have to options for NOT ENOUGH DATA: you could either drop it, or treat it as 0.
Right, thank you Amin. I just want to be consistent with the original training data.