How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("text-classification", model="sathwika01/hate-speech-classifier")
# pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification

tokenizer = AutoTokenizer.from_pretrained("sathwika01/hate-speech-classifier")
model = AutoModelForSequenceClassification.from_pretrained("sathwika01/hate-speech-classifier", device_map="auto")
Quick Links

Hate Speech Classifier β€” Fine-tuned DistilBERT

Model Description

A DistilBERT model fine-tuned for binary hate speech detection on the TweetEval hate speech dataset. Classifies text as hate (1) or non-hate (0).

  • Model type: Text Classification (DistilBERT)
  • Base model: distilbert-base-uncased
  • Language: English
  • Developed by: Sathwika Raj Bandaru

Training Details

  • Dataset: cardiffnlp/tweet_eval (hate subset) β€” 9,000 train / 1,000 validation / 2,970 test
  • Epochs: 3
  • Batch size: 16
  • Max sequence length: 128

Evaluation Results

Split F1 (weighted)
Validation 0.771
Test 0.376

How to Use

from transformers import pipeline
classifier = pipeline("text-classification", 
                       model="sathwika01/hate-speech-classifier")
classifier("This is an example text")

Intended Use

Research and educational purposes β€” detecting hateful content in social media text.

Downloads last month
2
Safetensors
Model size
67M params
Tensor type
F32
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Dataset used to train sathwika01/hate-speech-classifier

Space using sathwika01/hate-speech-classifier 1