Text Classification
Transformers
ONNX
Safetensors
Transformers.js
modernbert
hate-speech
hate-speech-detection
content-moderation
trust-and-safety
multi-label-classification
mmbert
text-embeddings-inference
Instructions to use Horizon-Labs/multilingual-hate-speech-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Horizon-Labs/multilingual-hate-speech-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="Horizon-Labs/multilingual-hate-speech-base")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("Horizon-Labs/multilingual-hate-speech-base") model = AutoModelForSequenceClassification.from_pretrained("Horizon-Labs/multilingual-hate-speech-base", device_map="auto") - Transformers.js
How to use Horizon-Labs/multilingual-hate-speech-base with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('text-classification', 'Horizon-Labs/multilingual-hate-speech-base'); - Notebooks
- Google Colab
- Kaggle
Download training/data_stats.json from Horizon-Labs/multilingual-hate-speech-base: direct link, hf CLI and curl.
- Browser
- Download file 594 Bytes
-
https://huggingface.co/Horizon-Labs/multilingual-hate-speech-base/resolve/main/training/data_stats.json
- Command line
-
hf download hf://Horizon-Labs/multilingual-hate-speech-base/training/data_stats.json
-
curl -L -o data_stats.json https://huggingface.co/Horizon-Labs/multilingual-hate-speech-base/resolve/main/training/data_stats.json
594 Bytes
| { | |
| "train": 291851, | |
| "val": 12881, | |
| "real_mult": 2, | |
| "removed_eval_overlap": 11, | |
| "by_source": { | |
| "civil": 119983, | |
| "gen": 85732, | |
| "mhs": 33527, | |
| "hatexplain": 17266 | |
| }, | |
| "hate_ge_05": { | |
| "civil": 0.153, | |
| "gen": 0.282, | |
| "hatexplain": 0.497, | |
| "mhs": 0.303 | |
| }, | |
| "target_ge_05_among_hate": { | |
| "target_race": 0.492, | |
| "target_religion": 0.222, | |
| "target_origin": 0.4, | |
| "target_gender": 0.158, | |
| "target_sexuality": 0.11, | |
| "target_age": 0.067, | |
| "target_disability": 0.073 | |
| }, | |
| "gen_hate_by_intended": { | |
| "hateful": 0.665, | |
| "non-hateful": 0.053, | |
| "offensive": 0.069 | |
| }, | |
| "n_lang": 56 | |
| } |