File size: 1,588 Bytes
1ec8356
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
244e29e
1ec8356
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
244e29e
 
 
 
 
 
1ec8356
 
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
---
license: apache-2.0
---
---
language: en
license: mit
tags:
- hate-speech-detection
- text-classification
- rationale-extraction
datasets:
- your-dataset-name
metrics:
- accuracy
- f1
model-index:
- name: hate-speech-rationale-model
  results:
  - task:
      type: text-classification
      name: Hate Speech Detection
    metrics:
    - type: accuracy
      value: 0.XX  # Your test accuracy
    - type: f1
      value: 0.XX  # Your test F1
---

# Hate Speech Detection with Rationale Extraction

This model detects hate speech in text and provides rationale explanations for its predictions.

## Model Description

- **Architecture**: HateBERT + Rationale BERT + Multi-Scale CNN + Attention
- **Training Data**: [Describe your dataset]
- **Performance**: 
  - Validation Loss: 0.27
  - Test Accuracy: XX%
  - Test F1: XX%

## Usage
```python
from huggingface_hub import hf_hub_download
import torch

# Download model
model_path = hf_hub_download(
    repo_id="seffyehl/BetterShield",
    filename="pytorch_model.pth"
)

# Load model (see full example in repository)
checkpoint = torch.load(model_path, map_location='cpu')
# ... (rest of loading code)
```

## Training Details

- **Batch Size**: 8
- **Learning Rate**: 1e-5
- **Weight Decay**: 0.05
- **Dropout**: 0.5
- **Epochs**: Stopped early at epoch X

## Limitations

[Describe any known limitations]

## Citation
```bibtex
@misc{bettershield-2025,
  author = Orion,
  title = Hate Speech Detection with Rationale Extraction,
  year = 2025,
  publisher = HuggingFace,
  url = https://huggingface.co/seffyehl/BetterShield
}
```