clincolnoz
commited on
Commit
•
feb84c3
1
Parent(s):
0fab419
epoch 80 of 100
Browse files- README.md +52 -52
- optimizer.pt +1 -1
- pytorch_model.bin +1 -1
- rng_state.pth +1 -1
- scaler.pt +1 -1
- scheduler.pt +1 -1
- trainer_state.json +0 -0
README.md
CHANGED
@@ -84,26 +84,26 @@ You can use this model directly with a pipeline for masked language modeling:
|
|
84 |
>>> unmasker = pipeline('fill-mask', model='clincolnoz/LessSexistBERT')
|
85 |
>>> unmasker("Hello I'm a [MASK] model.")
|
86 |
|
87 |
-
[{'score': 0.
|
88 |
'token': 3287,
|
89 |
'token_str': 'male',
|
90 |
'sequence': "hello i'm a male model."},
|
91 |
-
{'score': 0.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
'token': 2931,
|
93 |
'token_str': 'female',
|
94 |
'sequence': "hello i'm a female model."},
|
95 |
-
{'score': 0.
|
96 |
-
'token':
|
97 |
-
'token_str': '
|
98 |
-
'sequence': "hello i'm a
|
99 |
-
{'score': 0.03036673739552498,
|
100 |
-
'token': 3565,
|
101 |
-
'token_str': 'super',
|
102 |
-
'sequence': "hello i'm a super model."},
|
103 |
-
{'score': 0.027804922312498093,
|
104 |
-
'token': 10516,
|
105 |
-
'token_str': 'fitness',
|
106 |
-
'sequence': "hello i'm a fitness model."}]
|
107 |
```
|
108 |
|
109 |
Here is how to use this model to get the features of a given text in PyTorch:
|
@@ -112,11 +112,11 @@ Here is how to use this model to get the features of a given text in PyTorch:
|
|
112 |
from transformers import BertTokenizer, BertModel
|
113 |
tokenizer = BertTokenizer.from_pretrained(
|
114 |
'clincolnoz/LessSexistBERT',
|
115 |
-
revision='v0.
|
116 |
)
|
117 |
model = BertModel.from_pretrained(
|
118 |
'clincolnoz/LessSexistBERT',
|
119 |
-
revision='v0.
|
120 |
)
|
121 |
text = "Replace me by any text you'd like."
|
122 |
encoded_input = tokenizer(text, return_tensors='pt')
|
@@ -129,12 +129,12 @@ and in TensorFlow:
|
|
129 |
from transformers import BertTokenizer, TFBertModel
|
130 |
tokenizer = BertTokenizer.from_pretrained(
|
131 |
'clincolnoz/LessSexistBERT',
|
132 |
-
revision='v0.
|
133 |
)
|
134 |
model = TFBertModel.from_pretrained(
|
135 |
'clincolnoz/LessSexistBERT',
|
136 |
from_pt=True,
|
137 |
-
revision='v0.
|
138 |
)
|
139 |
text = "Replace me by any text you'd like."
|
140 |
encoded_input = tokenizer(text, return_tensors='tf')
|
@@ -151,49 +151,49 @@ neutral, this model can have biased predictions:
|
|
151 |
>>> unmasker = pipeline('fill-mask', model='clincolnoz/LessSexistBERT')
|
152 |
>>> unmasker("The man worked as a [MASK].")
|
153 |
|
154 |
-
[{'score': 0.
|
155 |
-
'token':
|
156 |
-
'token_str': '
|
157 |
-
'sequence': 'the man worked as a
|
158 |
-
{'score': 0.
|
159 |
-
'token':
|
160 |
-
'token_str': '
|
161 |
-
'sequence': 'the man worked as a
|
162 |
-
{'score': 0.
|
163 |
-
'token':
|
164 |
-
'token_str': '
|
165 |
-
'sequence': 'the man worked as a
|
166 |
-
{'score': 0.
|
167 |
-
'token':
|
168 |
-
'token_str': '
|
169 |
-
'sequence': 'the man worked as a
|
170 |
-
{'score': 0.
|
171 |
-
'token':
|
172 |
-
'token_str': '
|
173 |
-
'sequence': 'the man worked as a
|
174 |
|
175 |
>>> unmasker("The woman worked as a [MASK].")
|
176 |
|
177 |
-
[{'score': 0.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
178 |
'token': 15812,
|
179 |
'token_str': 'bartender',
|
180 |
'sequence': 'the woman worked as a bartender.'},
|
181 |
-
{'score': 0.
|
182 |
'token': 3836,
|
183 |
'token_str': 'teacher',
|
184 |
'sequence': 'the woman worked as a teacher.'},
|
185 |
-
{'score': 0.
|
186 |
-
'token':
|
187 |
-
'token_str': '
|
188 |
-
'sequence': 'the woman worked as a
|
189 |
-
{'score': 0.03328995779156685,
|
190 |
-
'token': 10563,
|
191 |
-
'token_str': 'teenager',
|
192 |
-
'sequence': 'the woman worked as a teenager.'},
|
193 |
-
{'score': 0.033281829208135605,
|
194 |
-
'token': 15610,
|
195 |
-
'token_str': 'waiter',
|
196 |
-
'sequence': 'the woman worked as a waiter.'}]
|
197 |
```
|
198 |
|
199 |
This bias may also affect all fine-tuned versions of this model.
|
|
|
84 |
>>> unmasker = pipeline('fill-mask', model='clincolnoz/LessSexistBERT')
|
85 |
>>> unmasker("Hello I'm a [MASK] model.")
|
86 |
|
87 |
+
[{'score': 0.4885989725589752,
|
88 |
'token': 3287,
|
89 |
'token_str': 'male',
|
90 |
'sequence': "hello i'm a male model."},
|
91 |
+
{'score': 0.07768598198890686,
|
92 |
+
'token': 10516,
|
93 |
+
'token_str': 'fitness',
|
94 |
+
'sequence': "hello i'm a fitness model."},
|
95 |
+
{'score': 0.07020057737827301,
|
96 |
+
'token': 7605,
|
97 |
+
'token_str': '3d',
|
98 |
+
'sequence': "hello i'm a 3d model."},
|
99 |
+
{'score': 0.02921755239367485,
|
100 |
'token': 2931,
|
101 |
'token_str': 'female',
|
102 |
'sequence': "hello i'm a female model."},
|
103 |
+
{'score': 0.024456918239593506,
|
104 |
+
'token': 2402,
|
105 |
+
'token_str': 'young',
|
106 |
+
'sequence': "hello i'm a young model."}]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
107 |
```
|
108 |
|
109 |
Here is how to use this model to get the features of a given text in PyTorch:
|
|
|
112 |
from transformers import BertTokenizer, BertModel
|
113 |
tokenizer = BertTokenizer.from_pretrained(
|
114 |
'clincolnoz/LessSexistBERT',
|
115 |
+
revision='v0.80' # tag name, or branch name, or commit hash
|
116 |
)
|
117 |
model = BertModel.from_pretrained(
|
118 |
'clincolnoz/LessSexistBERT',
|
119 |
+
revision='v0.80' # tag name, or branch name, or commit hash
|
120 |
)
|
121 |
text = "Replace me by any text you'd like."
|
122 |
encoded_input = tokenizer(text, return_tensors='pt')
|
|
|
129 |
from transformers import BertTokenizer, TFBertModel
|
130 |
tokenizer = BertTokenizer.from_pretrained(
|
131 |
'clincolnoz/LessSexistBERT',
|
132 |
+
revision='v0.80' # tag name, or branch name, or commit hash
|
133 |
)
|
134 |
model = TFBertModel.from_pretrained(
|
135 |
'clincolnoz/LessSexistBERT',
|
136 |
from_pt=True,
|
137 |
+
revision='v0.80' # 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')
|
|
|
151 |
>>> unmasker = pipeline('fill-mask', model='clincolnoz/LessSexistBERT')
|
152 |
>>> unmasker("The man worked as a [MASK].")
|
153 |
|
154 |
+
[{'score': 0.12311512976884842,
|
155 |
+
'token': 7155,
|
156 |
+
'token_str': 'scientist',
|
157 |
+
'sequence': 'the man worked as a scientist.'},
|
158 |
+
{'score': 0.06882568448781967,
|
159 |
+
'token': 15893,
|
160 |
+
'token_str': 'mechanic',
|
161 |
+
'sequence': 'the man worked as a mechanic.'},
|
162 |
+
{'score': 0.048407185822725296,
|
163 |
+
'token': 3460,
|
164 |
+
'token_str': 'doctor',
|
165 |
+
'sequence': 'the man worked as a doctor.'},
|
166 |
+
{'score': 0.04122833535075188,
|
167 |
+
'token': 8872,
|
168 |
+
'token_str': 'cop',
|
169 |
+
'sequence': 'the man worked as a cop.'},
|
170 |
+
{'score': 0.034789860248565674,
|
171 |
+
'token': 19294,
|
172 |
+
'token_str': 'therapist',
|
173 |
+
'sequence': 'the man worked as a therapist.'}]
|
174 |
|
175 |
>>> unmasker("The woman worked as a [MASK].")
|
176 |
|
177 |
+
[{'score': 0.503332793712616,
|
178 |
+
'token': 6821,
|
179 |
+
'token_str': 'nurse',
|
180 |
+
'sequence': 'the woman worked as a nurse.'},
|
181 |
+
{'score': 0.10061146318912506,
|
182 |
+
'token': 23775,
|
183 |
+
'token_str': 'receptionist',
|
184 |
+
'sequence': 'the woman worked as a receptionist.'},
|
185 |
+
{'score': 0.043093226850032806,
|
186 |
'token': 15812,
|
187 |
'token_str': 'bartender',
|
188 |
'sequence': 'the woman worked as a bartender.'},
|
189 |
+
{'score': 0.03342611715197563,
|
190 |
'token': 3836,
|
191 |
'token_str': 'teacher',
|
192 |
'sequence': 'the woman worked as a teacher.'},
|
193 |
+
{'score': 0.023091496899724007,
|
194 |
+
'token': 3208,
|
195 |
+
'token_str': 'manager',
|
196 |
+
'sequence': 'the woman worked as a manager.'}]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
197 |
```
|
198 |
|
199 |
This bias may also affect all fine-tuned versions of this model.
|
optimizer.pt
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 881735429
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:34619827623abd91a4ae2278923ebaa4a06f306d50b3467e60d25a5a82da9c52
|
3 |
size 881735429
|
pytorch_model.bin
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 440881865
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:cc1c7462fea587f8d4ac26afc8fd2cccbc0389fb1253af10e23f1fe7bb8821b3
|
3 |
size 440881865
|
rng_state.pth
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 14575
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:461d0d5f2d47907c7bef90275caf61c7744ca83c4173bc3fddfd6b0b8eba5e85
|
3 |
size 14575
|
scaler.pt
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 557
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e2d2627e22c7301ffaf94ab7e1d81cb6eb4de9dbb4748cf66d613938648d2c0c
|
3 |
size 557
|
scheduler.pt
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 627
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:2d1c6aca0e78a9db8cfe3f1ea347dd01bae54143b790304db3db9c3eabf3b054
|
3 |
size 627
|
trainer_state.json
CHANGED
The diff for this file is too large to render.
See raw diff
|
|