Text Classification
Transformers
ONNX
Safetensors
Transformers.js
modernbert
toxicity
toxic-comment-classification
content-moderation
detoxify
multi-label-classification
mmbert
text-embeddings-inference
Instructions to use Horizon-Labs/multilingual-toxicity-small with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Horizon-Labs/multilingual-toxicity-small with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="Horizon-Labs/multilingual-toxicity-small")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("Horizon-Labs/multilingual-toxicity-small") model = AutoModelForSequenceClassification.from_pretrained("Horizon-Labs/multilingual-toxicity-small", device_map="auto") - Transformers.js
How to use Horizon-Labs/multilingual-toxicity-small with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('text-classification', 'Horizon-Labs/multilingual-toxicity-small'); - Notebooks
- Google Colab
- Kaggle
Download eval/this_model.json from Horizon-Labs/multilingual-toxicity-small: direct link, hf CLI and curl.
- Browser
- Download file 2.16 kB
-
https://huggingface.co/Horizon-Labs/multilingual-toxicity-small/resolve/main/eval/this_model.json
- Command line
-
hf download hf://Horizon-Labs/multilingual-toxicity-small/eval/this_model.json
-
curl -L -o this_model.json https://huggingface.co/Horizon-Labs/multilingual-toxicity-small/resolve/main/eval/this_model.json
2.16 kB
| { | |
| "/fast/awuhrmann/agent-outputs/run-20260923-130458/720d8595-01bf-4e25-ba2c-fb389c35372c/model": { | |
| "labels": [ | |
| "toxicity", | |
| "severe_toxicity", | |
| "obscene", | |
| "threat", | |
| "insult", | |
| "identity_attack", | |
| "sexual_explicit" | |
| ], | |
| "mapped": [ | |
| "toxicity", | |
| "severe_toxicity", | |
| "obscene", | |
| "threat", | |
| "insult", | |
| "identity_attack", | |
| "sexual_explicit" | |
| ], | |
| "civil_test": { | |
| "n": 20000, | |
| "auc": { | |
| "toxicity": 0.9718674836337449, | |
| "obscene": 0.9952428473989308, | |
| "threat": 0.9939400143528782, | |
| "insult": 0.9803024564640757, | |
| "identity_attack": 0.9882729699167228, | |
| "sexual_explicit": 0.9971069560751085 | |
| }, | |
| "mean_auc": 0.9877887879735767, | |
| "toxicity_auc": 0.9718674836337449 | |
| }, | |
| "tdx_am": { | |
| "n": 1000, | |
| "auc": 0.636424, | |
| "f1_05": 0.23064250411861614 | |
| }, | |
| "tdx_ar": { | |
| "n": 1000, | |
| "auc": 0.721266, | |
| "f1_05": 0.5644768856447688 | |
| }, | |
| "tdx_de": { | |
| "n": 1000, | |
| "auc": 0.858672, | |
| "f1_05": 0.4949053857350801 | |
| }, | |
| "tdx_en": { | |
| "n": 1000, | |
| "auc": 0.990008, | |
| "f1_05": 0.9513184584178499 | |
| }, | |
| "tdx_es": { | |
| "n": 1000, | |
| "auc": 0.898538, | |
| "f1_05": 0.7027027027027027 | |
| }, | |
| "tdx_fr": { | |
| "n": 1000, | |
| "auc": 0.9841, | |
| "f1_05": 0.8785871964679912 | |
| }, | |
| "tdx_he": { | |
| "n": 1000, | |
| "auc": 0.777514, | |
| "f1_05": 0.5625806451612904 | |
| }, | |
| "tdx_hi": { | |
| "n": 1000, | |
| "auc": 0.897142, | |
| "f1_05": 0.35889070146818924 | |
| }, | |
| "tdx_hin": { | |
| "n": 1000, | |
| "auc": 0.749194, | |
| "f1_05": 0.3285024154589372 | |
| }, | |
| "tdx_it": { | |
| "n": 1000, | |
| "auc": 0.840212, | |
| "f1_05": 0.7481713688610241 | |
| }, | |
| "tdx_ja": { | |
| "n": 1000, | |
| "auc": 0.830714, | |
| "f1_05": 0.3277591973244147 | |
| }, | |
| "tdx_ru": { | |
| "n": 1000, | |
| "auc": 0.956228, | |
| "f1_05": 0.7377666248431619 | |
| }, | |
| "tdx_tt": { | |
| "n": 1000, | |
| "auc": 0.807868, | |
| "f1_05": 0.5444743935309974 | |
| }, | |
| "tdx_uk": { | |
| "n": 1000, | |
| "auc": 0.80828, | |
| "f1_05": 0.4169184290030212 | |
| }, | |
| "tdx_zh": { | |
| "n": 1000, | |
| "auc": 0.770986, | |
| "f1_05": 0.35987261146496813 | |
| }, | |
| "_civil_mean_auc": 0.9877887879735767, | |
| "_civil_toxicity_auc": 0.9718674836337449, | |
| "_tdx_mean_auc": 0.8351430666666668, | |
| "_tdx_mean_f1": 0.5471713013468676 | |
| } | |
| } |