Views
No views yet
microsoft/deberta-v3-large and has been fine-tuned on the LIAR dataset for fact-checking tasks. It classifies statements into 6 truthfulness categories.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 ridiculous1from transformers import AutoTokenizer, AutoModelForSequenceClassification
2import torch
3
4# Load model and tokenizer
5tokenizer = AutoTokenizer.from_pretrained("Arko007/fact-check-v1")
6model = AutoModelForSequenceClassification.from_pretrained("Arko007/fact-check-v1")
7
8# Example usage
9text = "The economy is doing great under this administration"
10inputs = tokenizer(text, return_tensors="pt", truncation=True, padding=True, max_length=384)
11
12with torch.no_grad():
13 outputs = model(**inputs)
14 predictions = torch.softmax(outputs.logits, dim=-1)
15 predicted_class = torch.argmax(predictions, dim=-1)
16
17# Map prediction to label
18labels = ["true", "mostly-true", "half-true", "barely-true", "false", "pants-fire"]
19print(f"Prediction: {labels[predicted_class.item()]}")
20print(f"Confidence: {predictions[0][predicted_class].item():.4f}")1@misc{fact-check-v1,
2 title={Fact-Check Model v1: DeBERTa-based Fake News Detection},
3 author={Arko007},
4 year={2025},
5 url={https://huggingface.co/Arko007/fact-check-v1}
6}