Text Classification
Transformers
Safetensors
Vietnamese
electra
clickbait-detection
vietnamese
viclickbait-2025
Instructions to use BaoNhan/velectra-base-ViClickbait-2025 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use BaoNhan/velectra-base-ViClickbait-2025 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="BaoNhan/velectra-base-ViClickbait-2025")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("BaoNhan/velectra-base-ViClickbait-2025") model = AutoModelForSequenceClassification.from_pretrained("BaoNhan/velectra-base-ViClickbait-2025", device_map="auto") - Notebooks
- Google Colab
- Kaggle
vELECTRA-base — ViClickbait-2025
Fine-tuned from FPTAI/velectra-base-discriminator-cased for binary Vietnamese clickbait detection.
Experimental setup
- Input: headline paired with lead paragraph; no URL, source, category, publish time, image, or engagement metadata.
- Fixed 80/10/10 split using
StratifiedGroupKFoldwith seed 42. - Fine-tuning seeds: [42, 22, 202]; 3 epochs per seed.
- Development Macro-F1 selects checkpoints and representative seed.
- Weighted cross-entropy from training-label frequencies:
True. - Effective batch size: 8; max length: 256.
Results
| Metric | Mean ± sample std |
|---|---|
| Test Macro-F1 | 0.7546 ± 0.0176 |
| Test accuracy | 0.7710 ± 0.0195 |
| Dev Macro-F1 | 0.7735 ± 0.0021 |
Representative seed: 22, selected only by development Macro-F1.
Per-seed
| seed | dev_macro_f1 | test_macro_f1 | test_accuracy |
|---|---|---|---|
| 22 | 0.7759 | 0.7495 | 0.7661 |
| 42 | 0.7726 | 0.7742 | 0.7924 |
| 202 | 0.772 | 0.7402 | 0.7544 |
Labels
0: non-clickbait1: clickbait
Usage
from transformers import AutoModelForSequenceClassification, AutoTokenizer
model_id = "BaoNhan/velectra-base-ViClickbait-2025"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForSequenceClassification.from_pretrained(model_id)
title = "Tiêu đề bài báo"
lead = "Đoạn dẫn của bài báo"
inputs = tokenizer(title, lead, return_tensors="pt", truncation=True, max_length=256)
prediction = model(**inputs).logits.argmax(dim=-1).item()
print(model.config.id2label[prediction])
Dataset
- Nguyen et al. (2025), ViClickbait-2025: A comprehensive dataset for Vietnamese clickbait detection. https://doi.org/10.1016/j.dib.2025.112164
- Dataset: https://doi.org/10.17632/3wc46bfcjc.1
Limitations
The dataset is small, temporally bounded to 2023–2025, and collected from eight Vietnamese news platforms. Results may not transfer to social media, other publishers, or emerging clickbait styles.
- Downloads last month
- 10