Downloads · 30 days
33
0% of all-time downloads
Dzeniks/roberta-fact-check
roberta-fact-check is a text classification model from Dzeniks. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as mit.
The Roberta-Fact-Check Model is a deep learning model that uses the Roberta architecture for text classification. It is designed to classify claims as either supported or refuted based on the provided evidence.
Downloads · 30 days
33
0% of all-time downloads
All-time downloads
29.8K
Public
Parameters
125M
997 MB on disk
Likes
13
Public
Click a slice to open those files.
.bin499 MB · 50%
How the weights are stored.
F32125M · 100%
From the Hugging Face model README
The Roberta-Fact-Check Model is a deep learning model that uses the Roberta architecture for text classification. It is designed to classify claims as either supported or refuted based on the provided evidence.
The model was trained using the Adam optimizer with a learning rate of 2-4e, epsilon of 1-8, and weight decay of 2-8e. The training dataset mainly consisted of the FEVER and Hover datasets, along with a small sample of manually created data.
The model takes a claim and corresponding evidence as input and returns a label indicating whether the evidence supports or refutes the claim. The two possible labels are:
To use the Roberta-Fact-Check Model, you can simply pass in a claim and evidence as input to the model and receive a label indicating whether the evidence supports or refutes the claim. The model can be integrated into various applications for fact-checking and misinformation detection.
import torch
from transformers import RobertaTokenizer, RobertaForSequenceClassification
# Load the tokenizer and model
tokenizer = RobertaTokenizer.from_pretrained('Dzeniks/roberta-fact-check')
model = RobertaForSequenceClassification.from_pretrained('Dzeniks/roberta-fact-check')
# Define the claim with evidence to classify
claim = "Albert Einstein work in the field of computer science"
evidence = "Albert Einstein was a German-born theoretical physicist, widely acknowledged to be one of the greatest and most influential physicists of all time."
# Tokenize the claim with evidence
x = tokenizer.encode_plus(claim, evidence, return_tensors="pt")
model.eval()
with torch.no_grad():
prediction = model(**x)
label = torch.argmax(prediction[0]).item()
print(f"Label: {label}")
This model was developed using the Hugging Face transformers library and trained on the FEVER and Hover datasets. We would like to thank the developers of these datasets for their contributions to the community.
While the Roberta-Fact-Check Model has been trained on a large dataset and can provide accurate results in many cases, it may not always provide correct results. Users should always exercise caution when making decisions based on the output of any machine learning model.