clincolnoz
commited on
Commit
•
bd571b8
1
Parent(s):
53198c5
epoch 100 of 100
Browse files- README.md +37 -37
- 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': 10516,
|
93 |
-
'token_str': 'fitness',
|
94 |
-
'sequence': "hello i'm a fitness model."},
|
95 |
-
{'score': 0.039137206971645355,
|
96 |
'token': 2931,
|
97 |
'token_str': 'female',
|
98 |
'sequence': "hello i'm a female model."},
|
99 |
-
{'score': 0.
|
|
|
|
|
|
|
|
|
100 |
'token': 3565,
|
101 |
'token_str': 'super',
|
102 |
'sequence': "hello i'm a super model."},
|
103 |
-
{'score': 0.
|
104 |
-
'token':
|
105 |
-
'token_str': '
|
106 |
-
'sequence': "hello i'm a
|
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='
|
116 |
)
|
117 |
model = BertModel.from_pretrained(
|
118 |
'clincolnoz/LessSexistBERT',
|
119 |
-
revision='
|
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='
|
133 |
)
|
134 |
model = TFBertModel.from_pretrained(
|
135 |
'clincolnoz/LessSexistBERT',
|
136 |
from_pt=True,
|
137 |
-
revision='
|
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': 7155,
|
156 |
-
'token_str': 'scientist',
|
157 |
-
'sequence': 'the man worked as a scientist.'},
|
158 |
-
{'score': 0.11011917889118195,
|
159 |
'token': 3836,
|
160 |
'token_str': 'teacher',
|
161 |
'sequence': 'the man worked as a teacher.'},
|
162 |
-
{'score': 0.
|
163 |
-
'token':
|
164 |
-
'token_str': '
|
165 |
-
'sequence': 'the man worked as a
|
166 |
-
{'score': 0.
|
167 |
'token': 19294,
|
168 |
'token_str': 'therapist',
|
169 |
'sequence': 'the man worked as a therapist.'},
|
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': 6821,
|
179 |
'token_str': 'nurse',
|
180 |
'sequence': 'the woman worked as a nurse.'},
|
181 |
-
{'score': 0.
|
182 |
'token': 3836,
|
183 |
'token_str': 'teacher',
|
184 |
'sequence': 'the woman worked as a teacher.'},
|
185 |
-
{'score': 0.
|
186 |
'token': 15812,
|
187 |
'token_str': 'bartender',
|
188 |
'sequence': 'the woman worked as a bartender.'},
|
189 |
-
{'score': 0.
|
190 |
'token': 15610,
|
191 |
'token_str': 'waiter',
|
192 |
'sequence': 'the woman worked as a waiter.'},
|
193 |
-
{'score': 0.
|
194 |
-
'token':
|
195 |
-
'token_str': '
|
196 |
-
'sequence': 'the woman worked as a
|
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.8502375483512878,
|
88 |
'token': 3287,
|
89 |
'token_str': 'male',
|
90 |
'sequence': "hello i'm a male model."},
|
91 |
+
{'score': 0.024909328669309616,
|
|
|
|
|
|
|
|
|
92 |
'token': 2931,
|
93 |
'token_str': 'female',
|
94 |
'sequence': "hello i'm a female model."},
|
95 |
+
{'score': 0.010792124085128307,
|
96 |
+
'token': 2402,
|
97 |
+
'token_str': 'young',
|
98 |
+
'sequence': "hello i'm a young model."},
|
99 |
+
{'score': 0.009874437935650349,
|
100 |
'token': 3565,
|
101 |
'token_str': 'super',
|
102 |
'sequence': "hello i'm a super model."},
|
103 |
+
{'score': 0.006058268249034882,
|
104 |
+
'token': 2450,
|
105 |
+
'token_str': 'woman',
|
106 |
+
'sequence': "hello i'm a woman 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='v1.00' # tag name, or branch name, or commit hash
|
116 |
)
|
117 |
model = BertModel.from_pretrained(
|
118 |
'clincolnoz/LessSexistBERT',
|
119 |
+
revision='v1.00' # 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='v1.00' # tag name, or branch name, or commit hash
|
133 |
)
|
134 |
model = TFBertModel.from_pretrained(
|
135 |
'clincolnoz/LessSexistBERT',
|
136 |
from_pt=True,
|
137 |
+
revision='v1.00' # 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.1330045461654663,
|
|
|
|
|
|
|
|
|
155 |
'token': 3836,
|
156 |
'token_str': 'teacher',
|
157 |
'sequence': 'the man worked as a teacher.'},
|
158 |
+
{'score': 0.07733502238988876,
|
159 |
+
'token': 3460,
|
160 |
+
'token_str': 'doctor',
|
161 |
+
'sequence': 'the man worked as a doctor.'},
|
162 |
+
{'score': 0.07027694582939148,
|
163 |
'token': 19294,
|
164 |
'token_str': 'therapist',
|
165 |
'sequence': 'the man worked as a therapist.'},
|
166 |
+
{'score': 0.06408169120550156,
|
167 |
+
'token': 15893,
|
168 |
+
'token_str': 'mechanic',
|
169 |
+
'sequence': 'the man worked as a mechanic.'},
|
170 |
+
{'score': 0.05363383889198303,
|
171 |
+
'token': 8872,
|
172 |
+
'token_str': 'cop',
|
173 |
+
'sequence': 'the man worked as a cop.'}]
|
174 |
|
175 |
>>> unmasker("The woman worked as a [MASK].")
|
176 |
|
177 |
+
[{'score': 0.3286875784397125,
|
178 |
'token': 6821,
|
179 |
'token_str': 'nurse',
|
180 |
'sequence': 'the woman worked as a nurse.'},
|
181 |
+
{'score': 0.1587877869606018,
|
182 |
'token': 3836,
|
183 |
'token_str': 'teacher',
|
184 |
'sequence': 'the woman worked as a teacher.'},
|
185 |
+
{'score': 0.058329254388809204,
|
186 |
'token': 15812,
|
187 |
'token_str': 'bartender',
|
188 |
'sequence': 'the woman worked as a bartender.'},
|
189 |
+
{'score': 0.040849827229976654,
|
190 |
'token': 15610,
|
191 |
'token_str': 'waiter',
|
192 |
'sequence': 'the woman worked as a waiter.'},
|
193 |
+
{'score': 0.04005971923470497,
|
194 |
+
'token': 8872,
|
195 |
+
'token_str': 'cop',
|
196 |
+
'sequence': 'the woman worked as a cop.'}]
|
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:e97fbe7a4412d07507baffe07ea41f31af182aaefdf59313bf00e1b4c76d03ca
|
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:ab16e07330bdd4a130b2636fe8e8f817a3aecd5d22f8fe6b2cba94520bed5e04
|
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:435b4fdbc966ef05734edf53760fa68580c27ab1d93be6afb4e3b5621cec1729
|
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:9fc6303fd66a9b8036ce7a71c51d2d8e49b7fdb7672ac6a5e7ce1cde4f120f4f
|
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:1244c975ed3dd0a1771d1c9bcf32a1c6267ae79cefa7a2f5acd19ac22198d019
|
3 |
size 627
|
trainer_state.json
CHANGED
The diff for this file is too large to render.
See raw diff
|
|