YaItco commited on
Commit
dfc3f84
·
verified ·
1 Parent(s): 133fcb3

Upload folder using huggingface_hub

Browse files
Files changed (4) hide show
  1. README.md +6 -0
  2. config.json +22 -5
  3. ema_validation.json +294 -0
  4. model.pt +2 -2
README.md CHANGED
@@ -13,3 +13,9 @@ tags:
13
  Custom encoder-decoder Transformer: arithmetic word problems to Python code.
14
 
15
  Use `notebooks/inference.ipynb` from the project repository. The bundle contains model weights, architecture config, and its matching tokenizer. Optimizer state and training configuration are excluded.
 
 
 
 
 
 
 
13
  Custom encoder-decoder Transformer: arithmetic word problems to Python code.
14
 
15
  Use `notebooks/inference.ipynb` from the project repository. The bundle contains model weights, architecture config, and its matching tokenizer. Optimizer state and training configuration are excluded.
16
+
17
+ Model: 91,384,320 parameters; width 640, 6 encoder and 6 decoder layers.
18
+ Checkpoint selection: anchored, beta=0.99.
19
+ EMA initialized from epoch 940, then updated over epochs 991 through 1000: `EMA = beta * EMA + (1-beta) * snapshot`.
20
+ Validation greedy Pass@1: 1458/1981 (73.5992%); loss 0.276027. 67 invalid reference programs excluded.
21
+ Validation was used to select the model and smoothing parameter. These are not test scores. See `ema_validation.json` for the comparison.
config.json CHANGED
@@ -6,15 +6,32 @@
6
  "pad_id": 0,
7
  "decoder_start_token_id": 2,
8
  "eos_token_id": 3,
9
- "d_model": 512,
10
- "n_heads": 8,
11
  "encoder_layers": 6,
12
- "decoder_layers": 4,
13
- "d_ff": 2048,
14
  "dropout": 0.1,
15
  "gradient_checkpointing": false
16
  },
17
  "code_format": "solve_body_result",
18
  "add_imports": true,
19
- "clean_questions": true
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
  }
 
6
  "pad_id": 0,
7
  "decoder_start_token_id": 2,
8
  "eos_token_id": 3,
9
+ "d_model": 640,
10
+ "n_heads": 10,
11
  "encoder_layers": 6,
12
+ "decoder_layers": 6,
13
+ "d_ff": 2560,
14
  "dropout": 0.1,
15
  "gradient_checkpointing": false
16
  },
17
  "code_format": "solve_body_result",
18
  "add_imports": true,
19
+ "clean_questions": true,
20
+ "checkpoint_selection": {
21
+ "method": "anchored",
22
+ "beta": 0.99,
23
+ "source_epochs": [
24
+ 991,
25
+ 992,
26
+ 993,
27
+ 994,
28
+ 995,
29
+ 996,
30
+ 997,
31
+ 998,
32
+ 999,
33
+ 1000
34
+ ],
35
+ "anchor_epoch": 940
36
+ }
37
  }
ema_validation.json ADDED
@@ -0,0 +1,294 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "method": "anchored",
3
+ "beta": 0.99,
4
+ "source_epochs": [
5
+ 991,
6
+ 992,
7
+ 993,
8
+ 994,
9
+ 995,
10
+ 996,
11
+ 997,
12
+ 998,
13
+ 999,
14
+ 1000
15
+ ],
16
+ "anchor_epoch": 940,
17
+ "criterion": "max validation greedy Pass@1, then min validation loss",
18
+ "selected_validation": {
19
+ "loss": 0.2760274481076102,
20
+ "pass_correct": 1458,
21
+ "pass_total": 1981,
22
+ "reference_errors": 67,
23
+ "prediction_errors": 13,
24
+ "generation_truncated": 1,
25
+ "wrong_answer": 510,
26
+ "reference_non_numeric": 65,
27
+ "prediction_timeout": 2,
28
+ "prediction_runtime_error": 9,
29
+ "reference_runtime_error": 2,
30
+ "prediction_non_numeric": 1,
31
+ "pass_at_1": 0.7359919232710752
32
+ },
33
+ "candidates": [
34
+ {
35
+ "method": "original_best",
36
+ "beta": null,
37
+ "epoch": 940,
38
+ "validation": {
39
+ "loss": 0.27660289393428694,
40
+ "pass_correct": 1456,
41
+ "pass_total": 1981,
42
+ "reference_errors": 67,
43
+ "prediction_errors": 13,
44
+ "generation_truncated": 1,
45
+ "wrong_answer": 512,
46
+ "reference_non_numeric": 65,
47
+ "prediction_timeout": 2,
48
+ "prediction_runtime_error": 9,
49
+ "reference_runtime_error": 2,
50
+ "prediction_non_numeric": 1,
51
+ "pass_at_1": 0.734982332155477
52
+ },
53
+ "seconds": 81.98859563400038
54
+ },
55
+ {
56
+ "method": "window",
57
+ "beta": 0,
58
+ "epoch": 1000,
59
+ "validation": {
60
+ "loss": 0.27577798905013434,
61
+ "pass_correct": 1439,
62
+ "pass_total": 1981,
63
+ "reference_errors": 67,
64
+ "prediction_errors": 13,
65
+ "generation_truncated": 0,
66
+ "wrong_answer": 529,
67
+ "reference_non_numeric": 65,
68
+ "prediction_timeout": 2,
69
+ "prediction_runtime_error": 9,
70
+ "prediction_compile_error": 1,
71
+ "reference_runtime_error": 2,
72
+ "prediction_non_numeric": 1,
73
+ "pass_at_1": 0.7264008076728925
74
+ },
75
+ "seconds": 61.110318807011936
76
+ },
77
+ {
78
+ "method": "window",
79
+ "beta": 0.5,
80
+ "epoch": 1000,
81
+ "validation": {
82
+ "loss": 0.2753746629389873,
83
+ "pass_correct": 1434,
84
+ "pass_total": 1981,
85
+ "reference_errors": 67,
86
+ "prediction_errors": 13,
87
+ "generation_truncated": 0,
88
+ "wrong_answer": 534,
89
+ "reference_non_numeric": 65,
90
+ "prediction_timeout": 2,
91
+ "prediction_runtime_error": 8,
92
+ "prediction_compile_error": 2,
93
+ "reference_runtime_error": 2,
94
+ "prediction_non_numeric": 1,
95
+ "pass_at_1": 0.723876829883897
96
+ },
97
+ "seconds": 64.78814164099458
98
+ },
99
+ {
100
+ "method": "window",
101
+ "beta": 0.8,
102
+ "epoch": 1000,
103
+ "validation": {
104
+ "loss": 0.2748919413560011,
105
+ "pass_correct": 1436,
106
+ "pass_total": 1981,
107
+ "reference_errors": 67,
108
+ "prediction_errors": 10,
109
+ "generation_truncated": 0,
110
+ "wrong_answer": 535,
111
+ "reference_non_numeric": 65,
112
+ "prediction_timeout": 1,
113
+ "prediction_runtime_error": 6,
114
+ "prediction_compile_error": 2,
115
+ "reference_runtime_error": 2,
116
+ "prediction_non_numeric": 1,
117
+ "pass_at_1": 0.7248864209994952
118
+ },
119
+ "seconds": 56.213801088990294
120
+ },
121
+ {
122
+ "method": "window",
123
+ "beta": 0.9,
124
+ "epoch": 1000,
125
+ "validation": {
126
+ "loss": 0.27484753616479973,
127
+ "pass_correct": 1436,
128
+ "pass_total": 1981,
129
+ "reference_errors": 67,
130
+ "prediction_errors": 10,
131
+ "generation_truncated": 0,
132
+ "wrong_answer": 535,
133
+ "reference_non_numeric": 65,
134
+ "prediction_timeout": 1,
135
+ "prediction_runtime_error": 6,
136
+ "prediction_compile_error": 2,
137
+ "reference_runtime_error": 2,
138
+ "prediction_non_numeric": 1,
139
+ "pass_at_1": 0.7248864209994952
140
+ },
141
+ "seconds": 55.849927527990076
142
+ },
143
+ {
144
+ "method": "window",
145
+ "beta": 0.95,
146
+ "epoch": 1000,
147
+ "validation": {
148
+ "loss": 0.27479708883750886,
149
+ "pass_correct": 1443,
150
+ "pass_total": 1981,
151
+ "reference_errors": 67,
152
+ "prediction_errors": 11,
153
+ "generation_truncated": 0,
154
+ "wrong_answer": 527,
155
+ "reference_non_numeric": 65,
156
+ "prediction_timeout": 1,
157
+ "prediction_runtime_error": 7,
158
+ "prediction_compile_error": 2,
159
+ "reference_runtime_error": 2,
160
+ "prediction_non_numeric": 1,
161
+ "pass_at_1": 0.7284199899040888
162
+ },
163
+ "seconds": 55.835348098000395
164
+ },
165
+ {
166
+ "method": "window",
167
+ "beta": 0.99,
168
+ "epoch": 1000,
169
+ "validation": {
170
+ "loss": 0.2748299869157994,
171
+ "pass_correct": 1445,
172
+ "pass_total": 1981,
173
+ "reference_errors": 67,
174
+ "prediction_errors": 11,
175
+ "generation_truncated": 0,
176
+ "wrong_answer": 525,
177
+ "reference_non_numeric": 65,
178
+ "prediction_worker_failure": 1,
179
+ "prediction_runtime_error": 7,
180
+ "prediction_compile_error": 2,
181
+ "reference_runtime_error": 2,
182
+ "prediction_non_numeric": 1,
183
+ "pass_at_1": 0.729429581019687
184
+ },
185
+ "seconds": 55.70730614299828
186
+ },
187
+ {
188
+ "method": "window",
189
+ "beta": 1,
190
+ "epoch": 1000,
191
+ "validation": {
192
+ "loss": 0.27479878424285936,
193
+ "pass_correct": 1444,
194
+ "pass_total": 1981,
195
+ "reference_errors": 67,
196
+ "prediction_errors": 10,
197
+ "generation_truncated": 0,
198
+ "wrong_answer": 527,
199
+ "reference_non_numeric": 65,
200
+ "prediction_runtime_error": 7,
201
+ "prediction_compile_error": 2,
202
+ "reference_runtime_error": 2,
203
+ "prediction_non_numeric": 1,
204
+ "pass_at_1": 0.7289247854618879
205
+ },
206
+ "seconds": 57.479775672007236
207
+ },
208
+ {
209
+ "method": "original_best",
210
+ "beta": null,
211
+ "epoch": 940,
212
+ "validation": {
213
+ "loss": 0.27660289393428694,
214
+ "pass_correct": 1456,
215
+ "pass_total": 1981,
216
+ "reference_errors": 67,
217
+ "prediction_errors": 13,
218
+ "generation_truncated": 1,
219
+ "wrong_answer": 512,
220
+ "reference_non_numeric": 65,
221
+ "prediction_timeout": 2,
222
+ "prediction_runtime_error": 9,
223
+ "reference_runtime_error": 2,
224
+ "prediction_non_numeric": 1,
225
+ "pass_at_1": 0.734982332155477
226
+ },
227
+ "seconds": 87.40436319699802
228
+ },
229
+ {
230
+ "method": "anchored",
231
+ "beta": 0.9,
232
+ "epoch": 1000,
233
+ "validation": {
234
+ "loss": 0.2743012188449427,
235
+ "pass_correct": 1440,
236
+ "pass_total": 1981,
237
+ "reference_errors": 67,
238
+ "prediction_errors": 11,
239
+ "generation_truncated": 0,
240
+ "wrong_answer": 530,
241
+ "reference_non_numeric": 65,
242
+ "prediction_timeout": 1,
243
+ "prediction_runtime_error": 8,
244
+ "prediction_compile_error": 1,
245
+ "reference_runtime_error": 2,
246
+ "prediction_non_numeric": 1,
247
+ "pass_at_1": 0.7269056032306915
248
+ },
249
+ "seconds": 59.59972197499883
250
+ },
251
+ {
252
+ "method": "anchored",
253
+ "beta": 0.95,
254
+ "epoch": 1000,
255
+ "validation": {
256
+ "loss": 0.274784210971336,
257
+ "pass_correct": 1449,
258
+ "pass_total": 1981,
259
+ "reference_errors": 67,
260
+ "prediction_errors": 9,
261
+ "generation_truncated": 1,
262
+ "wrong_answer": 523,
263
+ "reference_non_numeric": 65,
264
+ "prediction_timeout": 1,
265
+ "prediction_runtime_error": 6,
266
+ "reference_runtime_error": 2,
267
+ "prediction_non_numeric": 1,
268
+ "pass_at_1": 0.7314487632508834
269
+ },
270
+ "seconds": 58.55224920500768
271
+ },
272
+ {
273
+ "method": "anchored",
274
+ "beta": 0.99,
275
+ "epoch": 1000,
276
+ "validation": {
277
+ "loss": 0.2760274481076102,
278
+ "pass_correct": 1458,
279
+ "pass_total": 1981,
280
+ "reference_errors": 67,
281
+ "prediction_errors": 13,
282
+ "generation_truncated": 1,
283
+ "wrong_answer": 510,
284
+ "reference_non_numeric": 65,
285
+ "prediction_timeout": 2,
286
+ "prediction_runtime_error": 9,
287
+ "reference_runtime_error": 2,
288
+ "prediction_non_numeric": 1,
289
+ "pass_at_1": 0.7359919232710752
290
+ },
291
+ "seconds": 59.038000005006324
292
+ }
293
+ ]
294
+ }
model.pt CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:be49d3f27bb8ce9664fab104b1d63a8e8ec6a58a3934638c3908d3a9c7c01b71
3
- size 214816243
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:314668dc1682ba531592ec78ff97a6d4622f052d3f38a8ad1a9a945cf3489d3c
3
+ size 365610467