Text Classification
Transformers
Safetensors
Vietnamese
English
kd_fakenews
fake-news-detection
cross-lingual
claim-verification
teacher-model
custom_code
Instructions to use phuy1125/xlmr-large-fakenews-teacher with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use phuy1125/xlmr-large-fakenews-teacher with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="phuy1125/xlmr-large-fakenews-teacher", trust_remote_code=True)# Load model directly from transformers import AutoModelForSequenceClassification model = AutoModelForSequenceClassification.from_pretrained("phuy1125/xlmr-large-fakenews-teacher", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
XLM-RoBERTa-Large — Cross-lingual Fake-News Detection (Teacher)
Teacher model for cross-lingual (EN → VI) fake-news / claim verification. Trained on English first (M1), then adapted to Vietnamese with a mixed LoRA stage (Stage-3, r=8, α=16); the LoRA delta was merged back into the backbone. This is the best seed (42) teacher used to distill the student models.
- Backbone:
xlm-roberta-large(~560M params total) - Labels:
0 = fake (tin giả),1 = real (tin thật)
Results (best seed = 42)
| Split | F1-macro |
|---|---|
| VI test | 0.8858 |
| EN test | 0.9209 |
| VI val | 0.8617 |
Distilled students
phuy1125/xlmr-base-fakenews-kd(F1 0.8401)phuy1125/mminilm-l12-fakenews-kd(F1 0.8450)phuy1125/mminilm-l6-fakenews-kd(F1 0.8262)phuy1125/xlmr-large-fakenews-lora(Stage-3 LoRA adapter)
Usage
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
REPO = "phuy1125/xlmr-large-fakenews-teacher"
tok = AutoTokenizer.from_pretrained(REPO, trust_remote_code=True)
model = AutoModelForSequenceClassification.from_pretrained(REPO, trust_remote_code=True).eval()
# Input format used in training: "claim | evidence"
text = "Một tuyên bố cần kiểm chứng | bằng chứng liên quan"
enc = tok(text, truncation=True, max_length=256, return_tensors="pt")
with torch.no_grad():
logits = model(**enc).logits
print(model.config.id2label[int(logits.argmax(-1))]) # 'fake' or 'real'
Note: training used head-tail truncation (
ids[:127] + ids[-127:]) atmax_length=256.
- Downloads last month
- 6
Model tree for phuy1125/xlmr-large-fakenews-teacher
Base model
FacebookAI/xlm-roberta-large