Downloads · 30 days
12
23% of all-time downloads
GhadeerALbadani/xlm_latin-Multilingual_detection_of_hate_speech
xlm_latin-Multilingual_detection_of_hate_speech is a text classification model from GhadeerALbadani. Use it when you need a label for a piece of text. It is set up for transformers.
XLMLatin is a multilingual Transformer-based model fine-tuned for multilingual hate speech detection using text standardized into a unified Latin script representation.
Downloads · 30 days
12
23% of all-time downloads
All-time downloads
53
Public
Parameters
111M
442 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors442 MB · 100%
From the Hugging Face model README
XLM_Latin is a multilingual Transformer-based model fine-tuned for multilingual hate speech detection using text standardized into a unified Latin script representation.
The model was fine-tuned using eight languages:
Before fine-tuning, the text from these languages was converted from their original writing systems into a unified Latin script through transliteration.
The model was then trained jointly on the eight standardized languages and evaluated individually on each language.
The classification task is binary:
Hate Speech
Non-Hate Speech
Developed by: Ghadeer Albadani
Model type: Multilingual Transformer-based sequence classification model
Task: Multilingual Hate Speech Detection
Languages: Arabic, Hebrew, Persian, Russian, Spanish, Bengali, Chinese, Korean
Writing System: Unified Latin Script
Method: Transliteration-based multilingual learning
Classification: Binary text classification
Framework: PyTorch / Hugging Face Transformers
Fine-tuned from: XLM-RoBERTa
License: Please refer to the license of the underlying pretrained model and datasets
XLM_Latin is designed for binary hate speech classification on multilingual text that has been converted into the same unified Latin-script representation used during model training.
The model can be used for:
The model can be further adapted for:
For downstream applications, the same preprocessing and transliteration procedure used during training should be applied to the input data.
The model should not be used as the sole decision-making mechanism for:
The model is primarily intended for research and automated classification assistance.
Hate speech detection is a context-sensitive task influenced by language, culture, dialect, topic, and social context.
Although transliteration provides a unified writing representation, it does not eliminate linguistic differences between languages.
The evaluation results demonstrate that model performance varies across languages.
The model achieved the following performance:
Potential limitations include:
Users should evaluate the model separately for each target language and application domain.
For real-world applications, predictions should be combined with:
The model should be considered a decision-support system rather than a fully autonomous moderation system.
The model can be loaded using the Hugging Face Transformers library.
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
model_name = "GhadeerALbadani/xlm_latin-Multilingual_detection_of_hate_speech"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSequenceClassification.from_pretrained(model_name)
text = "your transliterated text here"
inputs = tokenizer(
text,
return_tensors="pt",
truncation=True,
padding=True
)
with torch.no_grad():
outputs = model(**inputs)
prediction = torch.argmax(outputs.logits, dim=-1).item()
if prediction == 1:
print("Hate Speech")
else:
print("Non-Hate Speech")