sathwika01's picture
Update README.md
04fa91e verified
---
library_name: transformers
tags:
- text-classification
- hate-speech-detection
- distilbert
- transformers
- pytorch
license: apache-2.0
datasets:
- cardiffnlp/tweet_eval
metrics:
- f1
---
# Hate Speech Classifier — Fine-tuned DistilBERT
## Model Description
A DistilBERT model fine-tuned for **binary hate speech detection** on the
[TweetEval hate speech dataset](https://huggingface.co/datasets/cardiffnlp/tweet_eval).
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
```python
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.