utahnlp/x-fact
Viewer • Updated • 60.6k • 1.64k • 4
Fine-tuned xlm-roberta-base on X-Fact for binary veracity
classification (true-ish vs. false-ish).
xlm-roberta-base (278M params)X-Fact all_languages - 19,079 train / 2,535 dev / 3,826 test
| Language | Macro-F1 | Accuracy |
|---|---|---|
| Spanish | 0.6718 | 0.7441 |
| Hindi | 0.4654 | 0.8706 |
| Portuguese | 0.6636 | 0.6637 |
| Language | Macro-F1 | Accuracy |
|---|---|---|
| Hindi | 0.3327 | 0.4987 |
| Portuguese | 0.6203 | 0.6504 |
| Language | true-ish | false-ish |
|---|---|---|
| Spanish | 0.8258 | 0.5179 |
| Hindi | 0.0000 | 0.9308 |
| Portuguese | 0.6582 | 0.6690 |
Class imbalance in low-resource languages masks model failure.
Hindi achieves 87.7% accuracy but true-ish F1 = 0.000 - the model
defaults entirely to majority class. Macro-F1 and per-class F1 are
essential for multilingual disinformation detection.
Install transformers and load the model:
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained('nusaiba19/xlmr-xfact-binary')
model = AutoModelForSequenceClassification.from_pretrained('nusaiba19/xlmr-xfact-binary')
text = 'Your claim here'
inputs = tokenizer(text, return_tensors='pt', padding=True, truncation=True)
pred = model(**inputs).logits.argmax(-1).item()
print(['true-ish', 'false-ish'][pred])