BetterShield / README.md
seffyehl's picture
Update README.md
244e29e verified
---
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
}
```