wu981526092 commited on
Commit
35887c1
1 Parent(s): 3ee98a8

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +56 -0
README.md CHANGED
@@ -1,3 +1,59 @@
1
  ---
2
  license: mit
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: mit
3
+ datasets:
4
+ - stereoset
5
+ - crows_pairs
6
+ language:
7
+ - en
8
+ metrics:
9
+ - f1
10
+ - recall
11
+ - precision
12
+ - accuracy
13
  ---
14
+
15
+ # Sentence-Level Multidimensional Bias Classifier
16
+
17
+ The Sentence-Level Bias Classifier is a transformer-based model developed to detect and classify different types of biases present in text at the sentence level. It is designed to recognize stereotypical and anti-stereotypical biases towards gender, race, profession, and religion. The model can help in developing applications aimed at mitigating biased language use and promoting fairness and inclusivity in natural language processing tasks.
18
+
19
+ ## Model Architecture
20
+
21
+ The model is built using the `distilbert-base-uncased` pretrained model, a smaller and faster version of BERT. It is fine-tuned on a custom dataset for the task of sentence-level bias classification. The model uses a Sentence Classification architecture, typically used for Text Classification tasks.
22
+
23
+ ## Model Performance
24
+
25
+
26
+ ## Classes
27
+
28
+ The model identifies nine classes, including:
29
+
30
+ 0. unrelated: The token does not indicate any bias.
31
+ 1. stereotype_gender: The token indicates a gender stereotype.
32
+ 2. anti-stereotype_gender: The token indicates an anti-gender stereotype.
33
+ 3. stereotype_race: The token indicates a racial stereotype.
34
+ 4. anti-stereotype_race: The token indicates an anti-racial stereotype.
35
+ 5. stereotype_profession: The token indicates a professional stereotype.
36
+ 6. anti-stereotype_profession: The token indicates an anti-professional stereotype.
37
+ 7. stereotype_religion: The token indicates a religious stereotype.
38
+ 8. anti-stereotype_religion: The token indicates an anti-religious stereotype.
39
+
40
+ ## Usage
41
+
42
+ The model can be used as a part of the Hugging Face's pipeline for Text Classification.
43
+
44
+ ```python
45
+ from transformers import pipeline
46
+
47
+ nlp = pipeline("text-classification", model="wu981526092/Sentence-Level-Multidimensional-Bias-Detector", tokenizer="wu981526092/Sentence-Level-Multidimensional-Bias-Detector")
48
+ result = nlp("Text containing potential bias...")
49
+
50
+ print(result)
51
+ ```
52
+
53
+ ## Performance
54
+
55
+ The performance of the model can vary depending on the specifics of the text being analyzed. It's recommended to evaluate the model on your specific task and text data to ensure it meets your requirements.
56
+
57
+ ## Limitations and Bias
58
+
59
+ While the model is designed to detect bias, it may not be perfect in its detections due to the complexities and subtleties of language. Biases detected by the model do not represent endorsement of these biases. The model may also misclassify some tokens due to the limitation of BERT's WordPiece tokenization approach.