Lightweight DeBERTa-v3-Small fine-tuned to detect factual vs. non-factual statements using TruthfulQA and FEVER.
Part of the Army of Safeguards research project
≈ 20 000 combined examples after cleaning.
1{
2 "label": "non-factual",
3 "confidence": 0.81,
4 "probs": { "supported": 0.19, "non-factual": 0.81 }
5}
1from transformers import AutoTokenizer, AutoModelForSequenceClassification
2import torch, torch.nn.functional as F
3
4repo = "ajithbondili/deberta-v3-factuality-small"
5tok = AutoTokenizer.from_pretrained(repo)
6model = AutoModelForSequenceClassification.from_pretrained(repo)
7
8text = "The Moon is made of cheese."
9inputs = tok(text, return_tensors="pt", truncation=True, padding=True)
10with torch.no_grad():
11 logits = model(**inputs).logits
12 probs = F.softmax(logits, dim=-1)
13label = torch.argmax(probs).item()
14print({"label": label, "probs": probs.tolist()})
@software{bondili_2025_factuality,
author = {Ajith Bondili},
title = {DeBERTa-v3-Small Factuality / Misinformation Classifier},
year = {2025},
url = {
https://huggingface.co/ajith-bondili/deberta-v3-factuality-small}
}