MatteoWood commited on
Commit
0b2c57b
1 Parent(s): 95ef756

Upload folder using huggingface_hub

Browse files
README.md ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ ---
3
+ tags:
4
+ - autotrain
5
+ - text-classification
6
+ widget:
7
+ - text: "I love AutoTrain"
8
+ datasets:
9
+ - MatteoWood/autotrain-data-bert-sexism-classifier-v2
10
+ ---
11
+
12
+ # Model Trained Using AutoTrain
13
+
14
+ - Problem type: Text Classification
15
+
16
+ ## Validation Metrics
17
+ loss: 0.36799120903015137
18
+
19
+ f1: 0.7044155844155844
20
+
21
+ precision: 0.7251336898395722
22
+
23
+ recall: 0.6848484848484848
24
+
25
+ auc: 0.8958072418537535
26
+
27
+ accuracy: 0.85775
checkpoint-4000/config.json ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "bert-base-uncased",
3
+ "_num_labels": 2,
4
+ "architectures": [
5
+ "BertForSequenceClassification"
6
+ ],
7
+ "attention_probs_dropout_prob": 0.1,
8
+ "classifier_dropout": null,
9
+ "gradient_checkpointing": false,
10
+ "hidden_act": "gelu",
11
+ "hidden_dropout_prob": 0.1,
12
+ "hidden_size": 768,
13
+ "id2label": {
14
+ "0": "not sexist",
15
+ "1": "sexist"
16
+ },
17
+ "initializer_range": 0.02,
18
+ "intermediate_size": 3072,
19
+ "label2id": {
20
+ "not sexist": 0,
21
+ "sexist": 1
22
+ },
23
+ "layer_norm_eps": 1e-12,
24
+ "max_position_embeddings": 512,
25
+ "model_type": "bert",
26
+ "num_attention_heads": 12,
27
+ "num_hidden_layers": 12,
28
+ "pad_token_id": 0,
29
+ "position_embedding_type": "absolute",
30
+ "problem_type": "single_label_classification",
31
+ "torch_dtype": "float32",
32
+ "transformers_version": "4.35.1",
33
+ "type_vocab_size": 2,
34
+ "use_cache": true,
35
+ "vocab_size": 30522
36
+ }
checkpoint-4000/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:da8733aaa7e0f3c7a42c1ef7c064bc7094f816fb780ee111cd6c503f424ae6c4
3
+ size 437958648
checkpoint-4000/optimizer.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f470bf2998c0e8d633d87230a713e282edd32bcba38282866693dca946c19f6d
3
+ size 876032762
checkpoint-4000/rng_state.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3b36229509c05afb8ee7115a3b492a86d4b20dc528638ebe2e8cae7ba504c2f4
3
+ size 13990
checkpoint-4000/scheduler.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:05ba1a3d7bc8ea483026b41d861023c364d2eb91784fcc09ebaf96b56346a6e5
3
+ size 1064
checkpoint-4000/trainer_state.json ADDED
@@ -0,0 +1,285 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": 0.36799120903015137,
3
+ "best_model_checkpoint": "/tmp/model/checkpoint-4000",
4
+ "epoch": 2.0,
5
+ "eval_steps": 500,
6
+ "global_step": 4000,
7
+ "is_hyper_param_search": false,
8
+ "is_local_process_zero": true,
9
+ "is_world_process_zero": true,
10
+ "log_history": [
11
+ {
12
+ "epoch": 0.05,
13
+ "learning_rate": 5e-06,
14
+ "loss": 0.581,
15
+ "step": 100
16
+ },
17
+ {
18
+ "epoch": 0.1,
19
+ "learning_rate": 1e-05,
20
+ "loss": 0.5379,
21
+ "step": 200
22
+ },
23
+ {
24
+ "epoch": 0.15,
25
+ "learning_rate": 1.5e-05,
26
+ "loss": 0.4945,
27
+ "step": 300
28
+ },
29
+ {
30
+ "epoch": 0.2,
31
+ "learning_rate": 2e-05,
32
+ "loss": 0.4066,
33
+ "step": 400
34
+ },
35
+ {
36
+ "epoch": 0.25,
37
+ "learning_rate": 2.5e-05,
38
+ "loss": 0.4182,
39
+ "step": 500
40
+ },
41
+ {
42
+ "epoch": 0.3,
43
+ "learning_rate": 3e-05,
44
+ "loss": 0.4407,
45
+ "step": 600
46
+ },
47
+ {
48
+ "epoch": 0.35,
49
+ "learning_rate": 3.5e-05,
50
+ "loss": 0.418,
51
+ "step": 700
52
+ },
53
+ {
54
+ "epoch": 0.4,
55
+ "learning_rate": 4e-05,
56
+ "loss": 0.4258,
57
+ "step": 800
58
+ },
59
+ {
60
+ "epoch": 0.45,
61
+ "learning_rate": 4.5e-05,
62
+ "loss": 0.3885,
63
+ "step": 900
64
+ },
65
+ {
66
+ "epoch": 0.5,
67
+ "learning_rate": 5e-05,
68
+ "loss": 0.4283,
69
+ "step": 1000
70
+ },
71
+ {
72
+ "epoch": 0.55,
73
+ "learning_rate": 4.9444444444444446e-05,
74
+ "loss": 0.4148,
75
+ "step": 1100
76
+ },
77
+ {
78
+ "epoch": 0.6,
79
+ "learning_rate": 4.888888888888889e-05,
80
+ "loss": 0.3951,
81
+ "step": 1200
82
+ },
83
+ {
84
+ "epoch": 0.65,
85
+ "learning_rate": 4.8333333333333334e-05,
86
+ "loss": 0.4255,
87
+ "step": 1300
88
+ },
89
+ {
90
+ "epoch": 0.7,
91
+ "learning_rate": 4.7777777777777784e-05,
92
+ "loss": 0.3842,
93
+ "step": 1400
94
+ },
95
+ {
96
+ "epoch": 0.75,
97
+ "learning_rate": 4.722222222222222e-05,
98
+ "loss": 0.4461,
99
+ "step": 1500
100
+ },
101
+ {
102
+ "epoch": 0.8,
103
+ "learning_rate": 4.666666666666667e-05,
104
+ "loss": 0.3789,
105
+ "step": 1600
106
+ },
107
+ {
108
+ "epoch": 0.85,
109
+ "learning_rate": 4.6111111111111115e-05,
110
+ "loss": 0.3893,
111
+ "step": 1700
112
+ },
113
+ {
114
+ "epoch": 0.9,
115
+ "learning_rate": 4.555555555555556e-05,
116
+ "loss": 0.3833,
117
+ "step": 1800
118
+ },
119
+ {
120
+ "epoch": 0.95,
121
+ "learning_rate": 4.5e-05,
122
+ "loss": 0.3817,
123
+ "step": 1900
124
+ },
125
+ {
126
+ "epoch": 1.0,
127
+ "learning_rate": 4.4444444444444447e-05,
128
+ "loss": 0.3654,
129
+ "step": 2000
130
+ },
131
+ {
132
+ "epoch": 1.0,
133
+ "eval_accuracy": 0.84475,
134
+ "eval_auc": 0.8835736098526796,
135
+ "eval_f1": 0.689344672336168,
136
+ "eval_loss": 0.40313366055488586,
137
+ "eval_precision": 0.6828543111992071,
138
+ "eval_recall": 0.695959595959596,
139
+ "eval_runtime": 738.7835,
140
+ "eval_samples_per_second": 5.414,
141
+ "eval_steps_per_second": 0.338,
142
+ "step": 2000
143
+ },
144
+ {
145
+ "epoch": 1.05,
146
+ "learning_rate": 4.388888888888889e-05,
147
+ "loss": 0.3236,
148
+ "step": 2100
149
+ },
150
+ {
151
+ "epoch": 1.1,
152
+ "learning_rate": 4.3333333333333334e-05,
153
+ "loss": 0.3882,
154
+ "step": 2200
155
+ },
156
+ {
157
+ "epoch": 1.15,
158
+ "learning_rate": 4.277777777777778e-05,
159
+ "loss": 0.3413,
160
+ "step": 2300
161
+ },
162
+ {
163
+ "epoch": 1.2,
164
+ "learning_rate": 4.222222222222222e-05,
165
+ "loss": 0.303,
166
+ "step": 2400
167
+ },
168
+ {
169
+ "epoch": 1.25,
170
+ "learning_rate": 4.166666666666667e-05,
171
+ "loss": 0.352,
172
+ "step": 2500
173
+ },
174
+ {
175
+ "epoch": 1.3,
176
+ "learning_rate": 4.111111111111111e-05,
177
+ "loss": 0.323,
178
+ "step": 2600
179
+ },
180
+ {
181
+ "epoch": 1.35,
182
+ "learning_rate": 4.055555555555556e-05,
183
+ "loss": 0.3494,
184
+ "step": 2700
185
+ },
186
+ {
187
+ "epoch": 1.4,
188
+ "learning_rate": 4e-05,
189
+ "loss": 0.3125,
190
+ "step": 2800
191
+ },
192
+ {
193
+ "epoch": 1.45,
194
+ "learning_rate": 3.944444444444445e-05,
195
+ "loss": 0.314,
196
+ "step": 2900
197
+ },
198
+ {
199
+ "epoch": 1.5,
200
+ "learning_rate": 3.888888888888889e-05,
201
+ "loss": 0.394,
202
+ "step": 3000
203
+ },
204
+ {
205
+ "epoch": 1.55,
206
+ "learning_rate": 3.8333333333333334e-05,
207
+ "loss": 0.3142,
208
+ "step": 3100
209
+ },
210
+ {
211
+ "epoch": 1.6,
212
+ "learning_rate": 3.777777777777778e-05,
213
+ "loss": 0.3179,
214
+ "step": 3200
215
+ },
216
+ {
217
+ "epoch": 1.65,
218
+ "learning_rate": 3.722222222222222e-05,
219
+ "loss": 0.2756,
220
+ "step": 3300
221
+ },
222
+ {
223
+ "epoch": 1.7,
224
+ "learning_rate": 3.6666666666666666e-05,
225
+ "loss": 0.3178,
226
+ "step": 3400
227
+ },
228
+ {
229
+ "epoch": 1.75,
230
+ "learning_rate": 3.611111111111111e-05,
231
+ "loss": 0.3101,
232
+ "step": 3500
233
+ },
234
+ {
235
+ "epoch": 1.8,
236
+ "learning_rate": 3.555555555555556e-05,
237
+ "loss": 0.3615,
238
+ "step": 3600
239
+ },
240
+ {
241
+ "epoch": 1.85,
242
+ "learning_rate": 3.5e-05,
243
+ "loss": 0.3084,
244
+ "step": 3700
245
+ },
246
+ {
247
+ "epoch": 1.9,
248
+ "learning_rate": 3.444444444444445e-05,
249
+ "loss": 0.308,
250
+ "step": 3800
251
+ },
252
+ {
253
+ "epoch": 1.95,
254
+ "learning_rate": 3.388888888888889e-05,
255
+ "loss": 0.3686,
256
+ "step": 3900
257
+ },
258
+ {
259
+ "epoch": 2.0,
260
+ "learning_rate": 3.3333333333333335e-05,
261
+ "loss": 0.3642,
262
+ "step": 4000
263
+ },
264
+ {
265
+ "epoch": 2.0,
266
+ "eval_accuracy": 0.85775,
267
+ "eval_auc": 0.8958072418537535,
268
+ "eval_f1": 0.7044155844155844,
269
+ "eval_loss": 0.36799120903015137,
270
+ "eval_precision": 0.7251336898395722,
271
+ "eval_recall": 0.6848484848484848,
272
+ "eval_runtime": 782.6408,
273
+ "eval_samples_per_second": 5.111,
274
+ "eval_steps_per_second": 0.319,
275
+ "step": 4000
276
+ }
277
+ ],
278
+ "logging_steps": 100,
279
+ "max_steps": 10000,
280
+ "num_train_epochs": 5,
281
+ "save_steps": 500,
282
+ "total_flos": 2104888442880000.0,
283
+ "trial_name": null,
284
+ "trial_params": null
285
+ }
checkpoint-4000/training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:51de84b6cc635b4d4a2683309f35826006d7ae522a97fc7a9c1f92280e58726d
3
+ size 4600
config.json ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "bert-base-uncased",
3
+ "_num_labels": 2,
4
+ "architectures": [
5
+ "BertForSequenceClassification"
6
+ ],
7
+ "attention_probs_dropout_prob": 0.1,
8
+ "classifier_dropout": null,
9
+ "gradient_checkpointing": false,
10
+ "hidden_act": "gelu",
11
+ "hidden_dropout_prob": 0.1,
12
+ "hidden_size": 768,
13
+ "id2label": {
14
+ "0": "not sexist",
15
+ "1": "sexist"
16
+ },
17
+ "initializer_range": 0.02,
18
+ "intermediate_size": 3072,
19
+ "label2id": {
20
+ "not sexist": 0,
21
+ "sexist": 1
22
+ },
23
+ "layer_norm_eps": 1e-12,
24
+ "max_position_embeddings": 512,
25
+ "model_type": "bert",
26
+ "num_attention_heads": 12,
27
+ "num_hidden_layers": 12,
28
+ "pad_token_id": 0,
29
+ "position_embedding_type": "absolute",
30
+ "problem_type": "single_label_classification",
31
+ "torch_dtype": "float32",
32
+ "transformers_version": "4.35.1",
33
+ "type_vocab_size": 2,
34
+ "use_cache": true,
35
+ "vocab_size": 30522
36
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:da8733aaa7e0f3c7a42c1ef7c064bc7094f816fb780ee111cd6c503f424ae6c4
3
+ size 437958648
special_tokens_map.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "cls_token": "[CLS]",
3
+ "mask_token": "[MASK]",
4
+ "pad_token": "[PAD]",
5
+ "sep_token": "[SEP]",
6
+ "unk_token": "[UNK]"
7
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "[PAD]",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "100": {
12
+ "content": "[UNK]",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "101": {
20
+ "content": "[CLS]",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "102": {
28
+ "content": "[SEP]",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "103": {
36
+ "content": "[MASK]",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ }
43
+ },
44
+ "clean_up_tokenization_spaces": true,
45
+ "cls_token": "[CLS]",
46
+ "do_lower_case": true,
47
+ "mask_token": "[MASK]",
48
+ "model_max_length": 512,
49
+ "pad_token": "[PAD]",
50
+ "sep_token": "[SEP]",
51
+ "strip_accents": null,
52
+ "tokenize_chinese_chars": true,
53
+ "tokenizer_class": "BertTokenizer",
54
+ "unk_token": "[UNK]"
55
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:51de84b6cc635b4d4a2683309f35826006d7ae522a97fc7a9c1f92280e58726d
3
+ size 4600
training_params.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"data_path": "MatteoWood/autotrain-data-bert-sexism-classifier-v2", "model": "bert-base-uncased", "lr": 5e-05, "epochs": 5, "max_seq_length": 128, "batch_size": 8, "warmup_ratio": 0.1, "gradient_accumulation": 1, "optimizer": "adamw_torch", "scheduler": "linear", "weight_decay": 0.0, "max_grad_norm": 1.0, "seed": 42, "train_split": "train", "valid_split": "validation", "text_column": "autotrain_text", "target_column": "autotrain_label", "logging_steps": -1, "project_name": "/tmp/model", "auto_find_batch_size": false, "fp16": false, "save_total_limit": 1, "save_strategy": "epoch", "push_to_hub": true, "repo_id": "MatteoWood/bert-sexism-classifier-v2-0", "evaluation_strategy": "epoch", "username": "MatteoWood", "log": "none"}
vocab.txt ADDED
The diff for this file is too large to render. See raw diff