File size: 1,257 Bytes
08109c8
 
04fa91e
 
 
 
 
 
 
 
 
 
 
08109c8
 
 
04fa91e
08109c8
04fa91e
 
 
 
08109c8
04fa91e
 
 
 
08109c8
 
04fa91e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
---
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.