Hate Speech Detection
Collection
6 items
•
Updated
Fine‑tuned from vinai/phobert-base
on the VN‑HSD dataset.
vinai/phobert-base
32
5e-5
100
256
<INSERT_ACCURACY>
<INSERT_F1_SCORE>
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("visolex/phobert-hsd")
model = AutoModelForSequenceClassification.from_pretrained("visolex/phobert-hsd")
text = "Đừng nói những lời thô tục như vậy!"
inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=256)
pred = model(**inputs).logits.argmax(dim=-1).item()
print(f"Label: {['CLEAN','OFFENSIVE','HATE'][pred]}")
Base model
vinai/phobert-base