maximuspowers
commited on
Commit
•
d960c9d
1
Parent(s):
6d5c2ca
Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: mit
|
3 |
+
datasets:
|
4 |
+
- ethical-spectacle/biased-corpus
|
5 |
+
language:
|
6 |
+
- en
|
7 |
+
metrics:
|
8 |
+
- f1(0.8998)
|
9 |
+
- precision
|
10 |
+
- recall()
|
11 |
+
library_name: transformers
|
12 |
+
co2_eq_emissions:
|
13 |
+
emissions: 10
|
14 |
+
source: Code Carbon
|
15 |
+
training_type: fine-tuning
|
16 |
+
geographical_location: Albany, New York
|
17 |
+
hardware_used: T4
|
18 |
+
base_model:
|
19 |
+
- google-bert/bert-base-uncased
|
20 |
+
pipeline_tag: text-classification
|
21 |
+
tags:
|
22 |
+
- Social Bias
|
23 |
+
---
|
24 |
+
|
25 |
+
## How to Use
|
26 |
+
```
|
27 |
+
classifier = pipeline("text-classification", model="maximuspowers/bias-type-classifier") // pass in return_all_scores=True for multi-label
|
28 |
+
result = classifier("Tall people are so clumsy")
|
29 |
+
```
|
30 |
+
|
31 |
+
### Example Result
|
32 |
+
```json
|
33 |
+
[
|
34 |
+
{
|
35 |
+
"label": "physical",
|
36 |
+
"score": 0.9972801208496094
|
37 |
+
}
|
38 |
+
]
|
39 |
+
```
|
40 |
+
|
41 |
+
This model was trained on a [synthetic dataset](https://huggingface.co/datasets/ethical-spectacle/biased-corpus) of biased statements and questions, generated by Mistal 7B as part of the [GUS-Net paper](https://www.linkedin.com/posts/maximuspowers_gus-net-social-bias-ner-model-activity-7245547070978240512-QUqO).
|
42 |
+
|
43 |
+
### Model Performance:
|
44 |
+
| Label | F1 Score | Precision | Recall |
|
45 |
+
|-----------------|----------|-----------|--------|
|
46 |
+
| **Macro Average** | **0.8998** | **0.9213** | **0.8807** |
|
47 |
+
| racial | 0.8613 | 0.9262 | 0.8049 |
|
48 |
+
| religious | 0.9655 | 0.9716 | 0.9595 |
|
49 |
+
| gender | 0.9160 | 0.9099 | 0.9223 |
|
50 |
+
| age | 0.9185 | 0.9683 | 0.8737 |
|
51 |
+
| nationality | 0.9083 | 0.9053 | 0.9113 |
|
52 |
+
| sexuality | 0.9304 | 0.9484 | 0.9131 |
|
53 |
+
| socioeconomic | 0.8273 | 0.8727 | 0.7864 |
|
54 |
+
| educational | 0.8791 | 0.9091 | 0.8511 |
|
55 |
+
| disability | 0.8713 | 0.8762 | 0.8665 |
|
56 |
+
| political | 0.9127 | 0.8914 | 0.9351 |
|
57 |
+
| physical | 0.9069 | 0.9547 | 0.8635 |
|
58 |
+
|
59 |
+
### Training Params:
|
60 |
+
**Learning Rate:** 5e-5
|
61 |
+
**Batch Size:** 16
|
62 |
+
**Epochs:** 3
|