BARTPho‑HSD: Hate Speech Detection for Vietnamese Text

Fine‑tuned from vinai/bartpho-syllable on the VN‑HSD dataset.

Model Details

  • Base Model: vinai/bartpho-syllable
  • Dataset: VN‑HSD (ViSoLex‑HSD unified hate speech corpus)
  • Fine‑tuning: HuggingFace Transformers

Hyperparameters

  • Batch size: 32
  • Learning rate: 3e-5
  • Epochs: 100
  • Max sequence length: 256

Results

  • Accuracy: <INSERT_ACCURACY>
  • F1 Score: <INSERT_F1_SCORE>

Usage

from transformers import AutoTokenizer, AutoModelForSequenceClassification

tokenizer = AutoTokenizer.from_pretrained("visolex/bartpho-hsd")
model = AutoModelForSequenceClassification.from_pretrained("visolex/bartpho-hsd")

text = "Anh ta đang lan truyền những lời lẽ căm ghét."
inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=256)
pred = model(**inputs).logits.argmax(dim=-1).item()
print(f"Dự đoán: {['CLEAN','OFFENSIVE','HATE'][pred]}")
Downloads last month
5
Safetensors
Model size
397M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Dataset used to train visolex/bartpho-hsd

Collection including visolex/bartpho-hsd

Evaluation results