Instructions to use akhooli/xlm-r-large-arabic-toxic with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use akhooli/xlm-r-large-arabic-toxic with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="akhooli/xlm-r-large-arabic-toxic")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("akhooli/xlm-r-large-arabic-toxic") model = AutoModelForSequenceClassification.from_pretrained("akhooli/xlm-r-large-arabic-toxic", device_map="auto") - Notebooks
- Google Colab
- Kaggle
xlm-r-large-arabic-toxic (toxic/hate speech classifier)
Note (Oct. , 2024): a new model based on few shot learning is available. See this Linkedin post
This model:
Toxic (hate speech) classification (Label_0: non-toxic, Label_1: toxic) of Arabic comments by fine-tuning XLM-Roberta-Large.
Zero shot classification of other languages (also works in mixed languages - ex. Arabic & English).
Usage and further info: see last section in this Colab notebook
- Downloads last month
- 159