void-818 commited on
Commit
5742a10
·
verified ·
1 Parent(s): 9c8d176

Add 17 files

Browse files
chat_template.jinja CHANGED
@@ -14,14 +14,6 @@
14
  {{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }}
15
  {%- endif %}
16
  {%- endif %}
17
- {%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}
18
- {%- for message in messages[::-1] %}
19
- {%- set index = (messages|length - 1) - loop.index0 %}
20
- {%- if ns.multi_step_tool and message.role == "user" and message.content is string and not(message.content.startswith('<tool_response>') and message.content.endswith('</tool_response>')) %}
21
- {%- set ns.multi_step_tool = false %}
22
- {%- set ns.last_query_index = index %}
23
- {%- endif %}
24
- {%- endfor %}
25
  {%- for message in messages %}
26
  {%- if message.content is string %}
27
  {%- set content = message.content %}
@@ -31,24 +23,7 @@
31
  {%- if (message.role == "user") or (message.role == "system" and not loop.first) %}
32
  {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }}
33
  {%- elif message.role == "assistant" %}
34
- {%- set reasoning_content = '' %}
35
- {%- if message.reasoning_content is string %}
36
- {%- set reasoning_content = message.reasoning_content %}
37
- {%- else %}
38
- {%- if '</think>' in content %}
39
- {%- set reasoning_content = content.split('</think>')[0].rstrip('\n').split('<think>')[-1].lstrip('\n') %}
40
- {%- set content = content.split('</think>')[-1].lstrip('\n') %}
41
- {%- endif %}
42
- {%- endif %}
43
- {%- if loop.index0 > ns.last_query_index %}
44
- {%- if loop.last or (not loop.last and reasoning_content) %}
45
- {{- '<|im_start|>' + message.role + '\n<think>\n' + reasoning_content.strip('\n') + '\n</think>\n\n' + content.lstrip('\n') }}
46
- {%- else %}
47
- {{- '<|im_start|>' + message.role + '\n' + content }}
48
- {%- endif %}
49
- {%- else %}
50
- {{- '<|im_start|>' + message.role + '\n' + content }}
51
- {%- endif %}
52
  {%- if message.tool_calls %}
53
  {%- for tool_call in message.tool_calls %}
54
  {%- if (loop.first and content) or (not loop.first) %}
 
14
  {{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }}
15
  {%- endif %}
16
  {%- endif %}
 
 
 
 
 
 
 
 
17
  {%- for message in messages %}
18
  {%- if message.content is string %}
19
  {%- set content = message.content %}
 
23
  {%- if (message.role == "user") or (message.role == "system" and not loop.first) %}
24
  {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }}
25
  {%- elif message.role == "assistant" %}
26
+ {{- '<|im_start|>' + message.role + '\n' + content }}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
  {%- if message.tool_calls %}
28
  {%- for tool_call in message.tool_calls %}
29
  {%- if (loop.first and content) or (not loop.first) %}
generation_config.json CHANGED
@@ -1,13 +1,12 @@
1
  {
2
- "bos_token_id": 151643,
3
  "do_sample": true,
4
  "eos_token_id": [
5
  151645,
6
  151643
7
  ],
8
  "pad_token_id": 151643,
9
- "temperature": 0.6,
10
  "top_k": 20,
11
- "top_p": 0.95,
12
  "transformers_version": "4.57.3"
13
  }
 
1
  {
 
2
  "do_sample": true,
3
  "eos_token_id": [
4
  151645,
5
  151643
6
  ],
7
  "pad_token_id": 151643,
8
+ "temperature": 0.7,
9
  "top_k": 20,
10
+ "top_p": 0.8,
11
  "transformers_version": "4.57.3"
12
  }
model-00001-of-00002.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:cd02404741f929f63daf265a1b0680437ff8fe18513d0213539216647564e0f7
3
- size 4967215455
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fd0a5d1fb55d9e9c23364942c6b2393506b1c5e8464bf56bcdfd7c853e91fc2c
3
+ size 4967215360
model-00002-of-00002.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:5f2a96932a017229f401f2a6fe98c3a1c3869283e3d637462980c11b070cfafa
3
- size 3077766730
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ed2dc0d1dcf4087574ffaf17728197a85fffb69dfb523ba2612be7e9f9aea85f
3
+ size 3077766632
optimizer.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ab31dab212f92003a2713452e366673d1d19f4c618c14149abb470903d19e029
3
+ size 16090219945
rng_state.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:098b29492211804ab324a36f37466821d948280bb74fce4ba895c03f13ecd878
3
+ size 14645
scheduler.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7242403044cccf39933e2344635dc740c47d5b24649c5690c6b12d08ca549e87
3
+ size 1465
tokenizer.json CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:aeb13307a71acd8fe81861d94ad54ab689df773318809eed3cbe794b4492dae4
3
- size 11422654
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c0acdaba32b920d640afb36af4396c91974e074735636e4016d17a8ed9c03730
3
+ size 11422753
tokenizer_config.json CHANGED
@@ -231,8 +231,9 @@
231
  "eos_token": "<|im_end|>",
232
  "errors": "replace",
233
  "extra_special_tokens": {},
234
- "model_max_length": 262144,
235
  "pad_token": "<|endoftext|>",
 
236
  "split_special_tokens": false,
237
  "tokenizer_class": "Qwen2Tokenizer",
238
  "unk_token": null
 
231
  "eos_token": "<|im_end|>",
232
  "errors": "replace",
233
  "extra_special_tokens": {},
234
+ "model_max_length": 16888,
235
  "pad_token": "<|endoftext|>",
236
+ "padding_side": "right",
237
  "split_special_tokens": false,
238
  "tokenizer_class": "Qwen2Tokenizer",
239
  "unk_token": null
trainer_state.json ADDED
@@ -0,0 +1,392 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_global_step": 500,
3
+ "best_metric": 0.02287970297038555,
4
+ "best_model_checkpoint": "./trained_model_20251223_131030/checkpoint-500",
5
+ "epoch": 0.36133694670280037,
6
+ "eval_steps": 500,
7
+ "global_step": 500,
8
+ "is_hyper_param_search": false,
9
+ "is_local_process_zero": true,
10
+ "is_world_process_zero": true,
11
+ "log_history": [
12
+ {
13
+ "epoch": 0.007226738934056007,
14
+ "grad_norm": 1.3359375,
15
+ "learning_rate": 1.44e-06,
16
+ "loss": 0.0529,
17
+ "step": 10
18
+ },
19
+ {
20
+ "epoch": 0.014453477868112014,
21
+ "grad_norm": 1.40625,
22
+ "learning_rate": 3.04e-06,
23
+ "loss": 0.0463,
24
+ "step": 20
25
+ },
26
+ {
27
+ "epoch": 0.02168021680216802,
28
+ "grad_norm": 0.80078125,
29
+ "learning_rate": 4.6400000000000005e-06,
30
+ "loss": 0.0295,
31
+ "step": 30
32
+ },
33
+ {
34
+ "epoch": 0.028906955736224028,
35
+ "grad_norm": 0.4140625,
36
+ "learning_rate": 6.24e-06,
37
+ "loss": 0.0233,
38
+ "step": 40
39
+ },
40
+ {
41
+ "epoch": 0.036133694670280034,
42
+ "grad_norm": 0.275390625,
43
+ "learning_rate": 7.840000000000001e-06,
44
+ "loss": 0.0192,
45
+ "step": 50
46
+ },
47
+ {
48
+ "epoch": 0.04336043360433604,
49
+ "grad_norm": 0.353515625,
50
+ "learning_rate": 9.440000000000001e-06,
51
+ "loss": 0.0184,
52
+ "step": 60
53
+ },
54
+ {
55
+ "epoch": 0.05058717253839205,
56
+ "grad_norm": 0.318359375,
57
+ "learning_rate": 1.1040000000000001e-05,
58
+ "loss": 0.0278,
59
+ "step": 70
60
+ },
61
+ {
62
+ "epoch": 0.057813911472448055,
63
+ "grad_norm": 0.494140625,
64
+ "learning_rate": 1.2640000000000001e-05,
65
+ "loss": 0.0219,
66
+ "step": 80
67
+ },
68
+ {
69
+ "epoch": 0.06504065040650407,
70
+ "grad_norm": 0.30859375,
71
+ "learning_rate": 1.4240000000000001e-05,
72
+ "loss": 0.0198,
73
+ "step": 90
74
+ },
75
+ {
76
+ "epoch": 0.07226738934056007,
77
+ "grad_norm": 0.408203125,
78
+ "learning_rate": 1.584e-05,
79
+ "loss": 0.0181,
80
+ "step": 100
81
+ },
82
+ {
83
+ "epoch": 0.07949412827461608,
84
+ "grad_norm": 0.31640625,
85
+ "learning_rate": 1.7440000000000002e-05,
86
+ "loss": 0.0177,
87
+ "step": 110
88
+ },
89
+ {
90
+ "epoch": 0.08672086720867209,
91
+ "grad_norm": 0.2734375,
92
+ "learning_rate": 1.904e-05,
93
+ "loss": 0.0184,
94
+ "step": 120
95
+ },
96
+ {
97
+ "epoch": 0.0939476061427281,
98
+ "grad_norm": 0.314453125,
99
+ "learning_rate": 1.99801340948597e-05,
100
+ "loss": 0.0191,
101
+ "step": 130
102
+ },
103
+ {
104
+ "epoch": 0.1011743450767841,
105
+ "grad_norm": 0.55078125,
106
+ "learning_rate": 1.9930469332008943e-05,
107
+ "loss": 0.0178,
108
+ "step": 140
109
+ },
110
+ {
111
+ "epoch": 0.10840108401084012,
112
+ "grad_norm": 0.2197265625,
113
+ "learning_rate": 1.9880804569158184e-05,
114
+ "loss": 0.018,
115
+ "step": 150
116
+ },
117
+ {
118
+ "epoch": 0.11562782294489611,
119
+ "grad_norm": 0.259765625,
120
+ "learning_rate": 1.9831139806307428e-05,
121
+ "loss": 0.0188,
122
+ "step": 160
123
+ },
124
+ {
125
+ "epoch": 0.12285456187895212,
126
+ "grad_norm": 0.88671875,
127
+ "learning_rate": 1.9781475043456668e-05,
128
+ "loss": 0.0217,
129
+ "step": 170
130
+ },
131
+ {
132
+ "epoch": 0.13008130081300814,
133
+ "grad_norm": 0.404296875,
134
+ "learning_rate": 1.9731810280605912e-05,
135
+ "loss": 0.0185,
136
+ "step": 180
137
+ },
138
+ {
139
+ "epoch": 0.13730803974706413,
140
+ "grad_norm": 0.228515625,
141
+ "learning_rate": 1.9682145517755153e-05,
142
+ "loss": 0.029,
143
+ "step": 190
144
+ },
145
+ {
146
+ "epoch": 0.14453477868112014,
147
+ "grad_norm": 0.384765625,
148
+ "learning_rate": 1.9632480754904396e-05,
149
+ "loss": 0.0262,
150
+ "step": 200
151
+ },
152
+ {
153
+ "epoch": 0.15176151761517614,
154
+ "grad_norm": 0.375,
155
+ "learning_rate": 1.9582815992053637e-05,
156
+ "loss": 0.0193,
157
+ "step": 210
158
+ },
159
+ {
160
+ "epoch": 0.15898825654923215,
161
+ "grad_norm": 0.6328125,
162
+ "learning_rate": 1.953315122920288e-05,
163
+ "loss": 0.03,
164
+ "step": 220
165
+ },
166
+ {
167
+ "epoch": 0.16621499548328816,
168
+ "grad_norm": 0.53515625,
169
+ "learning_rate": 1.9483486466352125e-05,
170
+ "loss": 0.0226,
171
+ "step": 230
172
+ },
173
+ {
174
+ "epoch": 0.17344173441734417,
175
+ "grad_norm": 0.35546875,
176
+ "learning_rate": 1.943382170350137e-05,
177
+ "loss": 0.0191,
178
+ "step": 240
179
+ },
180
+ {
181
+ "epoch": 0.18066847335140018,
182
+ "grad_norm": 0.4296875,
183
+ "learning_rate": 1.938415694065061e-05,
184
+ "loss": 0.0185,
185
+ "step": 250
186
+ },
187
+ {
188
+ "epoch": 0.1878952122854562,
189
+ "grad_norm": 0.37109375,
190
+ "learning_rate": 1.9334492177799853e-05,
191
+ "loss": 0.0203,
192
+ "step": 260
193
+ },
194
+ {
195
+ "epoch": 0.1951219512195122,
196
+ "grad_norm": 0.466796875,
197
+ "learning_rate": 1.9284827414949094e-05,
198
+ "loss": 0.0179,
199
+ "step": 270
200
+ },
201
+ {
202
+ "epoch": 0.2023486901535682,
203
+ "grad_norm": 0.32421875,
204
+ "learning_rate": 1.9235162652098338e-05,
205
+ "loss": 0.0193,
206
+ "step": 280
207
+ },
208
+ {
209
+ "epoch": 0.20957542908762422,
210
+ "grad_norm": 0.330078125,
211
+ "learning_rate": 1.9185497889247578e-05,
212
+ "loss": 0.0169,
213
+ "step": 290
214
+ },
215
+ {
216
+ "epoch": 0.21680216802168023,
217
+ "grad_norm": 0.35546875,
218
+ "learning_rate": 1.9135833126396822e-05,
219
+ "loss": 0.0184,
220
+ "step": 300
221
+ },
222
+ {
223
+ "epoch": 0.2240289069557362,
224
+ "grad_norm": 0.27734375,
225
+ "learning_rate": 1.9086168363546066e-05,
226
+ "loss": 0.0239,
227
+ "step": 310
228
+ },
229
+ {
230
+ "epoch": 0.23125564588979222,
231
+ "grad_norm": 0.275390625,
232
+ "learning_rate": 1.903650360069531e-05,
233
+ "loss": 0.0234,
234
+ "step": 320
235
+ },
236
+ {
237
+ "epoch": 0.23848238482384823,
238
+ "grad_norm": 0.408203125,
239
+ "learning_rate": 1.898683883784455e-05,
240
+ "loss": 0.0199,
241
+ "step": 330
242
+ },
243
+ {
244
+ "epoch": 0.24570912375790424,
245
+ "grad_norm": 0.365234375,
246
+ "learning_rate": 1.8937174074993794e-05,
247
+ "loss": 0.0191,
248
+ "step": 340
249
+ },
250
+ {
251
+ "epoch": 0.2529358626919603,
252
+ "grad_norm": 0.298828125,
253
+ "learning_rate": 1.8887509312143035e-05,
254
+ "loss": 0.0179,
255
+ "step": 350
256
+ },
257
+ {
258
+ "epoch": 0.2601626016260163,
259
+ "grad_norm": 0.58203125,
260
+ "learning_rate": 1.883784454929228e-05,
261
+ "loss": 0.018,
262
+ "step": 360
263
+ },
264
+ {
265
+ "epoch": 0.26738934056007224,
266
+ "grad_norm": 0.298828125,
267
+ "learning_rate": 1.878817978644152e-05,
268
+ "loss": 0.0213,
269
+ "step": 370
270
+ },
271
+ {
272
+ "epoch": 0.27461607949412825,
273
+ "grad_norm": 0.453125,
274
+ "learning_rate": 1.8738515023590763e-05,
275
+ "loss": 0.0182,
276
+ "step": 380
277
+ },
278
+ {
279
+ "epoch": 0.28184281842818426,
280
+ "grad_norm": 0.33203125,
281
+ "learning_rate": 1.8688850260740007e-05,
282
+ "loss": 0.0306,
283
+ "step": 390
284
+ },
285
+ {
286
+ "epoch": 0.28906955736224027,
287
+ "grad_norm": 0.31640625,
288
+ "learning_rate": 1.8639185497889248e-05,
289
+ "loss": 0.0438,
290
+ "step": 400
291
+ },
292
+ {
293
+ "epoch": 0.2962962962962963,
294
+ "grad_norm": 0.4375,
295
+ "learning_rate": 1.8589520735038492e-05,
296
+ "loss": 0.0594,
297
+ "step": 410
298
+ },
299
+ {
300
+ "epoch": 0.3035230352303523,
301
+ "grad_norm": 0.2734375,
302
+ "learning_rate": 1.8539855972187736e-05,
303
+ "loss": 0.0182,
304
+ "step": 420
305
+ },
306
+ {
307
+ "epoch": 0.3107497741644083,
308
+ "grad_norm": 0.291015625,
309
+ "learning_rate": 1.8490191209336976e-05,
310
+ "loss": 0.0193,
311
+ "step": 430
312
+ },
313
+ {
314
+ "epoch": 0.3179765130984643,
315
+ "grad_norm": 0.431640625,
316
+ "learning_rate": 1.844052644648622e-05,
317
+ "loss": 0.0178,
318
+ "step": 440
319
+ },
320
+ {
321
+ "epoch": 0.3252032520325203,
322
+ "grad_norm": 0.283203125,
323
+ "learning_rate": 1.839086168363546e-05,
324
+ "loss": 0.0197,
325
+ "step": 450
326
+ },
327
+ {
328
+ "epoch": 0.3324299909665763,
329
+ "grad_norm": 0.427734375,
330
+ "learning_rate": 1.8341196920784705e-05,
331
+ "loss": 0.0219,
332
+ "step": 460
333
+ },
334
+ {
335
+ "epoch": 0.33965672990063234,
336
+ "grad_norm": 0.28125,
337
+ "learning_rate": 1.8291532157933945e-05,
338
+ "loss": 0.0185,
339
+ "step": 470
340
+ },
341
+ {
342
+ "epoch": 0.34688346883468835,
343
+ "grad_norm": 1.15625,
344
+ "learning_rate": 1.824186739508319e-05,
345
+ "loss": 0.0396,
346
+ "step": 480
347
+ },
348
+ {
349
+ "epoch": 0.35411020776874436,
350
+ "grad_norm": 0.3984375,
351
+ "learning_rate": 1.8192202632232433e-05,
352
+ "loss": 0.0287,
353
+ "step": 490
354
+ },
355
+ {
356
+ "epoch": 0.36133694670280037,
357
+ "grad_norm": 0.318359375,
358
+ "learning_rate": 1.8142537869381677e-05,
359
+ "loss": 0.0189,
360
+ "step": 500
361
+ },
362
+ {
363
+ "epoch": 0.36133694670280037,
364
+ "eval_loss": 0.02287970297038555,
365
+ "eval_runtime": 43.4357,
366
+ "eval_samples_per_second": 26.844,
367
+ "eval_steps_per_second": 6.723,
368
+ "step": 500
369
+ }
370
+ ],
371
+ "logging_steps": 10,
372
+ "max_steps": 4152,
373
+ "num_input_tokens_seen": 0,
374
+ "num_train_epochs": 3,
375
+ "save_steps": 500,
376
+ "stateful_callbacks": {
377
+ "TrainerControl": {
378
+ "args": {
379
+ "should_epoch_stop": false,
380
+ "should_evaluate": false,
381
+ "should_log": false,
382
+ "should_save": true,
383
+ "should_training_stop": false
384
+ },
385
+ "attributes": {}
386
+ }
387
+ },
388
+ "total_flos": 2.0917465462974874e+17,
389
+ "train_batch_size": 4,
390
+ "trial_name": null,
391
+ "trial_params": null
392
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2934171f5cebc30444d6719c8cd810adec3f2252b2c17b1c00f83891aab2b503
3
+ size 5841