Downloads · 30 days
883
65% of all-time downloads
TaiwoOgun/minilm-hate-speech-onnx
minilm-hate-speech-onnx is a text classification model from TaiwoOgun. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as mit.
Fine-tuned MiniLM-L12 model for binary hate speech detection, optimized for browser deployment.
Downloads · 30 days
883
65% of all-time downloads
All-time downloads
1.4K
Public
Repo size
34.2 MB
Likes
0
Public
Click a slice to open those files.
.onnx34.2 MB · 97%
From the Hugging Face model README
Fine-tuned MiniLM-L12 model for binary hate speech detection, optimized for browser deployment.
This model classifies text as either hate speech or not hate speech (binary classification). It was fine-tuned on the HateXplain dataset and exported to ONNX format with INT8 quantization for efficient on-device inference in browser extensions.
hate (1): Hate speechnot_hate (0): Offensive + Normal content merged| Metric | Score |
|---|---|
| F1 (Macro) | 0.8302 |
| Accuracy | 0.8567 |
| Precision | 0.8342 |
| Recall | 0.8266 |
| Model | F1 | Size (Quantized) |
|---|---|---|
| MiniLM (this) | 0.830 | 32.6 MB |
| DistilBERT | 0.825 | 64 MB |
| TinyBERT | 0.816 | 15 MB |
import { pipeline } from '@huggingface/transformers';
const classifier = await pipeline(
'text-classification',
'TaiwoOgun/minilm-hate-speech-onnx'
);
const result = await classifier('Some text to classify');
console.log(result);
// [{ label: 'hate', score: 0.85 }]
from transformers import pipeline
classifier = pipeline('text-classification', 'TaiwoOgun/minilm-hate-speech')
result = classifier('Some text to classify')
If you use this model, please cite:
@misc{ogunbanwo2025hatespeech,
author = {Ogunbanwo, Taiwo},
title = {Real-Time Hate Speech Detection Browser Extension},
year = {2025},
publisher = {HuggingFace},
url = {https://huggingface.co/TaiwoOgun/minilm-hate-speech-onnx}
}
MIT License