Downloads · 30 days
15
0% of all-time downloads
Dzeniks/alberta_fact_checking
alberta_fact_checking 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 Alberta Fact Checking Model is a natural language processing model designed to classify claims as either supporting or refuting a given evidence. The model uses the ALBERT architecture and a tokenizer for text cla…
Downloads · 30 days
15
0% of all-time downloads
All-time downloads
5.2K
Public
Parameters
11.7M
141 MB on disk
Likes
1
Public
Click a slice to open those files.
.bin46.8 MB · 48%
How the weights are stored.
F3211.7M · 100%
From the Hugging Face model README
The Alberta Fact Checking Model is a natural language processing model designed to classify claims as either supporting or refuting a given evidence. The model uses the ALBERT architecture and a tokenizer for text classification. It was trained on a dataset that primarily consisted of the FEVER, HOOVER, and FEVEROUS datasets, with a small sample of created data.
The model returns two labels:
The input to the model should be a claim accompanied by evidence.
The Alberta Fact Checking Model can be used to classify claims based on the evidence provided.
import torch
from transformers import AlbertTokenizer, AlbertForSequenceClassification
# Load the tokenizer and model
tokenizer = AlbertTokenizer.from_pretrained('Dzeniks/alberta_fact_checking')
model = AlbertForSequenceClassification.from_pretrained('Dzeniks/alberta_fact_checking')
# 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(outputs[0]).item()
print(f"Label: {label}")
While the alberta_fact_checking Model has been trained on a relatively large dataset and can provide accurate results, it may not always provide correct results. Users should always exercise caution when making decisions based on the output of any machine learning model.