pogtador commited on
Commit
bc2fa23
·
1 Parent(s): bdbb115

commit files to HF hub

Browse files
README.md ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ base_model: microsoft/codebert-base
4
+ tags:
5
+ - generated_from_trainer
6
+ metrics:
7
+ - accuracy
8
+ model-index:
9
+ - name: sobert_mlm
10
+ results: []
11
+ ---
12
+
13
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
14
+ should probably proofread and complete it, then remove this comment. -->
15
+
16
+ # sobert_mlm
17
+
18
+ This model is a fine-tuned version of [microsoft/codebert-base](https://huggingface.co/microsoft/codebert-base) on an unknown dataset.
19
+ It achieves the following results on the evaluation set:
20
+ - Loss: 1.5584
21
+ - Accuracy: 0.6958
22
+
23
+ ## Model description
24
+
25
+ More information needed
26
+
27
+ ## Intended uses & limitations
28
+
29
+ More information needed
30
+
31
+ ## Training and evaluation data
32
+
33
+ More information needed
34
+
35
+ ## Training procedure
36
+
37
+ ### Training hyperparameters
38
+
39
+ The following hyperparameters were used during training:
40
+ - learning_rate: 5e-05
41
+ - train_batch_size: 4
42
+ - eval_batch_size: 4
43
+ - seed: 42
44
+ - optimizer: Use adamw_torch with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
45
+ - lr_scheduler_type: linear
46
+ - num_epochs: 3.0
47
+
48
+ ### Training results
49
+
50
+
51
+
52
+ ### Framework versions
53
+
54
+ - Transformers 4.47.1
55
+ - Pytorch 2.5.1+cu121
56
+ - Datasets 3.2.0
57
+ - Tokenizers 0.21.0
all_results.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 3.0,
3
+ "eval_accuracy": 0.695815553149481,
4
+ "eval_loss": 1.5583733320236206,
5
+ "eval_runtime": 45.293,
6
+ "eval_samples": 1277,
7
+ "eval_samples_per_second": 28.194,
8
+ "eval_steps_per_second": 7.065,
9
+ "perplexity": 4.751086515637006,
10
+ "total_flos": 1.5511823227634976e+16,
11
+ "train_loss": 1.9410085403942658,
12
+ "train_runtime": 9037.5655,
13
+ "train_samples": 25092,
14
+ "train_samples_per_second": 8.329,
15
+ "train_steps_per_second": 2.082
16
+ }
config.json ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "microsoft/codebert-base",
3
+ "architectures": [
4
+ "RobertaForMaskedLM"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "bos_token_id": 0,
8
+ "classifier_dropout": null,
9
+ "eos_token_id": 2,
10
+ "hidden_act": "gelu",
11
+ "hidden_dropout_prob": 0.1,
12
+ "hidden_size": 768,
13
+ "initializer_range": 0.02,
14
+ "intermediate_size": 3072,
15
+ "layer_norm_eps": 1e-05,
16
+ "max_position_embeddings": 514,
17
+ "model_type": "roberta",
18
+ "num_attention_heads": 12,
19
+ "num_hidden_layers": 12,
20
+ "output_past": true,
21
+ "pad_token_id": 1,
22
+ "position_embedding_type": "absolute",
23
+ "torch_dtype": "float32",
24
+ "transformers_version": "4.47.1",
25
+ "type_vocab_size": 1,
26
+ "use_cache": true,
27
+ "vocab_size": 50265
28
+ }
eval_results.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 3.0,
3
+ "eval_accuracy": 0.695815553149481,
4
+ "eval_loss": 1.5583733320236206,
5
+ "eval_runtime": 45.293,
6
+ "eval_samples": 1277,
7
+ "eval_samples_per_second": 28.194,
8
+ "eval_steps_per_second": 7.065,
9
+ "perplexity": 4.751086515637006
10
+ }
merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:28ce9a0e50ee638c2b11da881789af940658884510953aa19c6b9f4f36c87ee7
3
+ size 498813948
special_tokens_map.json ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<s>",
4
+ "lstrip": false,
5
+ "normalized": true,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "cls_token": {
10
+ "content": "<s>",
11
+ "lstrip": false,
12
+ "normalized": true,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "eos_token": {
17
+ "content": "</s>",
18
+ "lstrip": false,
19
+ "normalized": true,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "mask_token": {
24
+ "content": "<mask>",
25
+ "lstrip": true,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ },
30
+ "pad_token": {
31
+ "content": "<pad>",
32
+ "lstrip": false,
33
+ "normalized": true,
34
+ "rstrip": false,
35
+ "single_word": false
36
+ },
37
+ "sep_token": {
38
+ "content": "</s>",
39
+ "lstrip": false,
40
+ "normalized": true,
41
+ "rstrip": false,
42
+ "single_word": false
43
+ },
44
+ "unk_token": {
45
+ "content": "<unk>",
46
+ "lstrip": false,
47
+ "normalized": true,
48
+ "rstrip": false,
49
+ "single_word": false
50
+ }
51
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "added_tokens_decoder": {
4
+ "0": {
5
+ "content": "<s>",
6
+ "lstrip": false,
7
+ "normalized": true,
8
+ "rstrip": false,
9
+ "single_word": false,
10
+ "special": true
11
+ },
12
+ "1": {
13
+ "content": "<pad>",
14
+ "lstrip": false,
15
+ "normalized": true,
16
+ "rstrip": false,
17
+ "single_word": false,
18
+ "special": true
19
+ },
20
+ "2": {
21
+ "content": "</s>",
22
+ "lstrip": false,
23
+ "normalized": true,
24
+ "rstrip": false,
25
+ "single_word": false,
26
+ "special": true
27
+ },
28
+ "3": {
29
+ "content": "<unk>",
30
+ "lstrip": false,
31
+ "normalized": true,
32
+ "rstrip": false,
33
+ "single_word": false,
34
+ "special": true
35
+ },
36
+ "50264": {
37
+ "content": "<mask>",
38
+ "lstrip": true,
39
+ "normalized": false,
40
+ "rstrip": false,
41
+ "single_word": false,
42
+ "special": true
43
+ }
44
+ },
45
+ "bos_token": "<s>",
46
+ "clean_up_tokenization_spaces": false,
47
+ "cls_token": "<s>",
48
+ "eos_token": "</s>",
49
+ "errors": "replace",
50
+ "extra_special_tokens": {},
51
+ "mask_token": "<mask>",
52
+ "model_max_length": 512,
53
+ "pad_token": "<pad>",
54
+ "sep_token": "</s>",
55
+ "tokenizer_class": "RobertaTokenizer",
56
+ "trim_offsets": true,
57
+ "unk_token": "<unk>"
58
+ }
train_results.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 3.0,
3
+ "total_flos": 1.5511823227634976e+16,
4
+ "train_loss": 1.9410085403942658,
5
+ "train_runtime": 9037.5655,
6
+ "train_samples": 25092,
7
+ "train_samples_per_second": 8.329,
8
+ "train_steps_per_second": 2.082
9
+ }
trainer_state.json ADDED
@@ -0,0 +1,301 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": null,
3
+ "best_model_checkpoint": null,
4
+ "epoch": 3.0,
5
+ "eval_steps": 500,
6
+ "global_step": 18819,
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.07970667941973537,
13
+ "grad_norm": 14.617377281188965,
14
+ "learning_rate": 4.867155534300441e-05,
15
+ "loss": 4.5164,
16
+ "step": 500
17
+ },
18
+ {
19
+ "epoch": 0.15941335883947075,
20
+ "grad_norm": 13.107848167419434,
21
+ "learning_rate": 4.7343110686008824e-05,
22
+ "loss": 2.9043,
23
+ "step": 1000
24
+ },
25
+ {
26
+ "epoch": 0.2391200382592061,
27
+ "grad_norm": 18.4104061126709,
28
+ "learning_rate": 4.601466602901323e-05,
29
+ "loss": 2.5306,
30
+ "step": 1500
31
+ },
32
+ {
33
+ "epoch": 0.3188267176789415,
34
+ "grad_norm": 11.45405101776123,
35
+ "learning_rate": 4.4686221372017646e-05,
36
+ "loss": 2.3636,
37
+ "step": 2000
38
+ },
39
+ {
40
+ "epoch": 0.39853339709867686,
41
+ "grad_norm": 12.057182312011719,
42
+ "learning_rate": 4.335777671502205e-05,
43
+ "loss": 2.2193,
44
+ "step": 2500
45
+ },
46
+ {
47
+ "epoch": 0.4782400765184122,
48
+ "grad_norm": 21.33402442932129,
49
+ "learning_rate": 4.202933205802647e-05,
50
+ "loss": 2.1756,
51
+ "step": 3000
52
+ },
53
+ {
54
+ "epoch": 0.5579467559381476,
55
+ "grad_norm": 12.961982727050781,
56
+ "learning_rate": 4.070088740103087e-05,
57
+ "loss": 2.1019,
58
+ "step": 3500
59
+ },
60
+ {
61
+ "epoch": 0.637653435357883,
62
+ "grad_norm": 13.711081504821777,
63
+ "learning_rate": 3.937244274403529e-05,
64
+ "loss": 2.0309,
65
+ "step": 4000
66
+ },
67
+ {
68
+ "epoch": 0.7173601147776184,
69
+ "grad_norm": 10.16848087310791,
70
+ "learning_rate": 3.8043998087039694e-05,
71
+ "loss": 2.0221,
72
+ "step": 4500
73
+ },
74
+ {
75
+ "epoch": 0.7970667941973537,
76
+ "grad_norm": 15.42959976196289,
77
+ "learning_rate": 3.6715553430044105e-05,
78
+ "loss": 1.968,
79
+ "step": 5000
80
+ },
81
+ {
82
+ "epoch": 0.8767734736170891,
83
+ "grad_norm": 11.260416030883789,
84
+ "learning_rate": 3.5387108773048516e-05,
85
+ "loss": 1.9626,
86
+ "step": 5500
87
+ },
88
+ {
89
+ "epoch": 0.9564801530368244,
90
+ "grad_norm": 14.895442008972168,
91
+ "learning_rate": 3.405866411605293e-05,
92
+ "loss": 1.9793,
93
+ "step": 6000
94
+ },
95
+ {
96
+ "epoch": 1.03618683245656,
97
+ "grad_norm": 10.09549617767334,
98
+ "learning_rate": 3.273021945905734e-05,
99
+ "loss": 1.8907,
100
+ "step": 6500
101
+ },
102
+ {
103
+ "epoch": 1.1158935118762952,
104
+ "grad_norm": 12.858028411865234,
105
+ "learning_rate": 3.140177480206174e-05,
106
+ "loss": 1.8524,
107
+ "step": 7000
108
+ },
109
+ {
110
+ "epoch": 1.1956001912960306,
111
+ "grad_norm": 12.280284881591797,
112
+ "learning_rate": 3.007333014506616e-05,
113
+ "loss": 1.8517,
114
+ "step": 7500
115
+ },
116
+ {
117
+ "epoch": 1.275306870715766,
118
+ "grad_norm": 10.79765796661377,
119
+ "learning_rate": 2.8744885488070568e-05,
120
+ "loss": 1.8522,
121
+ "step": 8000
122
+ },
123
+ {
124
+ "epoch": 1.3550135501355014,
125
+ "grad_norm": 12.524330139160156,
126
+ "learning_rate": 2.741644083107498e-05,
127
+ "loss": 1.827,
128
+ "step": 8500
129
+ },
130
+ {
131
+ "epoch": 1.4347202295552366,
132
+ "grad_norm": 13.051765441894531,
133
+ "learning_rate": 2.6087996174079386e-05,
134
+ "loss": 1.8092,
135
+ "step": 9000
136
+ },
137
+ {
138
+ "epoch": 1.514426908974972,
139
+ "grad_norm": 11.686491012573242,
140
+ "learning_rate": 2.4759551517083797e-05,
141
+ "loss": 1.8128,
142
+ "step": 9500
143
+ },
144
+ {
145
+ "epoch": 1.5941335883947074,
146
+ "grad_norm": 10.523648262023926,
147
+ "learning_rate": 2.3431106860088208e-05,
148
+ "loss": 1.7951,
149
+ "step": 10000
150
+ },
151
+ {
152
+ "epoch": 1.6738402678144428,
153
+ "grad_norm": 12.37237548828125,
154
+ "learning_rate": 2.210266220309262e-05,
155
+ "loss": 1.7592,
156
+ "step": 10500
157
+ },
158
+ {
159
+ "epoch": 1.7535469472341783,
160
+ "grad_norm": 13.389715194702148,
161
+ "learning_rate": 2.077421754609703e-05,
162
+ "loss": 1.7428,
163
+ "step": 11000
164
+ },
165
+ {
166
+ "epoch": 1.8332536266539137,
167
+ "grad_norm": 10.13847541809082,
168
+ "learning_rate": 1.944577288910144e-05,
169
+ "loss": 1.7337,
170
+ "step": 11500
171
+ },
172
+ {
173
+ "epoch": 1.912960306073649,
174
+ "grad_norm": 9.493837356567383,
175
+ "learning_rate": 1.8117328232105852e-05,
176
+ "loss": 1.7224,
177
+ "step": 12000
178
+ },
179
+ {
180
+ "epoch": 1.9926669854933845,
181
+ "grad_norm": 9.915449142456055,
182
+ "learning_rate": 1.6788883575110263e-05,
183
+ "loss": 1.7306,
184
+ "step": 12500
185
+ },
186
+ {
187
+ "epoch": 2.07237366491312,
188
+ "grad_norm": 10.596574783325195,
189
+ "learning_rate": 1.5460438918114674e-05,
190
+ "loss": 1.6675,
191
+ "step": 13000
192
+ },
193
+ {
194
+ "epoch": 2.152080344332855,
195
+ "grad_norm": 11.658182144165039,
196
+ "learning_rate": 1.4131994261119083e-05,
197
+ "loss": 1.671,
198
+ "step": 13500
199
+ },
200
+ {
201
+ "epoch": 2.2317870237525903,
202
+ "grad_norm": 10.158458709716797,
203
+ "learning_rate": 1.2803549604123494e-05,
204
+ "loss": 1.6658,
205
+ "step": 14000
206
+ },
207
+ {
208
+ "epoch": 2.3114937031723257,
209
+ "grad_norm": 11.206422805786133,
210
+ "learning_rate": 1.1475104947127904e-05,
211
+ "loss": 1.666,
212
+ "step": 14500
213
+ },
214
+ {
215
+ "epoch": 2.391200382592061,
216
+ "grad_norm": 10.595658302307129,
217
+ "learning_rate": 1.0146660290132313e-05,
218
+ "loss": 1.6523,
219
+ "step": 15000
220
+ },
221
+ {
222
+ "epoch": 2.4709070620117966,
223
+ "grad_norm": 8.99512004852295,
224
+ "learning_rate": 8.818215633136724e-06,
225
+ "loss": 1.6529,
226
+ "step": 15500
227
+ },
228
+ {
229
+ "epoch": 2.550613741431532,
230
+ "grad_norm": 8.853923797607422,
231
+ "learning_rate": 7.489770976141135e-06,
232
+ "loss": 1.6617,
233
+ "step": 16000
234
+ },
235
+ {
236
+ "epoch": 2.6303204208512674,
237
+ "grad_norm": 9.30465316772461,
238
+ "learning_rate": 6.161326319145545e-06,
239
+ "loss": 1.6566,
240
+ "step": 16500
241
+ },
242
+ {
243
+ "epoch": 2.710027100271003,
244
+ "grad_norm": 10.036943435668945,
245
+ "learning_rate": 4.832881662149955e-06,
246
+ "loss": 1.6423,
247
+ "step": 17000
248
+ },
249
+ {
250
+ "epoch": 2.789733779690738,
251
+ "grad_norm": 12.505424499511719,
252
+ "learning_rate": 3.504437005154365e-06,
253
+ "loss": 1.6528,
254
+ "step": 17500
255
+ },
256
+ {
257
+ "epoch": 2.869440459110473,
258
+ "grad_norm": 9.32070255279541,
259
+ "learning_rate": 2.1759923481587757e-06,
260
+ "loss": 1.6388,
261
+ "step": 18000
262
+ },
263
+ {
264
+ "epoch": 2.9491471385302086,
265
+ "grad_norm": 13.217713356018066,
266
+ "learning_rate": 8.475476911631861e-07,
267
+ "loss": 1.6282,
268
+ "step": 18500
269
+ },
270
+ {
271
+ "epoch": 3.0,
272
+ "step": 18819,
273
+ "total_flos": 1.5511823227634976e+16,
274
+ "train_loss": 1.9410085403942658,
275
+ "train_runtime": 9037.5655,
276
+ "train_samples_per_second": 8.329,
277
+ "train_steps_per_second": 2.082
278
+ }
279
+ ],
280
+ "logging_steps": 500,
281
+ "max_steps": 18819,
282
+ "num_input_tokens_seen": 0,
283
+ "num_train_epochs": 3,
284
+ "save_steps": 500,
285
+ "stateful_callbacks": {
286
+ "TrainerControl": {
287
+ "args": {
288
+ "should_epoch_stop": false,
289
+ "should_evaluate": false,
290
+ "should_log": false,
291
+ "should_save": true,
292
+ "should_training_stop": true
293
+ },
294
+ "attributes": {}
295
+ }
296
+ },
297
+ "total_flos": 1.5511823227634976e+16,
298
+ "train_batch_size": 4,
299
+ "trial_name": null,
300
+ "trial_params": null
301
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:293e02e2ec9e8f05bcc71a016a956d0770728cc2f84637c403f04b6b3b0e103e
3
+ size 5368
vocab.json ADDED
The diff for this file is too large to render. See raw diff