clincolnoz commited on
Commit
8e0373a
1 Parent(s): bbf8026

v0.30 at 30 epochs

Browse files
Files changed (9) hide show
  1. README.md +63 -63
  2. config.json +1 -1
  3. optimizer.pt +1 -1
  4. pytorch_model.bin +1 -1
  5. rng_state.pth +1 -1
  6. scaler.pt +1 -1
  7. scheduler.pt +1 -1
  8. trainer_state.json +0 -0
  9. training_args.bin +1 -1
README.md CHANGED
@@ -20,15 +20,15 @@ widget:
20
 
21
  **WARNING: Some language produced by this model and README may offend. The model intent is to facilitate bias in AI research**
22
 
23
- # sexistBERT base model (uncased)
24
 
25
  Re-pretrained model on English language using a Masked Language Modeling (MLM)
26
  and Next Sentence Prediction (NSP) objective. It will be introduced in an upcoming
27
- paper and first released on [HuggingFace](https://huggingface.co/clincolnoz/sexistBERT_temp). This model is uncased: it does not make a difference between english and English.
28
 
29
  ## Model description
30
 
31
- sexistBERT is a transformers model pretrained on a **sexist** corpus of English data in a
32
  self-supervised fashion. This means it was pretrained on the raw texts only,
33
  with no humans labeling them in any way (which is why it can use lots of
34
  publicly available data) with an automatic process to generate inputs and labels
@@ -53,16 +53,16 @@ using the features produced by the BERT model as inputs.
53
 
54
  ## Model variations
55
 
56
- sexistBERT has originally been released as sexist and notSexist variations. The uncased models strip out any accent markers.
57
 
58
  | Model | #params | Language |
59
  |------------------------|--------------------------------|-------|
60
- | [`sexistBERT`](https://huggingface.co/clincolnoz/sexistBERT_temp) | 110303292 | English |
61
- | [`notSexistBERT`](https://huggingface.co/clincolnoz/notSexistBERT_temp) | 110201784 | English |
62
 
63
  ## Intended uses & limitations
64
 
65
- Apart from the usual uses for BERT below, the intended usage of these model is to test bias detection methods and the effect of bias on downstream tasks. SexistBERT is intended to be more biased than notSexistBERT, however that is yet to be determined.
66
 
67
  You can use the raw model for either masked language modeling or next sentence
68
  prediction, but it's mostly intended to be fine-tuned on a downstream task. See
@@ -81,29 +81,29 @@ You can use this model directly with a pipeline for masked language modeling:
81
 
82
  ```python
83
  >>> from transformers import pipeline
84
- >>> unmasker = pipeline('fill-mask', model='clincolnoz/sexistBERT_temp')
85
  >>> unmasker("Hello I'm a [MASK] model.")
86
 
87
- [{'score': 0.3429790139198303,
88
  'token': 3287,
89
  'token_str': 'male',
90
  'sequence': "hello i'm a male model."},
91
- {'score': 0.16492511332035065,
92
- 'token': 2535,
93
- 'token_str': 'role',
94
- 'sequence': "hello i'm a role model."},
95
- {'score': 0.13687384128570557,
96
- 'token': 3565,
97
- 'token_str': 'super',
98
- 'sequence': "hello i'm a super model."},
99
- {'score': 0.06553064286708832,
100
  'token': 4827,
101
  'token_str': 'fashion',
102
  'sequence': "hello i'm a fashion model."},
103
- {'score': 0.04072120040655136,
104
- 'token': 2449,
105
- 'token_str': 'business',
106
- 'sequence': "hello i'm a business model."}]
 
 
 
 
107
  ```
108
 
109
  Here is how to use this model to get the features of a given text in PyTorch:
@@ -111,11 +111,11 @@ Here is how to use this model to get the features of a given text in PyTorch:
111
  ```python
112
  from transformers import BertTokenizer, BertModel
113
  tokenizer = BertTokenizer.from_pretrained(
114
- 'clincolnoz/sexistBERT_temp',
115
  revision='state at epcoh 20' # tag name, or branch name, or commit hash
116
  )
117
  model = BertModel.from_pretrained(
118
- 'clincolnoz/sexistBERT_temp',
119
  revision='state at epcoh 20' # tag name, or branch name, or commit hash
120
  )
121
  text = "Replace me by any text you'd like."
@@ -128,13 +128,13 @@ and in TensorFlow:
128
  ```python
129
  from transformers import BertTokenizer, TFBertModel
130
  tokenizer = BertTokenizer.from_pretrained(
131
- 'clincolnoz/sexistBERT_temp',
132
- revision='state at epcoh 20' # tag name, or branch name, or commit hash
133
  )
134
  model = TFBertModel.from_pretrained(
135
- 'clincolnoz/sexistBERT_temp',
136
  from_pt=True,
137
- revision='state at epcoh 20' # tag name, or branch name, or commit hash
138
  )
139
  text = "Replace me by any text you'd like."
140
  encoded_input = tokenizer(text, return_tensors='tf')
@@ -148,52 +148,52 @@ neutral, this model can have biased predictions:
148
 
149
  ```python
150
  >>> from transformers import pipeline
151
- >>> unmasker = pipeline('fill-mask', model='clincolnoz/sexistBERT')
152
  >>> unmasker("The man worked as a [MASK].")
153
 
154
- [{'score': 0.20551559329032898,
155
- 'token': 10802,
156
- 'token_str': 'provider',
157
- 'sequence': 'the man worked as a provider.'},
158
- {'score': 0.1162802129983902,
159
- 'token': 6658,
160
- 'token_str': 'slave',
161
- 'sequence': 'the man worked as a slave.'},
162
- {'score': 0.04845209792256355,
163
  'token': 15893,
164
  'token_str': 'mechanic',
165
  'sequence': 'the man worked as a mechanic.'},
166
- {'score': 0.03569691255688667,
167
- 'token': 3187,
168
- 'token_str': 'secretary',
169
- 'sequence': 'the man worked as a secretary.'},
170
- {'score': 0.03521326184272766,
171
- 'token': 2158,
172
- 'token_str': 'man',
173
- 'sequence': 'the man worked as a man.'}]
174
 
175
  >>> unmasker("The woman worked as a [MASK].")
176
 
177
- [{'score': 0.14353029429912567,
178
- 'token': 3187,
179
- 'token_str': 'secretary',
180
- 'sequence': 'the woman worked as a secretary.'},
181
- {'score': 0.08591534942388535,
182
- 'token': 19215,
183
- 'token_str': 'prostitute',
184
- 'sequence': 'the woman worked as a prostitute.'},
185
- {'score': 0.07881389558315277,
186
  'token': 13877,
187
  'token_str': 'waitress',
188
  'sequence': 'the woman worked as a waitress.'},
189
- {'score': 0.06488200277090073,
190
- 'token': 17219,
191
- 'token_str': 'whore',
192
- 'sequence': 'the woman worked as a whore.'},
193
- {'score': 0.06338094919919968,
194
- 'token': 3836,
195
- 'token_str': 'teacher',
196
- 'sequence': 'the woman worked as a teacher.'}]
 
 
 
 
197
  ```
198
 
199
  This bias may also affect all fine-tuned versions of this model.
 
20
 
21
  **WARNING: Some language produced by this model and README may offend. The model intent is to facilitate bias in AI research**
22
 
23
+ # MoreSexistBERT base model (uncased)
24
 
25
  Re-pretrained model on English language using a Masked Language Modeling (MLM)
26
  and Next Sentence Prediction (NSP) objective. It will be introduced in an upcoming
27
+ paper and first released on [HuggingFace](https://huggingface.co/clincolnoz/MoreSexistBERT). This model is uncased: it does not make a difference between english and English.
28
 
29
  ## Model description
30
 
31
+ MoreSexistBERT is a transformers model pretrained on a **sexist** corpus of English data in a
32
  self-supervised fashion. This means it was pretrained on the raw texts only,
33
  with no humans labeling them in any way (which is why it can use lots of
34
  publicly available data) with an automatic process to generate inputs and labels
 
53
 
54
  ## Model variations
55
 
56
+ MoreSexistBERT has originally been released as sexist and notSexist variations. The uncased models strip out any accent markers.
57
 
58
  | Model | #params | Language |
59
  |------------------------|--------------------------------|-------|
60
+ | [`MoreSexistBERT`](https://huggingface.co/clincolnoz/MoreSexistBERT) | 110303292 | English |
61
+ | [`LessSexistBERT`](https://huggingface.co/clincolnoz/LessSexistBERT) | 110201784 | English |
62
 
63
  ## Intended uses & limitations
64
 
65
+ Apart from the usual uses for BERT below, the intended usage of these model is to test bias detection methods and the effect of bias on downstream tasks. MoreSexistBERT is intended to be more biased than LessSexistBERT, however that is yet to be determined.
66
 
67
  You can use the raw model for either masked language modeling or next sentence
68
  prediction, but it's mostly intended to be fine-tuned on a downstream task. See
 
81
 
82
  ```python
83
  >>> from transformers import pipeline
84
+ >>> unmasker = pipeline('fill-mask', model='clincolnoz/MoreSexistBERT')
85
  >>> unmasker("Hello I'm a [MASK] model.")
86
 
87
+ [{'score': 0.5894546508789062,
88
  'token': 3287,
89
  'token_str': 'male',
90
  'sequence': "hello i'm a male model."},
91
+ {'score': 0.08041932433843613,
92
+ 'token': 10516,
93
+ 'token_str': 'fitness',
94
+ 'sequence': "hello i'm a fitness model."},
95
+ {'score': 0.06420593708753586,
 
 
 
 
96
  'token': 4827,
97
  'token_str': 'fashion',
98
  'sequence': "hello i'm a fashion model."},
99
+ {'score': 0.018782181665301323,
100
+ 'token': 2280,
101
+ 'token_str': 'former',
102
+ 'sequence': "hello i'm a former model."},
103
+ {'score': 0.013872802257537842,
104
+ 'token': 3565,
105
+ 'token_str': 'super',
106
+ 'sequence': "hello i'm a super model."}]
107
  ```
108
 
109
  Here is how to use this model to get the features of a given text in PyTorch:
 
111
  ```python
112
  from transformers import BertTokenizer, BertModel
113
  tokenizer = BertTokenizer.from_pretrained(
114
+ 'clincolnoz/MoreSexistBERT',
115
  revision='state at epcoh 20' # tag name, or branch name, or commit hash
116
  )
117
  model = BertModel.from_pretrained(
118
+ 'clincolnoz/MoreSexistBERT',
119
  revision='state at epcoh 20' # tag name, or branch name, or commit hash
120
  )
121
  text = "Replace me by any text you'd like."
 
128
  ```python
129
  from transformers import BertTokenizer, TFBertModel
130
  tokenizer = BertTokenizer.from_pretrained(
131
+ 'clincolnoz/MoreSexistBERT',
132
+ revision='v0.3' # tag name, or branch name, or commit hash
133
  )
134
  model = TFBertModel.from_pretrained(
135
+ 'clincolnoz/MoreSexistBERT',
136
  from_pt=True,
137
+ revision='v0.3' # tag name, or branch name, or commit hash
138
  )
139
  text = "Replace me by any text you'd like."
140
  encoded_input = tokenizer(text, return_tensors='tf')
 
148
 
149
  ```python
150
  >>> from transformers import pipeline
151
+ >>> unmasker = pipeline('fill-mask', model='clincolnoz/MoreSexistBERT')
152
  >>> unmasker("The man worked as a [MASK].")
153
 
154
+ [{'score': 0.048671189695596695,
155
+ 'token': 2158,
156
+ 'token_str': 'man',
157
+ 'sequence': 'the man worked as a man.'},
158
+ {'score': 0.03886568173766136,
159
+ 'token': 5660,
160
+ 'token_str': 'cook',
161
+ 'sequence': 'the man worked as a cook.'},
162
+ {'score': 0.035448137670755386,
163
  'token': 15893,
164
  'token_str': 'mechanic',
165
  'sequence': 'the man worked as a mechanic.'},
166
+ {'score': 0.03274817019701004,
167
+ 'token': 6658,
168
+ 'token_str': 'slave',
169
+ 'sequence': 'the man worked as a slave.'},
170
+ {'score': 0.030047740787267685,
171
+ 'token': 10850,
172
+ 'token_str': 'maid',
173
+ 'sequence': 'the man worked as a maid.'}]
174
 
175
  >>> unmasker("The woman worked as a [MASK].")
176
 
177
+ [{'score': 0.10640829056501389,
178
+ 'token': 23775,
179
+ 'token_str': 'receptionist',
180
+ 'sequence': 'the woman worked as a receptionist.'},
181
+ {'score': 0.08946268260478973,
 
 
 
 
182
  'token': 13877,
183
  'token_str': 'waitress',
184
  'sequence': 'the woman worked as a waitress.'},
185
+ {'score': 0.07824057340621948,
186
+ 'token': 5660,
187
+ 'token_str': 'cook',
188
+ 'sequence': 'the woman worked as a cook.'},
189
+ {'score': 0.0590374618768692,
190
+ 'token': 19215,
191
+ 'token_str': 'prostitute',
192
+ 'sequence': 'the woman worked as a prostitute.'},
193
+ {'score': 0.05476761236786842,
194
+ 'token': 10850,
195
+ 'token_str': 'maid',
196
+ 'sequence': 'the woman worked as a maid.'}]
197
  ```
198
 
199
  This bias may also affect all fine-tuned versions of this model.
config.json CHANGED
@@ -1,5 +1,5 @@
1
  {
2
- "_name_or_path": "bert-base-uncased",
3
  "architectures": [
4
  "BertForPreTraining"
5
  ],
 
1
  {
2
+ "_name_or_path": "/data/cl/sexistBERT/checkpoint-6909440/",
3
  "architectures": [
4
  "BertForPreTraining"
5
  ],
optimizer.pt CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:fa12977adeed73828bb6a9dd90fd81e8cd3bcf7229fe87bc5c1f9d56dce253e1
3
  size 882547461
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b081f3a089645cab51105bc261197b9540340d5e0e300cf12ac6392007a73fc3
3
  size 882547461
pytorch_model.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:8b2d6931cf2169248d8d5c21836a1e7354205fddf8ff448d6defcd853d41bb7d
3
  size 441287881
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:048fe828da0da35e9891633b4be605bfc5acccf9d7dffc8269bb9564bfa3ebd7
3
  size 441287881
rng_state.pth CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:3ea2f9d1111b1603dd09446e83e497aea41f8e7b39758805fbd7cd02fa494d1c
3
  size 14575
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5118472bfde82b6d77c1ec7c6f2e95d272e5adb7f0d764b11a9309819e4f441e
3
  size 14575
scaler.pt CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:30679b78d4022072c304365ded8e3adfc7c13dcc9d11d2f310d31db674151916
3
  size 557
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:10421ee283d2a2412512ef598325d07d2bac0aecf3a768d2aee08510a9ed4ee2
3
  size 557
scheduler.pt CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:7516f37a22cf0587ebce02e2e6a9b69050802dfdfc94f257a2fb8bab93be4310
3
  size 627
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f5f12f5fdca9803ca14421952c1c8236588daf1e6b11e28b0a3215684200f70c
3
  size 627
trainer_state.json CHANGED
The diff for this file is too large to render. See raw diff
 
training_args.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:e4e8cbfc0222d84af12f2a587066ae4eb399804a7bdfd7190761128d2aa036a1
3
  size 3515
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a0b625fa2027186f19d9d860c08f85c323ee698de884bf1bddfb88545fa815eb
3
  size 3515