ViHSD-UIT-ViSoBERT là mô hình học sâu được fine-tune từ mô hình tiền huấn luyện ViSoBERT, chuyên biệt cho tác vụ phân loại ngôn từ thù ghét tiếng Việt (Vietnamese Hate Speech Detection). Mô hình được huấn luyện trên tập dữ liệu ViHSD.
uitnlp/visobert0: clean (Bình luận không chứa ngôn từ thù ghét hoặc xúc phạm)1: offensive (Bình luận có tính xúc phạm hoặc gây khó chịu, nhưng không mang tính thù ghét rõ ràng)2: hate (Bình luận chứa ngôn từ thù ghét, thường nhắm vào cá nhân hoặc nhóm cụ thể)sonlam1102/vihsd| Metric | Value |
|---|---|
| Accuracy | 88.32% |
| F1-macro | 0.690 |
| F1-weighted | 0.881 |
| Loss | 0.358 |
| Epochs | 10 |
| Eval time | 32.99s |
⚠️ Lưu ý phiên bản thư viện
transformers==4.51.0 và tokenizers==0.21.2.from transformers import AutoTokenizer, AutoModelForSequenceClassification
model = AutoModelForSequenceClassification.from_pretrained("nd-khoa/vihsd-uit-visobert")
tokenizer = AutoTokenizer.from_pretrained("nd-khoa/vihsd-uit-visobert")
text = input("Nhập 1 câu bình luận bất kỳ:\n")
inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=128)
outputs = model(**inputs)
logits = outputs.logits
prediction = logits.argmax(dim=1).item()
print(f"Label: {prediction}")
@inproceedings{nguyen-etal-2023-visobert,
title = "ViSoBERT: A Pre-Trained Language Model for Vietnamese Social Media Text Processing",
author = "Nguyen, Nam and Phan, Thang and Nguyen, Duc-Vu and Nguyen, Kiet",
booktitle = "Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing",
year = "2023",
publisher = "Association for Computational Linguistics",
url = "https://aclanthology.org/2023.emnlp-main.315",
pages = "5191--5207"
}
@inproceedings{luu2021large,
title={A large-scale dataset for hate speech detection on Vietnamese social media texts},
author={Luu, Son T and Nguyen, Kiet Van and Nguyen, Ngan Luu-Thuy},
booktitle={Advances and Trends in Artificial Intelligence. Artificial Intelligence Practices: 34th International Conference on Industrial, Engineering and Other Applications of Applied Intelligent Systems, IEA/AIE 2021},
pages={415--426},
year={2021},
publisher={Springer}
}
last-checkpoint/optimizer.pt 781 MBlast-checkpoint/model.safetensors 390 MBmodel.safetensors 390 MBlast-checkpoint/rng_state.pth 14.2 kBlast-checkpoint/training_args.bin 5.4 kBtraining_args.bin 5.4 kBlast-checkpoint/scheduler.pt 1.1 kB