File size: 2,567 Bytes
3ee98a8 35887c1 3ee98a8 35887c1 5f7aa43 35887c1 5f7aa43 35887c1 5f7aa43 35887c1 47ce046 35887c1 5f7aa43 35887c1 5f7aa43 35887c1 |
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 |
---
license: mit
datasets:
- stereoset
- crows_pairs
language:
- en
metrics:
- f1
- recall
- precision
- accuracy
---
# Sentence-Level Stereotype Classifier
The Sentence-Level Stereotype Classifier is a transformer-based model developed to detect and classify different types of stereotypes present in text at the sentence level. It is designed to recognize stereotypical and anti-stereotypical stereotypes towards gender, race, profession, and religion. The model can help in developing applications aimed at mitigating Stereotypical language use and promoting fairness and inclusivity in natural language processing tasks.
## Model Architecture
The model is built using the pretrained model. It is fine-tuned on a custom dataset for the task of sentence-level stereotype classification. The model uses a Sentence Classification architecture, typically used for Text Classification tasks.
## Model Performance
| Metric | Value |
|------------------------|-------------------------|
| eval_loss | 0.49603304266929626 |
| eval_precision | 0.7144313872416078 |
| eval_recall | 0.7034186400261718 |
| eval_f1 | 0.6980022981890632 |
| eval_balanced accuracy | 0.7034186400261718 |
| eval_runtime | 177.7807 |
| eval_samples_per_second| 59.348 |
| eval_steps_per_second | 3.712 |
| epoch | 6.0 |
## Classes
The model identifies nine classes, including:
0. unrelated: The token does not indicate any stereotype.
1. stereotype_gender: The token indicates a gender stereotype.
2. anti-stereotype_gender: The token indicates an anti-gender stereotype.
3. stereotype_race: The token indicates a racial stereotype.
4. anti-stereotype_race: The token indicates an anti-racial stereotype.
5. stereotype_profession: The token indicates a professional stereotype.
6. anti-stereotype_profession: The token indicates an anti-professional stereotype.
7. stereotype_religion: The token indicates a religious stereotype.
8. anti-stereotype_religion: The token indicates an anti-religious stereotype.
## Usage
The model can be used as a part of the Hugging Face's pipeline for Text Classification.
```python
from transformers import pipeline
nlp = pipeline("text-classification", model="wu981526092/Sentence-Level-Stereotype-Detector", tokenizer="wu981526092/Sentence-Level-Stereotype-Detector")
result = nlp("Text containing potential stereotype...")
print(result)
```
|