ucsbnlp/liar
Updated • 2.55k • 32
A fine-tuned DeBERTa-v3-large model for 6-class fact-checking and fake news detection.
This model is based on microsoft/deberta-v3-large and has been fine-tuned on the LIAR dataset for fact-checking tasks. It classifies statements into 6 truthfulness categories.
The model predicts one of six truthfulness labels:
true (0): The statement is accuratemostly-true (1): The statement is mostly accuratehalf-true (2): The statement has some truth but is incomplete/misleadingbarely-true (3): The statement has minimal truthfalse (4): The statement is inaccuratepants-fire (5): The statement is completely false and ridiculousfrom transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
# Load model and tokenizer
tokenizer = AutoTokenizer.from_pretrained("Arko007/fact-check-v1")
model = AutoModelForSequenceClassification.from_pretrained("Arko007/fact-check-v1")
# Example usage
text = "The economy is doing great under this administration"
inputs = tokenizer(text, return_tensors="pt", truncation=True, padding=True, max_length=384)
with torch.no_grad():
outputs = model(**inputs)
predictions = torch.softmax(outputs.logits, dim=-1)
predicted_class = torch.argmax(predictions, dim=-1)
# Map prediction to label
labels = ["true", "mostly-true", "half-true", "barely-true", "false", "pants-fire"]
print(f"Prediction: {labels[predicted_class.item()]}")
print(f"Confidence: {predictions[0][predicted_class].item():.4f}")
The model was trained with enhanced features including:
If you use this model, please cite:
@misc{fact-check-v1,
title={Fact-Check Model v1: DeBERTa-based Fake News Detection},
author={Arko007},
year={2025},
url={https://huggingface.co/Arko007/fact-check-v1}
}
Apache 2.0