Cheng98 commited on
Commit
5957503
·
verified ·
1 Parent(s): 4387b42

Upload folder using huggingface_hub

Browse files
README.md CHANGED
@@ -1,13 +1,28 @@
1
  ---
 
 
2
  license: apache-2.0
3
  base_model: bert-large-cased
4
  tags:
5
  - generated_from_trainer
 
 
6
  metrics:
7
  - accuracy
8
  model-index:
9
  - name: bert-large-sst2
10
- results: []
 
 
 
 
 
 
 
 
 
 
 
11
  ---
12
 
13
  <!-- This model card has been generated automatically according to the information the Trainer had access to. You
@@ -15,10 +30,10 @@ should probably proofread and complete it, then remove this comment. -->
15
 
16
  # bert-large-sst2
17
 
18
- This model is a fine-tuned version of [bert-large-cased](https://huggingface.co/bert-large-cased) on an unknown dataset.
19
  It achieves the following results on the evaluation set:
20
- - Loss: 0.2122
21
- - Accuracy: 0.9278
22
 
23
  ## Model description
24
 
@@ -37,24 +52,16 @@ More information needed
37
  ### Training hyperparameters
38
 
39
  The following hyperparameters were used during training:
40
- - learning_rate: 5e-05
41
  - train_batch_size: 16
42
- - eval_batch_size: 32
43
  - seed: 42
44
- - gradient_accumulation_steps: 8
45
- - total_train_batch_size: 128
46
  - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
47
  - lr_scheduler_type: linear
48
- - num_epochs: 4
49
 
50
  ### Training results
51
 
52
- | Training Loss | Epoch | Step | Validation Loss | Accuracy |
53
- |:-------------:|:-----:|:----:|:---------------:|:--------:|
54
- | 0.3476 | 1.0 | 526 | 0.3028 | 0.8945 |
55
- | 0.1646 | 2.0 | 1052 | 0.2425 | 0.9117 |
56
- | 0.1098 | 3.0 | 1578 | 0.2053 | 0.9278 |
57
- | 0.0767 | 4.0 | 2104 | 0.2122 | 0.9278 |
58
 
59
 
60
  ### Framework versions
 
1
  ---
2
+ language:
3
+ - en
4
  license: apache-2.0
5
  base_model: bert-large-cased
6
  tags:
7
  - generated_from_trainer
8
+ datasets:
9
+ - glue
10
  metrics:
11
  - accuracy
12
  model-index:
13
  - name: bert-large-sst2
14
+ results:
15
+ - task:
16
+ name: Text Classification
17
+ type: text-classification
18
+ dataset:
19
+ name: GLUE SST2
20
+ type: glue
21
+ args: sst2
22
+ metrics:
23
+ - name: Accuracy
24
+ type: accuracy
25
+ value: 0.9254587155963303
26
  ---
27
 
28
  <!-- This model card has been generated automatically according to the information the Trainer had access to. You
 
30
 
31
  # bert-large-sst2
32
 
33
+ This model is a fine-tuned version of [bert-large-cased](https://huggingface.co/bert-large-cased) on the GLUE SST2 dataset.
34
  It achieves the following results on the evaluation set:
35
+ - Loss: 0.3748
36
+ - Accuracy: 0.9255
37
 
38
  ## Model description
39
 
 
52
  ### Training hyperparameters
53
 
54
  The following hyperparameters were used during training:
55
+ - learning_rate: 2e-05
56
  - train_batch_size: 16
57
+ - eval_batch_size: 8
58
  - seed: 42
 
 
59
  - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
60
  - lr_scheduler_type: linear
61
+ - num_epochs: 5.0
62
 
63
  ### Training results
64
 
 
 
 
 
 
 
65
 
66
 
67
  ### Framework versions
all_results.json CHANGED
@@ -1,14 +1,14 @@
1
  {
2
- "epoch": 4.0,
3
- "eval_accuracy": 0.9277522935779816,
4
- "eval_loss": 0.2121734321117401,
5
- "eval_runtime": 5.1507,
6
  "eval_samples": 872,
7
- "eval_samples_per_second": 169.297,
8
- "eval_steps_per_second": 5.436,
9
- "train_loss": 0.16908984673793778,
10
- "train_runtime": 4642.5497,
11
  "train_samples": 67349,
12
- "train_samples_per_second": 58.028,
13
- "train_steps_per_second": 0.453
14
  }
 
1
  {
2
+ "epoch": 5.0,
3
+ "eval_accuracy": 0.9254587155963303,
4
+ "eval_loss": 0.374822735786438,
5
+ "eval_runtime": 2.241,
6
  "eval_samples": 872,
7
+ "eval_samples_per_second": 389.107,
8
+ "eval_steps_per_second": 48.638,
9
+ "train_loss": 0.1226784371989923,
10
+ "train_runtime": 1894.6082,
11
  "train_samples": 67349,
12
+ "train_samples_per_second": 177.739,
13
+ "train_steps_per_second": 11.11
14
  }
config.json CHANGED
@@ -6,20 +6,20 @@
6
  "attention_probs_dropout_prob": 0.1,
7
  "classifier_dropout": null,
8
  "directionality": "bidi",
9
- "finetuning_task": "text-classification",
10
  "gradient_checkpointing": false,
11
  "hidden_act": "gelu",
12
  "hidden_dropout_prob": 0.1,
13
  "hidden_size": 1024,
14
  "id2label": {
15
- "0": "0",
16
- "1": "1"
17
  },
18
  "initializer_range": 0.02,
19
  "intermediate_size": 4096,
20
  "label2id": {
21
- "0": 0,
22
- "1": 1
23
  },
24
  "layer_norm_eps": 1e-12,
25
  "max_position_embeddings": 512,
 
6
  "attention_probs_dropout_prob": 0.1,
7
  "classifier_dropout": null,
8
  "directionality": "bidi",
9
+ "finetuning_task": "sst2",
10
  "gradient_checkpointing": false,
11
  "hidden_act": "gelu",
12
  "hidden_dropout_prob": 0.1,
13
  "hidden_size": 1024,
14
  "id2label": {
15
+ "0": "negative",
16
+ "1": "positive"
17
  },
18
  "initializer_range": 0.02,
19
  "intermediate_size": 4096,
20
  "label2id": {
21
+ "negative": 0,
22
+ "positive": 1
23
  },
24
  "layer_norm_eps": 1e-12,
25
  "max_position_embeddings": 512,
eval_results.json CHANGED
@@ -1,9 +1,9 @@
1
  {
2
- "epoch": 4.0,
3
- "eval_accuracy": 0.9277522935779816,
4
- "eval_loss": 0.2121734321117401,
5
- "eval_runtime": 5.1507,
6
  "eval_samples": 872,
7
- "eval_samples_per_second": 169.297,
8
- "eval_steps_per_second": 5.436
9
  }
 
1
  {
2
+ "epoch": 5.0,
3
+ "eval_accuracy": 0.9254587155963303,
4
+ "eval_loss": 0.374822735786438,
5
+ "eval_runtime": 2.241,
6
  "eval_samples": 872,
7
+ "eval_samples_per_second": 389.107,
8
+ "eval_steps_per_second": 48.638
9
  }
pytorch_model.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:74cbcc1c4be762e57a9262f746ba160437a3096c3176f4ad01675e20e6f9bd0a
3
  size 1334459697
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:992f71a410b5155d4244cdd74eb958fca18d8f03b9796f7a675da60aa0a2e807
3
  size 1334459697
tokenizer.json CHANGED
@@ -2,13 +2,13 @@
2
  "version": "1.0",
3
  "truncation": {
4
  "direction": "Right",
5
- "max_length": 512,
6
  "strategy": "LongestFirst",
7
  "stride": 0
8
  },
9
  "padding": {
10
  "strategy": {
11
- "Fixed": 512
12
  },
13
  "direction": "Right",
14
  "pad_to_multiple_of": null,
 
2
  "version": "1.0",
3
  "truncation": {
4
  "direction": "Right",
5
+ "max_length": 128,
6
  "strategy": "LongestFirst",
7
  "stride": 0
8
  },
9
  "padding": {
10
  "strategy": {
11
+ "Fixed": 128
12
  },
13
  "direction": "Right",
14
  "pad_to_multiple_of": null,
train_results.json CHANGED
@@ -1,8 +1,8 @@
1
  {
2
- "epoch": 4.0,
3
- "train_loss": 0.16908984673793778,
4
- "train_runtime": 4642.5497,
5
  "train_samples": 67349,
6
- "train_samples_per_second": 58.028,
7
- "train_steps_per_second": 0.453
8
  }
 
1
  {
2
+ "epoch": 5.0,
3
+ "train_loss": 0.1226784371989923,
4
+ "train_runtime": 1894.6082,
5
  "train_samples": 67349,
6
+ "train_samples_per_second": 177.739,
7
+ "train_steps_per_second": 11.11
8
  }
trainer_state.json CHANGED
@@ -1,85 +1,277 @@
1
  {
2
  "best_metric": null,
3
  "best_model_checkpoint": null,
4
- "epoch": 3.998099762470309,
5
- "global_step": 2104,
6
  "is_hyper_param_search": false,
7
  "is_local_process_zero": true,
8
  "is_world_process_zero": true,
9
  "log_history": [
10
  {
11
- "epoch": 0.95,
12
- "learning_rate": 3.8236692015209125e-05,
13
- "loss": 0.3476,
14
  "step": 500
15
  },
16
  {
17
- "epoch": 1.0,
18
- "eval_accuracy": 0.8944954128440367,
19
- "eval_loss": 0.3027590811252594,
20
- "eval_runtime": 5.1932,
21
- "eval_samples_per_second": 167.912,
22
- "eval_steps_per_second": 5.392,
23
- "step": 526
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
  },
25
  {
26
  "epoch": 1.9,
27
- "learning_rate": 2.6354562737642585e-05,
28
- "loss": 0.1646,
29
- "step": 1000
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  },
31
  {
32
- "epoch": 2.0,
33
- "eval_accuracy": 0.911697247706422,
34
- "eval_loss": 0.2424829751253128,
35
- "eval_runtime": 5.1979,
36
- "eval_samples_per_second": 167.759,
37
- "eval_steps_per_second": 5.387,
38
- "step": 1052
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39
  },
40
  {
41
  "epoch": 2.85,
42
- "learning_rate": 1.4472433460076046e-05,
43
- "loss": 0.1098,
44
- "step": 1500
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45
  },
46
  {
47
- "epoch": 3.0,
48
- "eval_accuracy": 0.9277522935779816,
49
- "eval_loss": 0.2052551656961441,
50
- "eval_runtime": 5.1738,
51
- "eval_samples_per_second": 168.542,
52
- "eval_steps_per_second": 5.412,
53
- "step": 1578
54
  },
55
  {
56
  "epoch": 3.8,
57
- "learning_rate": 2.5903041825095057e-06,
58
- "loss": 0.0767,
59
- "step": 2000
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
60
  },
61
  {
62
- "epoch": 4.0,
63
- "eval_accuracy": 0.9277522935779816,
64
- "eval_loss": 0.2121734321117401,
65
- "eval_runtime": 5.1753,
66
- "eval_samples_per_second": 168.492,
67
- "eval_steps_per_second": 5.41,
68
- "step": 2104
69
  },
70
  {
71
- "epoch": 4.0,
72
- "step": 2104,
73
- "total_flos": 2.509495455856005e+17,
74
- "train_loss": 0.16908984673793778,
75
- "train_runtime": 4642.5497,
76
- "train_samples_per_second": 58.028,
77
- "train_steps_per_second": 0.453
78
  }
79
  ],
80
- "max_steps": 2104,
81
- "num_train_epochs": 4,
82
- "total_flos": 2.509495455856005e+17,
83
  "trial_name": null,
84
  "trial_params": null
85
  }
 
1
  {
2
  "best_metric": null,
3
  "best_model_checkpoint": null,
4
+ "epoch": 5.0,
5
+ "global_step": 21050,
6
  "is_hyper_param_search": false,
7
  "is_local_process_zero": true,
8
  "is_world_process_zero": true,
9
  "log_history": [
10
  {
11
+ "epoch": 0.12,
12
+ "learning_rate": 1.952969121140143e-05,
13
+ "loss": 0.3269,
14
  "step": 500
15
  },
16
  {
17
+ "epoch": 0.24,
18
+ "learning_rate": 1.9054631828978623e-05,
19
+ "loss": 0.275,
20
+ "step": 1000
21
+ },
22
+ {
23
+ "epoch": 0.36,
24
+ "learning_rate": 1.857957244655582e-05,
25
+ "loss": 0.2457,
26
+ "step": 1500
27
+ },
28
+ {
29
+ "epoch": 0.48,
30
+ "learning_rate": 1.8104513064133016e-05,
31
+ "loss": 0.2285,
32
+ "step": 2000
33
+ },
34
+ {
35
+ "epoch": 0.59,
36
+ "learning_rate": 1.7629453681710215e-05,
37
+ "loss": 0.2181,
38
+ "step": 2500
39
+ },
40
+ {
41
+ "epoch": 0.71,
42
+ "learning_rate": 1.7154394299287413e-05,
43
+ "loss": 0.2131,
44
+ "step": 3000
45
+ },
46
+ {
47
+ "epoch": 0.83,
48
+ "learning_rate": 1.6679334916864608e-05,
49
+ "loss": 0.2115,
50
+ "step": 3500
51
+ },
52
+ {
53
+ "epoch": 0.95,
54
+ "learning_rate": 1.6204275534441806e-05,
55
+ "loss": 0.2013,
56
+ "step": 4000
57
+ },
58
+ {
59
+ "epoch": 1.07,
60
+ "learning_rate": 1.5730166270783847e-05,
61
+ "loss": 0.174,
62
+ "step": 4500
63
+ },
64
+ {
65
+ "epoch": 1.19,
66
+ "learning_rate": 1.5255106888361047e-05,
67
+ "loss": 0.1483,
68
+ "step": 5000
69
+ },
70
+ {
71
+ "epoch": 1.31,
72
+ "learning_rate": 1.4780997624703088e-05,
73
+ "loss": 0.157,
74
+ "step": 5500
75
+ },
76
+ {
77
+ "epoch": 1.43,
78
+ "learning_rate": 1.4305938242280287e-05,
79
+ "loss": 0.1516,
80
+ "step": 6000
81
+ },
82
+ {
83
+ "epoch": 1.54,
84
+ "learning_rate": 1.3830878859857483e-05,
85
+ "loss": 0.1509,
86
+ "step": 6500
87
+ },
88
+ {
89
+ "epoch": 1.66,
90
+ "learning_rate": 1.335581947743468e-05,
91
+ "loss": 0.1455,
92
+ "step": 7000
93
+ },
94
+ {
95
+ "epoch": 1.78,
96
+ "learning_rate": 1.2880760095011876e-05,
97
+ "loss": 0.1481,
98
+ "step": 7500
99
  },
100
  {
101
  "epoch": 1.9,
102
+ "learning_rate": 1.2405700712589075e-05,
103
+ "loss": 0.1469,
104
+ "step": 8000
105
+ },
106
+ {
107
+ "epoch": 2.02,
108
+ "learning_rate": 1.1930641330166273e-05,
109
+ "loss": 0.1406,
110
+ "step": 8500
111
+ },
112
+ {
113
+ "epoch": 2.14,
114
+ "learning_rate": 1.1455581947743468e-05,
115
+ "loss": 0.1038,
116
+ "step": 9000
117
+ },
118
+ {
119
+ "epoch": 2.26,
120
+ "learning_rate": 1.0980522565320666e-05,
121
+ "loss": 0.0981,
122
+ "step": 9500
123
  },
124
  {
125
+ "epoch": 2.38,
126
+ "learning_rate": 1.0505463182897864e-05,
127
+ "loss": 0.1033,
128
+ "step": 10000
129
+ },
130
+ {
131
+ "epoch": 2.49,
132
+ "learning_rate": 1.003040380047506e-05,
133
+ "loss": 0.1123,
134
+ "step": 10500
135
+ },
136
+ {
137
+ "epoch": 2.61,
138
+ "learning_rate": 9.555344418052257e-06,
139
+ "loss": 0.1069,
140
+ "step": 11000
141
+ },
142
+ {
143
+ "epoch": 2.73,
144
+ "learning_rate": 9.0812351543943e-06,
145
+ "loss": 0.1074,
146
+ "step": 11500
147
  },
148
  {
149
  "epoch": 2.85,
150
+ "learning_rate": 8.606175771971497e-06,
151
+ "loss": 0.115,
152
+ "step": 12000
153
+ },
154
+ {
155
+ "epoch": 2.97,
156
+ "learning_rate": 8.13206650831354e-06,
157
+ "loss": 0.1136,
158
+ "step": 12500
159
+ },
160
+ {
161
+ "epoch": 3.09,
162
+ "learning_rate": 7.657007125890738e-06,
163
+ "loss": 0.0729,
164
+ "step": 13000
165
+ },
166
+ {
167
+ "epoch": 3.21,
168
+ "learning_rate": 7.181947743467934e-06,
169
+ "loss": 0.0719,
170
+ "step": 13500
171
+ },
172
+ {
173
+ "epoch": 3.33,
174
+ "learning_rate": 6.7068883610451305e-06,
175
+ "loss": 0.0751,
176
+ "step": 14000
177
+ },
178
+ {
179
+ "epoch": 3.44,
180
+ "learning_rate": 6.231828978622329e-06,
181
+ "loss": 0.0675,
182
+ "step": 14500
183
+ },
184
+ {
185
+ "epoch": 3.56,
186
+ "learning_rate": 5.757719714964372e-06,
187
+ "loss": 0.0771,
188
+ "step": 15000
189
  },
190
  {
191
+ "epoch": 3.68,
192
+ "learning_rate": 5.282660332541568e-06,
193
+ "loss": 0.0739,
194
+ "step": 15500
 
 
 
195
  },
196
  {
197
  "epoch": 3.8,
198
+ "learning_rate": 4.807600950118766e-06,
199
+ "loss": 0.0699,
200
+ "step": 16000
201
+ },
202
+ {
203
+ "epoch": 3.92,
204
+ "learning_rate": 4.332541567695962e-06,
205
+ "loss": 0.0749,
206
+ "step": 16500
207
+ },
208
+ {
209
+ "epoch": 4.04,
210
+ "learning_rate": 3.857482185273159e-06,
211
+ "loss": 0.0638,
212
+ "step": 17000
213
+ },
214
+ {
215
+ "epoch": 4.16,
216
+ "learning_rate": 3.383372921615202e-06,
217
+ "loss": 0.0382,
218
+ "step": 17500
219
+ },
220
+ {
221
+ "epoch": 4.28,
222
+ "learning_rate": 2.9083135391923996e-06,
223
+ "loss": 0.0474,
224
+ "step": 18000
225
+ },
226
+ {
227
+ "epoch": 4.39,
228
+ "learning_rate": 2.4332541567695966e-06,
229
+ "loss": 0.0527,
230
+ "step": 18500
231
+ },
232
+ {
233
+ "epoch": 4.51,
234
+ "learning_rate": 1.9581947743467935e-06,
235
+ "loss": 0.0457,
236
+ "step": 19000
237
+ },
238
+ {
239
+ "epoch": 4.63,
240
+ "learning_rate": 1.4831353919239907e-06,
241
+ "loss": 0.0448,
242
+ "step": 19500
243
+ },
244
+ {
245
+ "epoch": 4.75,
246
+ "learning_rate": 1.0080760095011877e-06,
247
+ "loss": 0.0417,
248
+ "step": 20000
249
+ },
250
+ {
251
+ "epoch": 4.87,
252
+ "learning_rate": 5.330166270783848e-07,
253
+ "loss": 0.0457,
254
+ "step": 20500
255
  },
256
  {
257
+ "epoch": 4.99,
258
+ "learning_rate": 5.8907363420427555e-08,
259
+ "loss": 0.0509,
260
+ "step": 21000
 
 
 
261
  },
262
  {
263
+ "epoch": 5.0,
264
+ "step": 21050,
265
+ "total_flos": 7.845580673597184e+16,
266
+ "train_loss": 0.1226784371989923,
267
+ "train_runtime": 1894.6082,
268
+ "train_samples_per_second": 177.739,
269
+ "train_steps_per_second": 11.11
270
  }
271
  ],
272
+ "max_steps": 21050,
273
+ "num_train_epochs": 5,
274
+ "total_flos": 7.845580673597184e+16,
275
  "trial_name": null,
276
  "trial_params": null
277
  }
training_args.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:57c3c538814698c75e5d72b38c6a4bd84b676496e77011365d1a46c481839af0
3
- size 4155
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:506c4bb3faa4a7f22c174fd15b2af7d038fd5408b4b43271e6c75828eeb575fe
3
+ size 3963