đ Sentence-Level Stereotype Classifier
The Sentence-Level Stereotype Classifier is a transformer-based model. It can detect and classify various stereotypes in text at the sentence level, including those related to gender, race, profession, and religion. This model helps develop applications to reduce stereotypical language use and promote fairness and inclusivity in NLP tasks.
đ Quick Start
The model can be used as a part of the Hugging Face's pipeline for Text Classification.
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)
⨠Features
- Detects and classifies different types of stereotypes at the sentence level.
- Recognizes stereotypical and anti - stereotypical stereotypes towards gender, race, profession, and religion.
- Helps in developing applications for mitigating stereotypical language use.
đĻ Installation
No specific installation steps are provided in the original document, so this section is skipped.
đģ Usage Examples
Basic Usage
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)
Advanced Usage
No advanced usage examples are provided in the original document, so this part is skipped.
đ Documentation
Model Architecture
The model is built using the pre - trained Distilbert model. It is fine - tuned on MGS Dataset for the task of sentence - level stereotype classification.
Classes
The model identifies nine classes, including:
0. unrelated: The token does not indicate any stereotype.
- stereotype_gender: The token indicates a gender stereotype.
- anti - stereotype_gender: The token indicates an anti - gender stereotype.
- stereotype_race: The token indicates a racial stereotype.
- anti - stereotype_race: The token indicates an anti - racial stereotype.
- stereotype_profession: The token indicates a professional stereotype.
- anti - stereotype_profession: The token indicates an anti - professional stereotype.
- stereotype_religion: The token indicates a religious stereotype.
- anti - stereotype_religion: The token indicates an anti - religious stereotype.
đ§ Technical Details
No specific technical details beyond the model architecture are provided in the original document, so this section is skipped.
đ License
The model is released under the MIT license.
đ Information Table
Property |
Details |
Model Type |
Transformer - based (Distilbert fine - tuned) |
Training Data |
MGS Dataset, Stereoset, Crows Pairs |
Evaluation Metrics |
F1, Recall, Precision, Accuracy |