Downloads · 30 days
12
25% of all-time downloads
BaoNhan/phobert-base-vifn
phobert-base-vifn is a text classification model from BaoNhan. Use it when you need a label for a piece of text. It is set up for transformers.
This model is vinai/phobert-base fine-tuned for binary Vietnamese fake-news classification on the text-only ViFN benchmark.
Downloads · 30 days
12
25% of all-time downloads
All-time downloads
48
Public
Parameters
135M
540 MB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors540 MB · 100%
From the Hugging Face model README
This model is vinai/phobert-base fine-tuned for binary Vietnamese fake-news classification on the text-only ViFN benchmark.
Test metrics are reported as mean ± sample standard deviation over seeds [42, 22, 202].
| Metric | Mean ± std |
|---|---|
| Test Macro-F1 | 0.8603 ± 0.0042 |
| Test accuracy | 0.8605 ± 0.0041 |
| Test macro precision | 0.8635 ± 0.0045 |
| Test macro recall | 0.8608 ± 0.0041 |
| Development Macro-F1 | 0.8769 ± 0.0082 |
| seed | dev_macro_f1 | test_macro_f1 | test_accuracy | micro_batch_size | gradient_accumulation_steps |
|---|---|---|---|---|---|
| 22.000000 | 0.886382 | 0.865140 | 0.865248 | 8.000000 | 1.000000 |
| 42.000000 | 0.872334 | 0.858149 | 0.858156 | 8.000000 | 1.000000 |
| 202.000000 | 0.872025 | 0.857576 | 0.858156 | 8.000000 | 1.000000 |
{
"0": "0",
"1": "1"
}
import torch
from transformers import AutoModelForSequenceClassification, AutoTokenizer
model_id = "BaoNhan/phobert-base-vifn"
tokenizer = AutoTokenizer.from_pretrained(model_id, use_fast=False)
model = AutoModelForSequenceClassification.from_pretrained(model_id)
# This checkpoint expects text already word-segmented by VnCoreNLP.
text = "Đây là văn_bản tiếng_Việt đã được chuẩn_hóa ."
inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=256)
with torch.no_grad():
probabilities = model(**inputs).logits.softmax(dim=-1)[0]
predicted_id = int(probabilities.argmax())
print(model.config.id2label[predicted_id], probabilities.tolist())
aggregate_metrics.json: complete aggregate metrics and training manifest.artifacts/per_seed_results.csv: one row per fine-tuning seed.artifacts/seed_*_confusion_matrix.csv: confusion matrix for each seed.artifacts/seed_*_classification_report.json: per-class metrics.artifacts/seed_*_test_predictions.csv: IDs, gold/predicted labels and probabilities; raw text is excluded.ViFN is small and domain-specific. Performance may not transfer to newly emerging misinformation, other Vietnamese writing styles, or texts requiring image/source/engagement evidence. The model predicts from linguistic content only and should not be treated as a factual verification system.
@article{huynh2025vifn,
title={Utilizing Transformer Models To Detect Vietnamese Fake News on Social Media Platforms},
author={Huynh, Anh-Tuan and Tran, Phuoc},
journal={KSII Transactions on Internet and Information Systems},
volume={19},
number={2},
pages={472--487},
year={2025},
doi={10.3837/TIIS.2025.02.006}
}