jiteshkprasad commited on
Commit
08fc037
·
verified ·
1 Parent(s): 0af1d3a

Add sft/3-passes from udgamlabs/udgam3-sft

Browse files
sft/3-passes/ckpt/meta_000162.json ADDED
@@ -0,0 +1,702 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "step": 162,
3
+ "model_config": {
4
+ "sequence_len": 16384,
5
+ "vocab_size": 32768,
6
+ "n_layer": 28,
7
+ "n_head": 10,
8
+ "n_kv_head": 2,
9
+ "n_embd": 640,
10
+ "head_dim": 64,
11
+ "global_head_dim": 128,
12
+ "intermediate_size": 1792,
13
+ "ple_dim": 0,
14
+ "window_pattern": "SSSL",
15
+ "sliding_window": 512,
16
+ "rope_theta_sliding": 10000.0,
17
+ "rope_theta_full": 1000000.0,
18
+ "final_logit_softcap": 15.0,
19
+ "rms_norm_eps": 1e-06,
20
+ "loop_start": -1,
21
+ "loop_end": -1,
22
+ "n_loops": 1,
23
+ "mtp": false,
24
+ "loop_loss": false,
25
+ "loop_loss_stride": 4,
26
+ "loop_loss_weight": -1.0,
27
+ "loop_reinject": false,
28
+ "abacus": 0,
29
+ "abacus_offset": 0,
30
+ "digit_ids": [
31
+ 291,
32
+ 292,
33
+ 293,
34
+ 294,
35
+ 295,
36
+ 296,
37
+ 297,
38
+ 298,
39
+ 299,
40
+ 300
41
+ ],
42
+ "digit_space_ids": [
43
+ 1150,
44
+ 958,
45
+ 994,
46
+ 1106,
47
+ 1189,
48
+ 1182,
49
+ 1348,
50
+ 1506,
51
+ 1500,
52
+ 1564
53
+ ],
54
+ "tie_embeddings": true
55
+ },
56
+ "user_config": {
57
+ "train": "/content/sftdata/v1-laghu/train.parquet",
58
+ "val": "/content/sftdata/v1-laghu/val.parquet",
59
+ "init_from": "/content/init/udgam3-ctx32k/model_001900.pt",
60
+ "init_meta": "/content/init/udgam3-ctx32k/meta_001900.json",
61
+ "init_optim": "",
62
+ "mix": "{\"identity\":6,\"*\":3}",
63
+ "replay_frac": 0.0,
64
+ "replay_srcs": "nemo_chat,synth",
65
+ "out": "/content/sft_out",
66
+ "run": "dummy",
67
+ "seq": 16384,
68
+ "device_batch": 4,
69
+ "total_batch": 262144,
70
+ "matrix_lr": 0.0071,
71
+ "embedding_lr": 0.106,
72
+ "unembedding_lr": 0.0028,
73
+ "scalar_lr": 0.177,
74
+ "warmup_frac": 0.05,
75
+ "warmdown_frac": 0.5,
76
+ "final_lr_frac": 0.0,
77
+ "eval_every": 20,
78
+ "save_at": "0.5,1.0",
79
+ "seed": 1234,
80
+ "max_steps": -1,
81
+ "new_token_ids": "5-16"
82
+ },
83
+ "init_from": "/content/init/udgam3-ctx32k/model_001900.pt",
84
+ "max_seq_len": 16384,
85
+ "composition": {
86
+ "chat:rewriting_editing": [
87
+ 2100,
88
+ 434934,
89
+ 238782
90
+ ],
91
+ "chat:brainstorming_lists": [
92
+ 2619,
93
+ 964734,
94
+ 821628
95
+ ],
96
+ "chat_thinking:explain_teach": [
97
+ 1611,
98
+ 687321,
99
+ 625722
100
+ ],
101
+ "system_prompts:generated_in_scope": [
102
+ 1914,
103
+ 355722,
104
+ 168801
105
+ ],
106
+ "python_tool:math": [
107
+ 1389,
108
+ 326991,
109
+ 133128
110
+ ],
111
+ "chat:practical_advice": [
112
+ 3738,
113
+ 1528827,
114
+ 1331616
115
+ ],
116
+ "gen_mt:shorter": [
117
+ 2538,
118
+ 1055919,
119
+ 822498
120
+ ],
121
+ "instruction_following:writing_create": [
122
+ 2136,
123
+ 662523,
124
+ 536688
125
+ ],
126
+ "chat:code_help": [
127
+ 4179,
128
+ 2054292,
129
+ 1755198
130
+ ],
131
+ "instruction_following:explain_teach": [
132
+ 2223,
133
+ 712557,
134
+ 583851
135
+ ],
136
+ "maths_logic:gsm8k_train": [
137
+ 4335,
138
+ 687201,
139
+ 359937
140
+ ],
141
+ "gen_mt:another": [
142
+ 3444,
143
+ 1464297,
144
+ 1144245
145
+ ],
146
+ "gen_mt:switch": [
147
+ 3366,
148
+ 1334736,
149
+ 1008918
150
+ ],
151
+ "gen_mt:vague": [
152
+ 5712,
153
+ 2019843,
154
+ 1860093
155
+ ],
156
+ "maths_logic:code_trace": [
157
+ 1878,
158
+ 527874,
159
+ 249465
160
+ ],
161
+ "gen_mt:simpler": [
162
+ 2010,
163
+ 858960,
164
+ 674292
165
+ ],
166
+ "system_prompts:json_ac": [
167
+ 108,
168
+ 29196,
169
+ 21294
170
+ ],
171
+ "gen_mt:and_x": [
172
+ 3816,
173
+ 1794006,
174
+ 1450017
175
+ ],
176
+ "safety:fake_documents:answer": [
177
+ 84,
178
+ 19446,
179
+ 17385
180
+ ],
181
+ "python_tool:prob_gen": [
182
+ 3948,
183
+ 1331163,
184
+ 551478
185
+ ],
186
+ "maths_logic:math_train": [
187
+ 4305,
188
+ 735804,
189
+ 449460
190
+ ],
191
+ "maths_logic:gsm_xcheck": [
192
+ 4305,
193
+ 1063422,
194
+ 539043
195
+ ],
196
+ "safety:gambling_scams:decline": [
197
+ 84,
198
+ 6909,
199
+ 4437
200
+ ],
201
+ "chat_thinking:brainstorming_lists": [
202
+ 477,
203
+ 222402,
204
+ 193917
205
+ ],
206
+ "python_tool:gsm_xcheck": [
207
+ 1353,
208
+ 429567,
209
+ 182127
210
+ ],
211
+ "maths_logic:prob_gen": [
212
+ 8412,
213
+ 2216217,
214
+ 1108095
215
+ ],
216
+ "gen_mt:dig": [
217
+ 3663,
218
+ 1526181,
219
+ 1176369
220
+ ],
221
+ "system_prompts:kid7": [
222
+ 42,
223
+ 10518,
224
+ 8046
225
+ ],
226
+ "long_documents:wikipedia": [
227
+ 1128,
228
+ 11974323,
229
+ 136944
230
+ ],
231
+ "json_function_calls:parallel": [
232
+ 858,
233
+ 510564,
234
+ 135153
235
+ ],
236
+ "instruction_following:brainstorming_lists": [
237
+ 1218,
238
+ 351861,
239
+ 278550
240
+ ],
241
+ "gen_mt:refine": [
242
+ 2997,
243
+ 1425336,
244
+ 1143102
245
+ ],
246
+ "chat:factual_qa": [
247
+ 3906,
248
+ 1110360,
249
+ 960708
250
+ ],
251
+ "json_function_calls:single": [
252
+ 1683,
253
+ 950133,
254
+ 189720
255
+ ],
256
+ "safety:malware:decline": [
257
+ 81,
258
+ 6408,
259
+ 4236
260
+ ],
261
+ "long_documents:finepdfs_edu": [
262
+ 3084,
263
+ 32567547,
264
+ 340038
265
+ ],
266
+ "chat:writing_create": [
267
+ 3075,
268
+ 1110354,
269
+ 953760
270
+ ],
271
+ "python_tool:code_trace": [
272
+ 1428,
273
+ 578373,
274
+ 275139
275
+ ],
276
+ "chat:summarising": [
277
+ 765,
278
+ 361239,
279
+ 125811
280
+ ],
281
+ "chat:explain_teach": [
282
+ 3693,
283
+ 1349955,
284
+ 1183155
285
+ ],
286
+ "system_prompts:socratic": [
287
+ 114,
288
+ 25539,
289
+ 10494
290
+ ],
291
+ "maths_logic:logic": [
292
+ 3069,
293
+ 592161,
294
+ 315126
295
+ ],
296
+ "chat_thinking:practical_advice": [
297
+ 972,
298
+ 433635,
299
+ 387876
300
+ ],
301
+ "safety:weapons:answer": [
302
+ 75,
303
+ 19539,
304
+ 17478
305
+ ],
306
+ "python_tool:utility": [
307
+ 720,
308
+ 202047,
309
+ 101373
310
+ ],
311
+ "gen_mt:calc": [
312
+ 2001,
313
+ 788205,
314
+ 602892
315
+ ],
316
+ "safety:dangerous_chemistry:decline": [
317
+ 78,
318
+ 5865,
319
+ 3681
320
+ ],
321
+ "system_prompts:plain": [
322
+ 75,
323
+ 17163,
324
+ 12726
325
+ ],
326
+ "instruction_following:practical_advice": [
327
+ 2064,
328
+ 709470,
329
+ 583935
330
+ ],
331
+ "instruction_following:factual_qa": [
332
+ 2415,
333
+ 542913,
334
+ 409167
335
+ ],
336
+ "safety:drugs:answer": [
337
+ 81,
338
+ 20907,
339
+ 18852
340
+ ],
341
+ "instruction_following:code_help": [
342
+ 1173,
343
+ 570387,
344
+ 505635
345
+ ],
346
+ "system_prompts:british": [
347
+ 99,
348
+ 26610,
349
+ 21801
350
+ ],
351
+ "chat_thinking:factual_qa": [
352
+ 645,
353
+ 202728,
354
+ 181188
355
+ ],
356
+ "gen_mt:thanks": [
357
+ 1617,
358
+ 612861,
359
+ 468999
360
+ ],
361
+ "json_function_calls:no_call": [
362
+ 294,
363
+ 117741,
364
+ 20442
365
+ ],
366
+ "json_function_calls:clarify": [
367
+ 723,
368
+ 275565,
369
+ 31977
370
+ ],
371
+ "system_prompts:brief2": [
372
+ 78,
373
+ 8775,
374
+ 5016
375
+ ],
376
+ "system_prompts:ask_first": [
377
+ 108,
378
+ 30597,
379
+ 24564
380
+ ],
381
+ "system_prompts:eli12": [
382
+ 57,
383
+ 16629,
384
+ 13260
385
+ ],
386
+ "safety:stalking:decline": [
387
+ 81,
388
+ 6048,
389
+ 3819
390
+ ],
391
+ "safety:extremism:answer": [
392
+ 84,
393
+ 23385,
394
+ 21060
395
+ ],
396
+ "safety:stalking:answer": [
397
+ 81,
398
+ 19965,
399
+ 17814
400
+ ],
401
+ "identity:identity": [
402
+ 2334,
403
+ 147690,
404
+ 99402
405
+ ],
406
+ "json_function_calls:multi_step": [
407
+ 861,
408
+ 556986,
409
+ 126048
410
+ ],
411
+ "safety:misinformation:decline": [
412
+ 81,
413
+ 6324,
414
+ 4170
415
+ ],
416
+ "system_prompts:generated_out_of_scope": [
417
+ 357,
418
+ 55455,
419
+ 21756
420
+ ],
421
+ "safety:privacy:decline": [
422
+ 78,
423
+ 5916,
424
+ 3810
425
+ ],
426
+ "chat_thinking:writing_create": [
427
+ 249,
428
+ 100368,
429
+ 83361
430
+ ],
431
+ "system_prompts:steps": [
432
+ 102,
433
+ 28950,
434
+ 23574
435
+ ],
436
+ "safety:academic_cheating:decline": [
437
+ 81,
438
+ 5961,
439
+ 3624
440
+ ],
441
+ "chat_thinking:code_help": [
442
+ 459,
443
+ 232383,
444
+ 201702
445
+ ],
446
+ "safety:malware:answer": [
447
+ 81,
448
+ 21480,
449
+ 19401
450
+ ],
451
+ "safety:theft:decline": [
452
+ 81,
453
+ 5211,
454
+ 3138
455
+ ],
456
+ "system_prompts:answer_why": [
457
+ 78,
458
+ 12186,
459
+ 7134
460
+ ],
461
+ "system_prompts:examples2": [
462
+ 105,
463
+ 34473,
464
+ 27888
465
+ ],
466
+ "safety:medical_risk:decline": [
467
+ 81,
468
+ 6774,
469
+ 4359
470
+ ],
471
+ "chat:casual_conversation": [
472
+ 621,
473
+ 76464,
474
+ 46695
475
+ ],
476
+ "system_prompts:tldr_first": [
477
+ 108,
478
+ 34662,
479
+ 27651
480
+ ],
481
+ "system_prompts:formal": [
482
+ 105,
483
+ 31218,
484
+ 25107
485
+ ],
486
+ "safety:drugs:decline": [
487
+ 78,
488
+ 5184,
489
+ 3195
490
+ ],
491
+ "system_prompts:learner": [
492
+ 105,
493
+ 32475,
494
+ 24435
495
+ ],
496
+ "safety:privacy:answer": [
497
+ 81,
498
+ 19998,
499
+ 17940
500
+ ],
501
+ "safety:self_harm:answer": [
502
+ 81,
503
+ 19716,
504
+ 17367
505
+ ],
506
+ "safety:fake_documents:decline": [
507
+ 84,
508
+ 6426,
509
+ 4215
510
+ ],
511
+ "safety:harassment:answer": [
512
+ 75,
513
+ 17394,
514
+ 15300
515
+ ],
516
+ "safety:fraud:answer": [
517
+ 81,
518
+ 21204,
519
+ 19143
520
+ ],
521
+ "safety:misinformation:answer": [
522
+ 81,
523
+ 20541,
524
+ 18558
525
+ ],
526
+ "system_prompts:bold_first": [
527
+ 108,
528
+ 38562,
529
+ 31800
530
+ ],
531
+ "safety:gambling_scams:answer": [
532
+ 81,
533
+ 21741,
534
+ 19506
535
+ ],
536
+ "safety:self_harm:support": [
537
+ 81,
538
+ 6837,
539
+ 4548
540
+ ],
541
+ "safety:animal_cruelty:decline": [
542
+ 78,
543
+ 6372,
544
+ 4035
545
+ ],
546
+ "system_prompts:max3sent": [
547
+ 93,
548
+ 13542,
549
+ 8865
550
+ ],
551
+ "system_prompts:tutor_q": [
552
+ 96,
553
+ 30651,
554
+ 24348
555
+ ],
556
+ "safety:cheating_partner:answer": [
557
+ 81,
558
+ 19755,
559
+ 17757
560
+ ],
561
+ "safety:harassment:decline": [
562
+ 81,
563
+ 6357,
564
+ 3891
565
+ ],
566
+ "safety:medical_risk:answer": [
567
+ 84,
568
+ 18705,
569
+ 16527
570
+ ],
571
+ "safety:theft:answer": [
572
+ 84,
573
+ 19842,
574
+ 17766
575
+ ],
576
+ "safety:cheating_partner:decline": [
577
+ 84,
578
+ 6198,
579
+ 3978
580
+ ],
581
+ "system_prompts:no_jargon": [
582
+ 96,
583
+ 28176,
584
+ 22752
585
+ ],
586
+ "system_prompts:encouraging": [
587
+ 108,
588
+ 31596,
589
+ 24756
590
+ ],
591
+ "safety:explicit_content:decline": [
592
+ 66,
593
+ 4479,
594
+ 2601
595
+ ],
596
+ "safety:violence:answer": [
597
+ 81,
598
+ 19083,
599
+ 16797
600
+ ],
601
+ "identity:identity_name": [
602
+ 66,
603
+ 4074,
604
+ 2856
605
+ ],
606
+ "system_prompts:recommend3": [
607
+ 75,
608
+ 17718,
609
+ 14007
610
+ ],
611
+ "system_prompts:bullets3": [
612
+ 90,
613
+ 14106,
614
+ 9504
615
+ ],
616
+ "safety:dangerous_challenges:decline": [
617
+ 84,
618
+ 7275,
619
+ 4584
620
+ ],
621
+ "safety:violence:decline": [
622
+ 78,
623
+ 6012,
624
+ 3759
625
+ ],
626
+ "safety:animal_cruelty:answer": [
627
+ 78,
628
+ 19392,
629
+ 17205
630
+ ],
631
+ "safety:dangerous_challenges:answer": [
632
+ 81,
633
+ 20880,
634
+ 18453
635
+ ],
636
+ "safety:dangerous_chemistry:answer": [
637
+ 75,
638
+ 17070,
639
+ 15063
640
+ ],
641
+ "safety:fraud:decline": [
642
+ 81,
643
+ 6270,
644
+ 4038
645
+ ],
646
+ "safety:weapons:decline": [
647
+ 75,
648
+ 5580,
649
+ 3534
650
+ ],
651
+ "system_prompts:table_cmp": [
652
+ 105,
653
+ 30825,
654
+ 23466
655
+ ],
656
+ "safety:explicit_content:answer": [
657
+ 78,
658
+ 19491,
659
+ 17373
660
+ ],
661
+ "safety:break_in:answer": [
662
+ 81,
663
+ 19341,
664
+ 17151
665
+ ],
666
+ "safety:extremism:decline": [
667
+ 75,
668
+ 5679,
669
+ 3459
670
+ ],
671
+ "safety:break_in:decline": [
672
+ 78,
673
+ 5880,
674
+ 3657
675
+ ],
676
+ "safety:academic_cheating:answer": [
677
+ 81,
678
+ 19419,
679
+ 17166
680
+ ],
681
+ "system_prompts:under50": [
682
+ 81,
683
+ 8340,
684
+ 4596
685
+ ]
686
+ },
687
+ "val": {
688
+ "step": 162,
689
+ "gen_mt": 1.8066579686258795,
690
+ "chat": 2.387618885517841,
691
+ "long_documents": 1.476884131900148,
692
+ "maths_logic": 0.8749269619703092,
693
+ "system_prompts": 2.293340600549553,
694
+ "chat_thinking": 2.1930235287979967,
695
+ "instruction_following": 2.084354009816947,
696
+ "python_tool": 0.5805621029487368,
697
+ "json_function_calls": 0.7266983169693131,
698
+ "identity": 0.09032914776363005,
699
+ "safety": 2.52205517578125,
700
+ "all": 1.8538731922941574
701
+ }
702
+ }
sft/3-passes/ckpt/meta_000323.json ADDED
@@ -0,0 +1,702 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "step": 323,
3
+ "model_config": {
4
+ "sequence_len": 16384,
5
+ "vocab_size": 32768,
6
+ "n_layer": 28,
7
+ "n_head": 10,
8
+ "n_kv_head": 2,
9
+ "n_embd": 640,
10
+ "head_dim": 64,
11
+ "global_head_dim": 128,
12
+ "intermediate_size": 1792,
13
+ "ple_dim": 0,
14
+ "window_pattern": "SSSL",
15
+ "sliding_window": 512,
16
+ "rope_theta_sliding": 10000.0,
17
+ "rope_theta_full": 1000000.0,
18
+ "final_logit_softcap": 15.0,
19
+ "rms_norm_eps": 1e-06,
20
+ "loop_start": -1,
21
+ "loop_end": -1,
22
+ "n_loops": 1,
23
+ "mtp": false,
24
+ "loop_loss": false,
25
+ "loop_loss_stride": 4,
26
+ "loop_loss_weight": -1.0,
27
+ "loop_reinject": false,
28
+ "abacus": 0,
29
+ "abacus_offset": 0,
30
+ "digit_ids": [
31
+ 291,
32
+ 292,
33
+ 293,
34
+ 294,
35
+ 295,
36
+ 296,
37
+ 297,
38
+ 298,
39
+ 299,
40
+ 300
41
+ ],
42
+ "digit_space_ids": [
43
+ 1150,
44
+ 958,
45
+ 994,
46
+ 1106,
47
+ 1189,
48
+ 1182,
49
+ 1348,
50
+ 1506,
51
+ 1500,
52
+ 1564
53
+ ],
54
+ "tie_embeddings": true
55
+ },
56
+ "user_config": {
57
+ "train": "/content/sftdata/v1-laghu/train.parquet",
58
+ "val": "/content/sftdata/v1-laghu/val.parquet",
59
+ "init_from": "/content/init/udgam3-ctx32k/model_001900.pt",
60
+ "init_meta": "/content/init/udgam3-ctx32k/meta_001900.json",
61
+ "init_optim": "",
62
+ "mix": "{\"identity\":6,\"*\":3}",
63
+ "replay_frac": 0.0,
64
+ "replay_srcs": "nemo_chat,synth",
65
+ "out": "/content/sft_out",
66
+ "run": "dummy",
67
+ "seq": 16384,
68
+ "device_batch": 4,
69
+ "total_batch": 262144,
70
+ "matrix_lr": 0.0071,
71
+ "embedding_lr": 0.106,
72
+ "unembedding_lr": 0.0028,
73
+ "scalar_lr": 0.177,
74
+ "warmup_frac": 0.05,
75
+ "warmdown_frac": 0.5,
76
+ "final_lr_frac": 0.0,
77
+ "eval_every": 20,
78
+ "save_at": "0.5,1.0",
79
+ "seed": 1234,
80
+ "max_steps": -1,
81
+ "new_token_ids": "5-16"
82
+ },
83
+ "init_from": "/content/init/udgam3-ctx32k/model_001900.pt",
84
+ "max_seq_len": 16384,
85
+ "composition": {
86
+ "chat:rewriting_editing": [
87
+ 2100,
88
+ 434934,
89
+ 238782
90
+ ],
91
+ "chat:brainstorming_lists": [
92
+ 2619,
93
+ 964734,
94
+ 821628
95
+ ],
96
+ "chat_thinking:explain_teach": [
97
+ 1611,
98
+ 687321,
99
+ 625722
100
+ ],
101
+ "system_prompts:generated_in_scope": [
102
+ 1914,
103
+ 355722,
104
+ 168801
105
+ ],
106
+ "python_tool:math": [
107
+ 1389,
108
+ 326991,
109
+ 133128
110
+ ],
111
+ "chat:practical_advice": [
112
+ 3738,
113
+ 1528827,
114
+ 1331616
115
+ ],
116
+ "gen_mt:shorter": [
117
+ 2538,
118
+ 1055919,
119
+ 822498
120
+ ],
121
+ "instruction_following:writing_create": [
122
+ 2136,
123
+ 662523,
124
+ 536688
125
+ ],
126
+ "chat:code_help": [
127
+ 4179,
128
+ 2054292,
129
+ 1755198
130
+ ],
131
+ "instruction_following:explain_teach": [
132
+ 2223,
133
+ 712557,
134
+ 583851
135
+ ],
136
+ "maths_logic:gsm8k_train": [
137
+ 4335,
138
+ 687201,
139
+ 359937
140
+ ],
141
+ "gen_mt:another": [
142
+ 3444,
143
+ 1464297,
144
+ 1144245
145
+ ],
146
+ "gen_mt:switch": [
147
+ 3366,
148
+ 1334736,
149
+ 1008918
150
+ ],
151
+ "gen_mt:vague": [
152
+ 5712,
153
+ 2019843,
154
+ 1860093
155
+ ],
156
+ "maths_logic:code_trace": [
157
+ 1878,
158
+ 527874,
159
+ 249465
160
+ ],
161
+ "gen_mt:simpler": [
162
+ 2010,
163
+ 858960,
164
+ 674292
165
+ ],
166
+ "system_prompts:json_ac": [
167
+ 108,
168
+ 29196,
169
+ 21294
170
+ ],
171
+ "gen_mt:and_x": [
172
+ 3816,
173
+ 1794006,
174
+ 1450017
175
+ ],
176
+ "safety:fake_documents:answer": [
177
+ 84,
178
+ 19446,
179
+ 17385
180
+ ],
181
+ "python_tool:prob_gen": [
182
+ 3948,
183
+ 1331163,
184
+ 551478
185
+ ],
186
+ "maths_logic:math_train": [
187
+ 4305,
188
+ 735804,
189
+ 449460
190
+ ],
191
+ "maths_logic:gsm_xcheck": [
192
+ 4305,
193
+ 1063422,
194
+ 539043
195
+ ],
196
+ "safety:gambling_scams:decline": [
197
+ 84,
198
+ 6909,
199
+ 4437
200
+ ],
201
+ "chat_thinking:brainstorming_lists": [
202
+ 477,
203
+ 222402,
204
+ 193917
205
+ ],
206
+ "python_tool:gsm_xcheck": [
207
+ 1353,
208
+ 429567,
209
+ 182127
210
+ ],
211
+ "maths_logic:prob_gen": [
212
+ 8412,
213
+ 2216217,
214
+ 1108095
215
+ ],
216
+ "gen_mt:dig": [
217
+ 3663,
218
+ 1526181,
219
+ 1176369
220
+ ],
221
+ "system_prompts:kid7": [
222
+ 42,
223
+ 10518,
224
+ 8046
225
+ ],
226
+ "long_documents:wikipedia": [
227
+ 1128,
228
+ 11974323,
229
+ 136944
230
+ ],
231
+ "json_function_calls:parallel": [
232
+ 858,
233
+ 510564,
234
+ 135153
235
+ ],
236
+ "instruction_following:brainstorming_lists": [
237
+ 1218,
238
+ 351861,
239
+ 278550
240
+ ],
241
+ "gen_mt:refine": [
242
+ 2997,
243
+ 1425336,
244
+ 1143102
245
+ ],
246
+ "chat:factual_qa": [
247
+ 3906,
248
+ 1110360,
249
+ 960708
250
+ ],
251
+ "json_function_calls:single": [
252
+ 1683,
253
+ 950133,
254
+ 189720
255
+ ],
256
+ "safety:malware:decline": [
257
+ 81,
258
+ 6408,
259
+ 4236
260
+ ],
261
+ "long_documents:finepdfs_edu": [
262
+ 3084,
263
+ 32567547,
264
+ 340038
265
+ ],
266
+ "chat:writing_create": [
267
+ 3075,
268
+ 1110354,
269
+ 953760
270
+ ],
271
+ "python_tool:code_trace": [
272
+ 1428,
273
+ 578373,
274
+ 275139
275
+ ],
276
+ "chat:summarising": [
277
+ 765,
278
+ 361239,
279
+ 125811
280
+ ],
281
+ "chat:explain_teach": [
282
+ 3693,
283
+ 1349955,
284
+ 1183155
285
+ ],
286
+ "system_prompts:socratic": [
287
+ 114,
288
+ 25539,
289
+ 10494
290
+ ],
291
+ "maths_logic:logic": [
292
+ 3069,
293
+ 592161,
294
+ 315126
295
+ ],
296
+ "chat_thinking:practical_advice": [
297
+ 972,
298
+ 433635,
299
+ 387876
300
+ ],
301
+ "safety:weapons:answer": [
302
+ 75,
303
+ 19539,
304
+ 17478
305
+ ],
306
+ "python_tool:utility": [
307
+ 720,
308
+ 202047,
309
+ 101373
310
+ ],
311
+ "gen_mt:calc": [
312
+ 2001,
313
+ 788205,
314
+ 602892
315
+ ],
316
+ "safety:dangerous_chemistry:decline": [
317
+ 78,
318
+ 5865,
319
+ 3681
320
+ ],
321
+ "system_prompts:plain": [
322
+ 75,
323
+ 17163,
324
+ 12726
325
+ ],
326
+ "instruction_following:practical_advice": [
327
+ 2064,
328
+ 709470,
329
+ 583935
330
+ ],
331
+ "instruction_following:factual_qa": [
332
+ 2415,
333
+ 542913,
334
+ 409167
335
+ ],
336
+ "safety:drugs:answer": [
337
+ 81,
338
+ 20907,
339
+ 18852
340
+ ],
341
+ "instruction_following:code_help": [
342
+ 1173,
343
+ 570387,
344
+ 505635
345
+ ],
346
+ "system_prompts:british": [
347
+ 99,
348
+ 26610,
349
+ 21801
350
+ ],
351
+ "chat_thinking:factual_qa": [
352
+ 645,
353
+ 202728,
354
+ 181188
355
+ ],
356
+ "gen_mt:thanks": [
357
+ 1617,
358
+ 612861,
359
+ 468999
360
+ ],
361
+ "json_function_calls:no_call": [
362
+ 294,
363
+ 117741,
364
+ 20442
365
+ ],
366
+ "json_function_calls:clarify": [
367
+ 723,
368
+ 275565,
369
+ 31977
370
+ ],
371
+ "system_prompts:brief2": [
372
+ 78,
373
+ 8775,
374
+ 5016
375
+ ],
376
+ "system_prompts:ask_first": [
377
+ 108,
378
+ 30597,
379
+ 24564
380
+ ],
381
+ "system_prompts:eli12": [
382
+ 57,
383
+ 16629,
384
+ 13260
385
+ ],
386
+ "safety:stalking:decline": [
387
+ 81,
388
+ 6048,
389
+ 3819
390
+ ],
391
+ "safety:extremism:answer": [
392
+ 84,
393
+ 23385,
394
+ 21060
395
+ ],
396
+ "safety:stalking:answer": [
397
+ 81,
398
+ 19965,
399
+ 17814
400
+ ],
401
+ "identity:identity": [
402
+ 2334,
403
+ 147690,
404
+ 99402
405
+ ],
406
+ "json_function_calls:multi_step": [
407
+ 861,
408
+ 556986,
409
+ 126048
410
+ ],
411
+ "safety:misinformation:decline": [
412
+ 81,
413
+ 6324,
414
+ 4170
415
+ ],
416
+ "system_prompts:generated_out_of_scope": [
417
+ 357,
418
+ 55455,
419
+ 21756
420
+ ],
421
+ "safety:privacy:decline": [
422
+ 78,
423
+ 5916,
424
+ 3810
425
+ ],
426
+ "chat_thinking:writing_create": [
427
+ 249,
428
+ 100368,
429
+ 83361
430
+ ],
431
+ "system_prompts:steps": [
432
+ 102,
433
+ 28950,
434
+ 23574
435
+ ],
436
+ "safety:academic_cheating:decline": [
437
+ 81,
438
+ 5961,
439
+ 3624
440
+ ],
441
+ "chat_thinking:code_help": [
442
+ 459,
443
+ 232383,
444
+ 201702
445
+ ],
446
+ "safety:malware:answer": [
447
+ 81,
448
+ 21480,
449
+ 19401
450
+ ],
451
+ "safety:theft:decline": [
452
+ 81,
453
+ 5211,
454
+ 3138
455
+ ],
456
+ "system_prompts:answer_why": [
457
+ 78,
458
+ 12186,
459
+ 7134
460
+ ],
461
+ "system_prompts:examples2": [
462
+ 105,
463
+ 34473,
464
+ 27888
465
+ ],
466
+ "safety:medical_risk:decline": [
467
+ 81,
468
+ 6774,
469
+ 4359
470
+ ],
471
+ "chat:casual_conversation": [
472
+ 621,
473
+ 76464,
474
+ 46695
475
+ ],
476
+ "system_prompts:tldr_first": [
477
+ 108,
478
+ 34662,
479
+ 27651
480
+ ],
481
+ "system_prompts:formal": [
482
+ 105,
483
+ 31218,
484
+ 25107
485
+ ],
486
+ "safety:drugs:decline": [
487
+ 78,
488
+ 5184,
489
+ 3195
490
+ ],
491
+ "system_prompts:learner": [
492
+ 105,
493
+ 32475,
494
+ 24435
495
+ ],
496
+ "safety:privacy:answer": [
497
+ 81,
498
+ 19998,
499
+ 17940
500
+ ],
501
+ "safety:self_harm:answer": [
502
+ 81,
503
+ 19716,
504
+ 17367
505
+ ],
506
+ "safety:fake_documents:decline": [
507
+ 84,
508
+ 6426,
509
+ 4215
510
+ ],
511
+ "safety:harassment:answer": [
512
+ 75,
513
+ 17394,
514
+ 15300
515
+ ],
516
+ "safety:fraud:answer": [
517
+ 81,
518
+ 21204,
519
+ 19143
520
+ ],
521
+ "safety:misinformation:answer": [
522
+ 81,
523
+ 20541,
524
+ 18558
525
+ ],
526
+ "system_prompts:bold_first": [
527
+ 108,
528
+ 38562,
529
+ 31800
530
+ ],
531
+ "safety:gambling_scams:answer": [
532
+ 81,
533
+ 21741,
534
+ 19506
535
+ ],
536
+ "safety:self_harm:support": [
537
+ 81,
538
+ 6837,
539
+ 4548
540
+ ],
541
+ "safety:animal_cruelty:decline": [
542
+ 78,
543
+ 6372,
544
+ 4035
545
+ ],
546
+ "system_prompts:max3sent": [
547
+ 93,
548
+ 13542,
549
+ 8865
550
+ ],
551
+ "system_prompts:tutor_q": [
552
+ 96,
553
+ 30651,
554
+ 24348
555
+ ],
556
+ "safety:cheating_partner:answer": [
557
+ 81,
558
+ 19755,
559
+ 17757
560
+ ],
561
+ "safety:harassment:decline": [
562
+ 81,
563
+ 6357,
564
+ 3891
565
+ ],
566
+ "safety:medical_risk:answer": [
567
+ 84,
568
+ 18705,
569
+ 16527
570
+ ],
571
+ "safety:theft:answer": [
572
+ 84,
573
+ 19842,
574
+ 17766
575
+ ],
576
+ "safety:cheating_partner:decline": [
577
+ 84,
578
+ 6198,
579
+ 3978
580
+ ],
581
+ "system_prompts:no_jargon": [
582
+ 96,
583
+ 28176,
584
+ 22752
585
+ ],
586
+ "system_prompts:encouraging": [
587
+ 108,
588
+ 31596,
589
+ 24756
590
+ ],
591
+ "safety:explicit_content:decline": [
592
+ 66,
593
+ 4479,
594
+ 2601
595
+ ],
596
+ "safety:violence:answer": [
597
+ 81,
598
+ 19083,
599
+ 16797
600
+ ],
601
+ "identity:identity_name": [
602
+ 66,
603
+ 4074,
604
+ 2856
605
+ ],
606
+ "system_prompts:recommend3": [
607
+ 75,
608
+ 17718,
609
+ 14007
610
+ ],
611
+ "system_prompts:bullets3": [
612
+ 90,
613
+ 14106,
614
+ 9504
615
+ ],
616
+ "safety:dangerous_challenges:decline": [
617
+ 84,
618
+ 7275,
619
+ 4584
620
+ ],
621
+ "safety:violence:decline": [
622
+ 78,
623
+ 6012,
624
+ 3759
625
+ ],
626
+ "safety:animal_cruelty:answer": [
627
+ 78,
628
+ 19392,
629
+ 17205
630
+ ],
631
+ "safety:dangerous_challenges:answer": [
632
+ 81,
633
+ 20880,
634
+ 18453
635
+ ],
636
+ "safety:dangerous_chemistry:answer": [
637
+ 75,
638
+ 17070,
639
+ 15063
640
+ ],
641
+ "safety:fraud:decline": [
642
+ 81,
643
+ 6270,
644
+ 4038
645
+ ],
646
+ "safety:weapons:decline": [
647
+ 75,
648
+ 5580,
649
+ 3534
650
+ ],
651
+ "system_prompts:table_cmp": [
652
+ 105,
653
+ 30825,
654
+ 23466
655
+ ],
656
+ "safety:explicit_content:answer": [
657
+ 78,
658
+ 19491,
659
+ 17373
660
+ ],
661
+ "safety:break_in:answer": [
662
+ 81,
663
+ 19341,
664
+ 17151
665
+ ],
666
+ "safety:extremism:decline": [
667
+ 75,
668
+ 5679,
669
+ 3459
670
+ ],
671
+ "safety:break_in:decline": [
672
+ 78,
673
+ 5880,
674
+ 3657
675
+ ],
676
+ "safety:academic_cheating:answer": [
677
+ 81,
678
+ 19419,
679
+ 17166
680
+ ],
681
+ "system_prompts:under50": [
682
+ 81,
683
+ 8340,
684
+ 4596
685
+ ]
686
+ },
687
+ "val": {
688
+ "step": 323,
689
+ "gen_mt": 1.9976460322216862,
690
+ "chat": 2.6188508941329967,
691
+ "long_documents": 1.642939914857721,
692
+ "maths_logic": 0.9554657036902189,
693
+ "system_prompts": 2.5412495779387108,
694
+ "chat_thinking": 2.4157817644569652,
695
+ "instruction_following": 2.2540548343543945,
696
+ "python_tool": 0.6380421585818156,
697
+ "json_function_calls": 0.77124170068506,
698
+ "identity": 0.09636760115368208,
699
+ "safety": 2.73513232421875,
700
+ "all": 2.0358242876293238
701
+ }
702
+ }
sft/3-passes/ckpt/val_history.json ADDED
@@ -0,0 +1,287 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "step": 0,
4
+ "gen_mt": 1.9621943310613368,
5
+ "chat": 2.6107664200509455,
6
+ "long_documents": 1.9350297453775571,
7
+ "maths_logic": 1.4533992596366156,
8
+ "system_prompts": 2.778495504319579,
9
+ "chat_thinking": 2.767670328730755,
10
+ "instruction_following": 2.322149717670505,
11
+ "python_tool": 1.3268044602856932,
12
+ "json_function_calls": 1.7170679590723537,
13
+ "identity": 2.0796876045570127,
14
+ "safety": 3.01088330078125,
15
+ "all": 2.1601221417923986
16
+ },
17
+ {
18
+ "step": 20,
19
+ "gen_mt": 1.772039731199288,
20
+ "chat": 2.3441756774597717,
21
+ "long_documents": 1.530667076772348,
22
+ "maths_logic": 1.041478076846284,
23
+ "system_prompts": 2.3996578392790613,
24
+ "chat_thinking": 2.2435506298112595,
25
+ "instruction_following": 2.0911700527753174,
26
+ "python_tool": 0.7117307418661868,
27
+ "json_function_calls": 0.9101038294153528,
28
+ "identity": 0.6972791520635372,
29
+ "safety": 2.5860712890625,
30
+ "all": 1.8647636184679617
31
+ },
32
+ {
33
+ "step": 40,
34
+ "gen_mt": 1.7685626943815962,
35
+ "chat": 2.3264057872719364,
36
+ "long_documents": 1.4417175061440881,
37
+ "maths_logic": 0.9684450937529362,
38
+ "system_prompts": 2.343691966572746,
39
+ "chat_thinking": 2.1996107517158228,
40
+ "instruction_following": 2.074272955417774,
41
+ "python_tool": 0.6410448587599148,
42
+ "json_function_calls": 0.812584862694726,
43
+ "identity": 0.2410522395589367,
44
+ "safety": 2.5274375,
45
+ "all": 1.837985448936609
46
+ },
47
+ {
48
+ "step": 60,
49
+ "gen_mt": 1.772105116114744,
50
+ "chat": 2.326066992668834,
51
+ "long_documents": 1.4421672821044922,
52
+ "maths_logic": 0.9437087830616367,
53
+ "system_prompts": 2.302748201145678,
54
+ "chat_thinking": 2.1916337704043776,
55
+ "instruction_following": 2.0646291964988683,
56
+ "python_tool": 0.6027793301538631,
57
+ "json_function_calls": 0.7544540084518112,
58
+ "identity": 0.184148522975358,
59
+ "safety": 2.505248779296875,
60
+ "all": 1.8316369093999751
61
+ },
62
+ {
63
+ "step": 80,
64
+ "gen_mt": 1.7527730407576316,
65
+ "chat": 2.3113855696150103,
66
+ "long_documents": 1.413360511912087,
67
+ "maths_logic": 0.9038477278199286,
68
+ "system_prompts": 2.262104426695231,
69
+ "chat_thinking": 2.1695331339269153,
70
+ "instruction_following": 2.0534822944346027,
71
+ "python_tool": 0.5845348030924097,
72
+ "json_function_calls": 0.7576105157892268,
73
+ "identity": 0.1436021139075465,
74
+ "safety": 2.469498046875,
75
+ "all": 1.8113941357855505
76
+ },
77
+ {
78
+ "step": 100,
79
+ "gen_mt": 1.7701837138809293,
80
+ "chat": 2.3424511255617455,
81
+ "long_documents": 1.4305322437617132,
82
+ "maths_logic": 0.8955947057338156,
83
+ "system_prompts": 2.2562566947652756,
84
+ "chat_thinking": 2.181547153241514,
85
+ "instruction_following": 2.0716882027482533,
86
+ "python_tool": 0.5802013787203474,
87
+ "json_function_calls": 0.7564473653340841,
88
+ "identity": 0.11871930924932247,
89
+ "safety": 2.48980908203125,
90
+ "all": 1.8277702456800733
91
+ },
92
+ {
93
+ "step": 120,
94
+ "gen_mt": 1.7766162042881866,
95
+ "chat": 2.348646180649036,
96
+ "long_documents": 1.417577939777705,
97
+ "maths_logic": 0.8833534952550972,
98
+ "system_prompts": 2.249644704440667,
99
+ "chat_thinking": 2.1621794788188646,
100
+ "instruction_following": 2.0662190298691074,
101
+ "python_tool": 0.5790367260943008,
102
+ "json_function_calls": 0.7412005358630115,
103
+ "identity": 0.1284761285883967,
104
+ "safety": 2.46010888671875,
105
+ "all": 1.8274916292518375
106
+ },
107
+ {
108
+ "step": 140,
109
+ "gen_mt": 1.7803208138582332,
110
+ "chat": 2.350420079420962,
111
+ "long_documents": 1.4210363884192672,
112
+ "maths_logic": 0.8706766257751574,
113
+ "system_prompts": 2.246030440806632,
114
+ "chat_thinking": 2.1754359841634203,
115
+ "instruction_following": 2.061371104898632,
116
+ "python_tool": 0.5756806172999596,
117
+ "json_function_calls": 0.7326623956720393,
118
+ "identity": 0.12082616573227549,
119
+ "safety": 2.448952880859375,
120
+ "all": 1.8276477742634927
121
+ },
122
+ {
123
+ "step": 160,
124
+ "gen_mt": 1.8038483843498212,
125
+ "chat": 2.380136443297368,
126
+ "long_documents": 1.4733599139086773,
127
+ "maths_logic": 0.8771844426794607,
128
+ "system_prompts": 2.287949313349944,
129
+ "chat_thinking": 2.1890656519546465,
130
+ "instruction_following": 2.0773086510309025,
131
+ "python_tool": 0.5810734785821827,
132
+ "json_function_calls": 0.7297748187640766,
133
+ "identity": 0.09150767683727583,
134
+ "safety": 2.505377685546875,
135
+ "all": 1.849803712819079
136
+ },
137
+ {
138
+ "step": 162,
139
+ "gen_mt": 1.8066579686258795,
140
+ "chat": 2.387618885517841,
141
+ "long_documents": 1.476884131900148,
142
+ "maths_logic": 0.8749269619703092,
143
+ "system_prompts": 2.293340600549553,
144
+ "chat_thinking": 2.1930235287979967,
145
+ "instruction_following": 2.084354009816947,
146
+ "python_tool": 0.5805621029487368,
147
+ "json_function_calls": 0.7266983169693131,
148
+ "identity": 0.09032914776363005,
149
+ "safety": 2.52205517578125,
150
+ "all": 1.8538731922941574
151
+ },
152
+ {
153
+ "step": 180,
154
+ "gen_mt": 1.8357485486765206,
155
+ "chat": 2.423877997701245,
156
+ "long_documents": 1.5022687526107523,
157
+ "maths_logic": 0.8863042867083999,
158
+ "system_prompts": 2.318434691109352,
159
+ "chat_thinking": 2.231554362884901,
160
+ "instruction_following": 2.105956022106584,
161
+ "python_tool": 0.5902434908265093,
162
+ "json_function_calls": 0.7171958488029044,
163
+ "identity": 0.09271938642546758,
164
+ "safety": 2.551511474609375,
165
+ "all": 1.8811295797511016
166
+ },
167
+ {
168
+ "step": 200,
169
+ "gen_mt": 1.8282683204100232,
170
+ "chat": 2.411492741317539,
171
+ "long_documents": 1.4988884501374526,
172
+ "maths_logic": 0.8813010899182562,
173
+ "system_prompts": 2.316693688291729,
174
+ "chat_thinking": 2.232253408458542,
175
+ "instruction_following": 2.08455814511367,
176
+ "python_tool": 0.5853924868950132,
177
+ "json_function_calls": 0.7104534343914227,
178
+ "identity": 0.11062278992614093,
179
+ "safety": 2.552631591796875,
180
+ "all": 1.8721693567655844
181
+ },
182
+ {
183
+ "step": 220,
184
+ "gen_mt": 1.8577906348409838,
185
+ "chat": 2.459927102532773,
186
+ "long_documents": 1.5014934495694376,
187
+ "maths_logic": 0.9029742076658367,
188
+ "system_prompts": 2.3556153799133757,
189
+ "chat_thinking": 2.2727442511245592,
190
+ "instruction_following": 2.140856430223403,
191
+ "python_tool": 0.5986349641506316,
192
+ "json_function_calls": 0.7280828344213354,
193
+ "identity": 0.11271959913364059,
194
+ "safety": 2.580161376953125,
195
+ "all": 1.9078474638776906
196
+ },
197
+ {
198
+ "step": 240,
199
+ "gen_mt": 1.9172430605548543,
200
+ "chat": 2.4945246003065007,
201
+ "long_documents": 1.5657390131426685,
202
+ "maths_logic": 0.9114803854352627,
203
+ "system_prompts": 2.4103916583224665,
204
+ "chat_thinking": 2.3096067230105732,
205
+ "instruction_following": 2.1651308464964076,
206
+ "python_tool": 0.6117781068687573,
207
+ "json_function_calls": 0.7442343771994651,
208
+ "identity": 0.10283474646492739,
209
+ "safety": 2.62198388671875,
210
+ "all": 1.9475747150863614
211
+ },
212
+ {
213
+ "step": 260,
214
+ "gen_mt": 1.9171924980672663,
215
+ "chat": 2.5191294370120323,
216
+ "long_documents": 1.5917682802056992,
217
+ "maths_logic": 0.9057238692685333,
218
+ "system_prompts": 2.416531922387295,
219
+ "chat_thinking": 2.3252465770497124,
220
+ "instruction_following": 2.1733193245005413,
221
+ "python_tool": 0.6111423658288043,
222
+ "json_function_calls": 0.7437440339509431,
223
+ "identity": 0.09532635217049903,
224
+ "safety": 2.6249833984375,
225
+ "all": 1.9554512272486648
226
+ },
227
+ {
228
+ "step": 280,
229
+ "gen_mt": 1.962491084378901,
230
+ "chat": 2.565683763228198,
231
+ "long_documents": 1.5826373833452345,
232
+ "maths_logic": 0.9318828616813868,
233
+ "system_prompts": 2.4843047777337928,
234
+ "chat_thinking": 2.374354211591078,
235
+ "instruction_following": 2.214778203732408,
236
+ "python_tool": 0.628926762402688,
237
+ "json_function_calls": 0.7502818064646678,
238
+ "identity": 0.09243242643629969,
239
+ "safety": 2.67732470703125,
240
+ "all": 1.9965844731181879
241
+ },
242
+ {
243
+ "step": 300,
244
+ "gen_mt": 1.9806452892717317,
245
+ "chat": 2.6015296560150767,
246
+ "long_documents": 1.6203754733752653,
247
+ "maths_logic": 0.9392403420969182,
248
+ "system_prompts": 2.5158625913980996,
249
+ "chat_thinking": 2.400910154076238,
250
+ "instruction_following": 2.2427826062887513,
251
+ "python_tool": 0.6316153215885723,
252
+ "json_function_calls": 0.7651167402754316,
253
+ "identity": 0.09147495375966107,
254
+ "safety": 2.719187255859375,
255
+ "all": 2.019918822970929
256
+ },
257
+ {
258
+ "step": 320,
259
+ "gen_mt": 1.9966908583465728,
260
+ "chat": 2.617133299335225,
261
+ "long_documents": 1.642400307186766,
262
+ "maths_logic": 0.9553847746171192,
263
+ "system_prompts": 2.539599536605812,
264
+ "chat_thinking": 2.414037139445372,
265
+ "instruction_following": 2.253482409765279,
266
+ "python_tool": 0.6374341021133225,
267
+ "json_function_calls": 0.7692084784980293,
268
+ "identity": 0.09606159218373594,
269
+ "safety": 2.7345244140625,
270
+ "all": 2.0347740413324145
271
+ },
272
+ {
273
+ "step": 323,
274
+ "gen_mt": 1.9976460322216862,
275
+ "chat": 2.6188508941329967,
276
+ "long_documents": 1.642939914857721,
277
+ "maths_logic": 0.9554657036902189,
278
+ "system_prompts": 2.5412495779387108,
279
+ "chat_thinking": 2.4157817644569652,
280
+ "instruction_following": 2.2540548343543945,
281
+ "python_tool": 0.6380421585818156,
282
+ "json_function_calls": 0.77124170068506,
283
+ "identity": 0.09636760115368208,
284
+ "safety": 2.73513232421875,
285
+ "all": 2.0358242876293238
286
+ }
287
+ ]
sft/3-passes/hf/chat_template.jinja ADDED
@@ -0,0 +1,386 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {#
2
+ Template: Google Gemma 4 Canonical Chat Template
3
+ Author: Google Gemma Engineering Team
4
+ Published: 2026-07-09
5
+ Context: Fixed tool-calling loops, turn closures, and thinking content-ordering.
6
+ #}
7
+ {%- macro format_parameters(properties, required, filter_keys=false) -%}
8
+ {%- set standard_keys = ['description', 'type', 'properties', 'required', 'nullable'] -%}
9
+ {%- set ns = namespace(found_first=false) -%}
10
+ {%- for key, value in properties | dictsort -%}
11
+ {%- set add_comma = false -%}
12
+ {%- if not filter_keys or key not in standard_keys -%}
13
+ {%- if ns.found_first %},{% endif -%}
14
+ {%- set ns.found_first = true -%}
15
+ {{ key }}:{
16
+ {%- if value['description'] -%}
17
+ description:<|"|>{{ value['description'] }}<|"|>
18
+ {%- set add_comma = true -%}
19
+ {%- endif -%}
20
+ {%- if value['type'] | upper == 'STRING' -%}
21
+ {%- if value['enum'] -%}
22
+ {%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}
23
+ enum:{{ format_argument(value['enum']) }}
24
+ {%- endif -%}
25
+ {%- elif value['type'] | upper == 'ARRAY' -%}
26
+ {%- if value['items'] is mapping and value['items'] -%}
27
+ {%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}
28
+ items:{
29
+ {%- set ns_items = namespace(found_first=false) -%}
30
+ {%- for item_key, item_value in value['items'] | dictsort -%}
31
+ {%- if item_value is not none -%}
32
+ {%- if ns_items.found_first %},{% endif -%}
33
+ {%- set ns_items.found_first = true -%}
34
+ {%- if item_key == 'properties' -%}
35
+ properties:{
36
+ {%- if item_value is mapping -%}
37
+ {{- format_parameters(item_value, value['items']['required'] | default([])) -}}
38
+ {%- endif -%}
39
+ }
40
+ {%- elif item_key == 'required' -%}
41
+ required:[
42
+ {%- for req_item in item_value -%}
43
+ <|"|>{{- req_item -}}<|"|>
44
+ {%- if not loop.last %},{% endif -%}
45
+ {%- endfor -%}
46
+ ]
47
+ {%- elif item_key == 'type' -%}
48
+ {%- if item_value is string -%}
49
+ type:{{ format_argument(item_value | upper) }}
50
+ {%- else -%}
51
+ type:{{ format_argument(item_value | map('upper') | list) }}
52
+ {%- endif -%}
53
+ {%- else -%}
54
+ {{ item_key }}:{{ format_argument(item_value) }}
55
+ {%- endif -%}
56
+ {%- endif -%}
57
+ {%- endfor -%}
58
+ }
59
+ {%- endif -%}
60
+ {%- endif -%}
61
+ {%- if value['nullable'] %}
62
+ {%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}
63
+ nullable:true
64
+ {%- endif -%}
65
+ {%- if value['type'] | upper == 'OBJECT' -%}
66
+ {%- if value['properties'] is defined and value['properties'] is mapping -%}
67
+ {%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}
68
+ properties:{
69
+ {{- format_parameters(value['properties'], value['required'] | default([])) -}}
70
+ }
71
+ {%- elif value is mapping -%}
72
+ {%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}
73
+ properties:{
74
+ {{- format_parameters(value, value['required'] | default([]), filter_keys=true) -}}
75
+ }
76
+ {%- endif -%}
77
+ {%- if value['required'] -%}
78
+ {%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}
79
+ required:[
80
+ {%- for item in value['required'] | default([]) -%}
81
+ <|"|>{{- item -}}<|"|>
82
+ {%- if not loop.last %},{% endif -%}
83
+ {%- endfor -%}
84
+ ]
85
+ {%- endif -%}
86
+ {%- endif -%}
87
+ {%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}
88
+ type:<|"|>{{ value['type'] | upper }}<|"|>}
89
+ {%- endif -%}
90
+ {%- endfor -%}
91
+ {%- endmacro -%}
92
+ {%- macro format_function_declaration(tool_data) -%}
93
+ declaration:{{- tool_data['function']['name'] -}}{description:<|"|>{{- tool_data['function']['description'] -}}<|"|>
94
+ {%- set params = tool_data['function']['parameters'] -%}
95
+ {%- if params -%}
96
+ ,parameters:{
97
+ {%- if params['properties'] -%}
98
+ properties:{ {{- format_parameters(params['properties'], params['required']) -}} },
99
+ {%- endif -%}
100
+ {%- if params['required'] -%}
101
+ required:[
102
+ {%- for item in params['required'] -%}
103
+ <|"|>{{- item -}}<|"|>
104
+ {{- ',' if not loop.last -}}
105
+ {%- endfor -%}
106
+ ],
107
+ {%- endif -%}
108
+ {%- if params['type'] -%}
109
+ type:<|"|>{{- params['type'] | upper -}}<|"|>}
110
+ {%- endif -%}
111
+ {%- endif -%}
112
+ {%- if 'response' in tool_data['function'] -%}
113
+ {%- set response_declaration = tool_data['function']['response'] -%}
114
+ ,response:{
115
+ {%- if response_declaration['description'] -%}
116
+ description:<|"|>{{- response_declaration['description'] -}}<|"|>,
117
+ {%- endif -%}
118
+ {%- if response_declaration['type'] | upper == 'OBJECT' -%}
119
+ type:<|"|>{{- response_declaration['type'] | upper -}}<|"|>}
120
+ {%- endif -%}
121
+ {%- endif -%}
122
+ }
123
+ {%- endmacro -%}
124
+ {%- macro format_argument(argument, escape_keys=True) -%}
125
+ {%- if argument is none -%}
126
+ {{- 'null' -}}
127
+ {%- elif argument is string -%}
128
+ {{- '<|"|>' + argument + '<|"|>' -}}
129
+ {%- elif argument is boolean -%}
130
+ {{- 'true' if argument else 'false' -}}
131
+ {%- elif argument is mapping -%}
132
+ {{- '{' -}}
133
+ {%- set ns = namespace(found_first=false) -%}
134
+ {%- for key, value in argument | dictsort -%}
135
+ {%- if ns.found_first %},{% endif -%}
136
+ {%- set ns.found_first = true -%}
137
+ {%- if escape_keys -%}
138
+ {{- '<|"|>' + key + '<|"|>' -}}
139
+ {%- else -%}
140
+ {{- key -}}
141
+ {%- endif -%}
142
+ :{{- format_argument(value, escape_keys=escape_keys) -}}
143
+ {%- endfor -%}
144
+ {{- '}' -}}
145
+ {%- elif argument is sequence -%}
146
+ {{- '[' -}}
147
+ {%- for item in argument -%}
148
+ {{- format_argument(item, escape_keys=escape_keys) -}}
149
+ {%- if not loop.last %},{% endif -%}
150
+ {%- endfor -%}
151
+ {{- ']' -}}
152
+ {%- else -%}
153
+ {{- argument -}}
154
+ {%- endif -%}
155
+ {%- endmacro -%}
156
+ {%- macro strip_thinking(text) -%}
157
+ {%- set ns = namespace(result='') -%}
158
+ {%- for part in text.split('<channel|>') -%}
159
+ {%- if '<|channel>' in part -%}
160
+ {%- set ns.result = ns.result + part.split('<|channel>')[0] -%}
161
+ {%- else -%}
162
+ {%- set ns.result = ns.result + part -%}
163
+ {%- endif -%}
164
+ {%- endfor -%}
165
+ {{- ns.result | trim -}}
166
+ {%- endmacro -%}
167
+
168
+ {%- macro format_tool_response_block(tool_name, response) -%}
169
+ {{- '<|tool_response>' -}}
170
+ {%- if response is mapping -%}
171
+ {{- 'response:' + tool_name + '{' -}}
172
+ {%- for key, value in response | dictsort -%}
173
+ {{- key -}}:{{- format_argument(value, escape_keys=False) -}}
174
+ {%- if not loop.last %},{% endif -%}
175
+ {%- endfor -%}
176
+ {{- '}' -}}
177
+ {%- else -%}
178
+ {{- 'response:' + tool_name + '{value:' + format_argument(response, escape_keys=False) + '}' -}}
179
+ {%- endif -%}
180
+ {{- '<tool_response|>' -}}
181
+ {%- endmacro -%}
182
+
183
+ {#- ===== SETUP ===== -#}
184
+ {%- set ns = namespace(prev_message_type=None, prev_non_tool_role=None) -%}
185
+ {%- set loop_messages = messages -%}
186
+ {%- set enable_thinking = enable_thinking | default(false) -%}
187
+ {%- set preserve_thinking = preserve_thinking | default(false) -%}
188
+ {{- bos_token -}}
189
+ {#- Handle System/Tool Definitions Block -#}
190
+ {%- if enable_thinking or tools or (messages and messages[0]['role'] in ['system', 'developer']) -%}
191
+ {{- '<|turn>system\n' -}}
192
+ {#- Inject Thinking token at the very top of the FIRST system turn -#}
193
+ {%- if enable_thinking -%}
194
+ {{- '<|think|>\n' -}}
195
+ {%- set ns.prev_message_type = 'think' -%}
196
+ {%- endif -%}
197
+ {%- if messages and messages[0]['role'] in ['system', 'developer'] -%}
198
+ {%- if messages[0]['content'] is string -%}
199
+ {{- messages[0]['content'] | trim -}}
200
+ {%- elif messages[0]['content'] is sequence -%}
201
+ {%- for item in messages[0]['content'] -%}
202
+ {{- item['text'] | trim + ' '-}}
203
+ {%- endfor -%}
204
+ {%- endif -%}
205
+ {%- set loop_messages = messages[1:] -%}
206
+ {%- endif -%}
207
+ {%- if tools -%}
208
+ {%- for tool in tools %}
209
+ {{- '<|tool>' -}}
210
+ {{- format_function_declaration(tool) | trim -}}
211
+ {{- '<tool|>' -}}
212
+ {%- endfor %}
213
+ {%- set ns.prev_message_type = 'tool' -%}
214
+ {%- endif -%}
215
+ {{- '<turn|>\n' -}}
216
+ {%- endif %}
217
+
218
+ {#- Pre-scan: find last user message index for reasoning guard -#}
219
+ {%- set ns_turn = namespace(last_user_idx=-1) -%}
220
+ {%- for i in range(loop_messages | length) -%}
221
+ {%- if loop_messages[i]['role'] == 'user' -%}
222
+ {%- set ns_turn.last_user_idx = i -%}
223
+ {%- endif -%}
224
+ {%- endfor -%}
225
+
226
+ {#- Loop through messages -#}
227
+ {%- for message in loop_messages -%}
228
+ {%- if message['role'] != 'tool' -%}
229
+ {%- set ns.prev_message_type = None -%}
230
+ {%- set role = 'model' if message['role'] == 'assistant' else message['role'] -%}
231
+ {#- Detect continuation using tracked state — O(1) instead of O(n) backward scan -#}
232
+ {%- set continue_same_model_turn = (role == 'model' and ns.prev_non_tool_role == 'assistant') -%}
233
+ {%- if not continue_same_model_turn -%}
234
+ {{- '<|turn>' + role + '\n' }}
235
+ {%- endif -%}
236
+
237
+ {#- Render reasoning/reasoning_content as thinking channel -#}
238
+ {%- set thinking_text = message.get('reasoning') or message.get('reasoning_content') -%}
239
+ {%- set thinking_gate = (loop.index0 > ns_turn.last_user_idx) or (preserve_thinking and message.get('tool_calls')) -%}
240
+ {%- if thinking_text and thinking_gate -%}
241
+ {{- '<|channel>thought\n' + thinking_text + '\n<channel|>' -}}
242
+ {%- endif -%}
243
+
244
+ {%- if message.get('tool_calls') -%}
245
+ {%- for tool_call in message.get('tool_calls') -%}
246
+ {%- set function = tool_call['function'] -%}
247
+ {{- '<|tool_call>call:' + function['name'] + '{' -}}
248
+ {%- if function['arguments'] is mapping -%}
249
+ {%- set ns_args = namespace(found_first=false) -%}
250
+ {%- for key, value in function['arguments'] | dictsort -%}
251
+ {%- if ns_args.found_first %},{% endif -%}
252
+ {%- set ns_args.found_first = true -%}
253
+ {{- key -}}:{{- format_argument(value, escape_keys=False) -}}
254
+ {%- endfor -%}
255
+ {%- elif function['arguments'] is none -%}
256
+ {%- else -%}
257
+ {{- raise_exception(
258
+ "chat_template: tool_calls[].function.arguments must be a "
259
+ "JSON object (mapping), not a string. Deserialize arguments "
260
+ "before passing to the template."
261
+ ) -}}
262
+ {%- endif -%}
263
+ {{- '}<tool_call|>' -}}
264
+ {%- endfor -%}
265
+ {%- set ns.prev_message_type = 'tool_call' -%}
266
+ {%- endif -%}
267
+
268
+ {%- set ns_tr_out = namespace(flag=false) -%}
269
+ {%- if message.get('tool_responses') -%}
270
+ {#- Legacy: tool_responses embedded on the assistant message (Google/Gemma native) -#}
271
+ {%- for tool_response in message.get('tool_responses') -%}
272
+ {{- format_tool_response_block(tool_response['name'] | default('unknown', true), tool_response['response']) -}}
273
+ {%- set ns_tr_out.flag = true -%}
274
+ {%- set ns.prev_message_type = 'tool_response' -%}
275
+ {%- endfor -%}
276
+ {%- elif message.get('tool_calls') -%}
277
+ {#- OpenAI Chat Completions: forward-scan consecutive role:tool messages -#}
278
+ {%- set ns_tool_scan = namespace(stopped=false) -%}
279
+ {%- for k in range(loop.index0 + 1, loop_messages | length) -%}
280
+ {%- if ns_tool_scan.stopped -%}
281
+ {%- elif loop_messages[k]['role'] != 'tool' -%}
282
+ {%- set ns_tool_scan.stopped = true -%}
283
+ {%- else -%}
284
+ {%- set follow = loop_messages[k] -%}
285
+ {#- Resolve tool_call_id to function name -#}
286
+ {%- set ns_tname = namespace(name=follow.get('name') or 'unknown') -%}
287
+ {%- for tc in message.get('tool_calls') -%}
288
+ {%- if tc.get('id') == follow.get('tool_call_id') -%}
289
+ {%- set ns_tname.name = tc['function']['name'] -%}
290
+ {%- endif -%}
291
+ {%- endfor -%}
292
+ {#- Handle content as string or content-parts array -#}
293
+ {%- set tool_body = follow.get('content') -%}
294
+ {%- if tool_body is string -%}
295
+ {{- format_tool_response_block(ns_tname.name, tool_body) -}}
296
+ {%- elif tool_body is sequence and tool_body is not string -%}
297
+ {%- set ns_txt = namespace(s='') -%}
298
+ {%- for part in tool_body -%}
299
+ {%- if part.get('type') == 'text' -%}
300
+ {%- set ns_txt.s = ns_txt.s + (part.get('text') | default('')) -%}
301
+ {%- endif -%}
302
+ {%- endfor -%}
303
+ {{- format_tool_response_block(ns_tname.name, ns_txt.s) -}}
304
+ {%- for part in tool_body -%}
305
+ {%- if part.get('type') in ['image', 'image_url'] -%}
306
+ {{- '<|image|>' -}}
307
+ {%- elif part.get('type') in ['audio', 'input_audio'] -%}
308
+ {{- '<|audio|>' -}}
309
+ {%- elif part.get('type') == 'video' -%}
310
+ {{- '<|video|>' -}}
311
+ {%- endif -%}
312
+ {%- endfor -%}
313
+ {%- else -%}
314
+ {{- format_tool_response_block(ns_tname.name, tool_body) -}}
315
+ {%- endif -%}
316
+ {%- set ns_tr_out.flag = true -%}
317
+ {%- set ns.prev_message_type = 'tool_response' -%}
318
+ {%- endif -%}
319
+ {%- endfor -%}
320
+ {%- endif -%}
321
+
322
+ {%- set captured_content -%}
323
+ {%- if message.get('content') is string -%}
324
+ {%- if role == 'model' -%}
325
+ {{- strip_thinking(message['content']) -}}
326
+ {%- else -%}
327
+ {{- message['content'] | trim -}}
328
+ {%- endif -%}
329
+ {%- elif message.get('content') is sequence -%}
330
+ {%- for item in message['content'] -%}
331
+ {%- if item.get('type') == 'text' -%}
332
+ {%- if role == 'model' -%}
333
+ {{- strip_thinking(item['text']) -}}
334
+ {%- else -%}
335
+ {{- item['text'] | trim -}}
336
+ {%- endif -%}
337
+ {%- elif item.get('type') in ['image', 'image_url'] -%}
338
+ {{- '<|image|>' -}}
339
+ {%- elif item.get('type') in ['audio', 'input_audio'] -%}
340
+ {{- '<|audio|>' -}}
341
+ {%- elif item.get('type') == 'video' -%}
342
+ {{- '<|video|>' -}}
343
+ {%- endif -%}
344
+ {%- endfor -%}
345
+ {%- endif -%}
346
+ {%- endset -%}
347
+
348
+ {{- captured_content -}}
349
+ {%- set has_content = captured_content | trim | length > 0 -%}
350
+
351
+ {#- Forward-scan: find next non-tool message role for continuation detection -#}
352
+ {%- set next_nt = namespace(role=None, found=false) -%}
353
+ {%- for j in range(loop.index0 + 1, loop_messages | length) -%}
354
+ {%- if not next_nt.found -%}
355
+ {%- if loop_messages[j]['role'] != 'tool' -%}
356
+ {%- set next_nt.role = loop_messages[j]['role'] -%}
357
+ {%- set next_nt.found = true -%}
358
+ {%- endif -%}
359
+ {%- endif -%}
360
+ {%- endfor -%}
361
+
362
+ {%- set continues_into_next = (
363
+ role == 'model'
364
+ and next_nt.role == 'assistant'
365
+ and (not message.get('tool_calls') or ns_tr_out.flag)
366
+ ) -%}
367
+
368
+ {%- if ns.prev_message_type == 'tool_call' and not ns_tr_out.flag -%}
369
+ {{- '<|tool_response>' -}}
370
+ {%- elif continues_into_next -%}
371
+ {%- elif not (ns_tr_out.flag and not has_content and not next_nt.found) -%}
372
+ {{- '<turn|>\n' -}}
373
+ {%- endif -%}
374
+
375
+ {#- Track previous non-tool role for next iteration (avoids O(n) backward scan) -#}
376
+ {%- set ns.prev_non_tool_role = message['role'] -%}
377
+ {%- endif -%}
378
+ {%- endfor -%}
379
+
380
+ {%- if add_generation_prompt -%}
381
+ {%- if ns.prev_message_type != 'tool_response' and ns.prev_message_type != 'tool_call' -%}
382
+ {{- '<|turn>model\n' -}}
383
+ {%- elif ns.prev_message_type == 'tool_response' and enable_thinking -%}
384
+ {{- '<|channel>thought\n' -}}
385
+ {%- endif -%}
386
+ {%- endif -%}
sft/3-passes/hf/config.json ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "Gemma4ForCausalLM"
4
+ ],
5
+ "model_type": "gemma4_text",
6
+ "vocab_size": 32768,
7
+ "hidden_size": 640,
8
+ "intermediate_size": 1792,
9
+ "num_hidden_layers": 28,
10
+ "num_attention_heads": 10,
11
+ "num_key_value_heads": 2,
12
+ "head_dim": 64,
13
+ "global_head_dim": 128,
14
+ "per_layer_config": {
15
+ "3": {
16
+ "head_dim": 128
17
+ },
18
+ "7": {
19
+ "head_dim": 128
20
+ },
21
+ "11": {
22
+ "head_dim": 128
23
+ },
24
+ "15": {
25
+ "head_dim": 128
26
+ },
27
+ "19": {
28
+ "head_dim": 128
29
+ },
30
+ "23": {
31
+ "head_dim": 128
32
+ },
33
+ "27": {
34
+ "head_dim": 128
35
+ }
36
+ },
37
+ "hidden_activation": "gelu_pytorch_tanh",
38
+ "max_position_embeddings": 16384,
39
+ "rms_norm_eps": 1e-06,
40
+ "sliding_window": 512,
41
+ "layer_types": [
42
+ "sliding_attention",
43
+ "sliding_attention",
44
+ "sliding_attention",
45
+ "full_attention",
46
+ "sliding_attention",
47
+ "sliding_attention",
48
+ "sliding_attention",
49
+ "full_attention",
50
+ "sliding_attention",
51
+ "sliding_attention",
52
+ "sliding_attention",
53
+ "full_attention",
54
+ "sliding_attention",
55
+ "sliding_attention",
56
+ "sliding_attention",
57
+ "full_attention",
58
+ "sliding_attention",
59
+ "sliding_attention",
60
+ "sliding_attention",
61
+ "full_attention",
62
+ "sliding_attention",
63
+ "sliding_attention",
64
+ "sliding_attention",
65
+ "full_attention",
66
+ "sliding_attention",
67
+ "sliding_attention",
68
+ "sliding_attention",
69
+ "full_attention"
70
+ ],
71
+ "final_logit_softcapping": 15.0,
72
+ "tie_word_embeddings": true,
73
+ "hidden_size_per_layer_input": 0,
74
+ "vocab_size_per_layer_input": 32768,
75
+ "num_kv_shared_layers": 0,
76
+ "use_double_wide_mlp": false,
77
+ "attention_k_eq_v": false,
78
+ "enable_moe_block": false,
79
+ "attention_bias": false,
80
+ "attention_dropout": 0.0,
81
+ "use_cache": true,
82
+ "rope_parameters": {
83
+ "sliding_attention": {
84
+ "rope_type": "default",
85
+ "rope_theta": 10000.0
86
+ },
87
+ "full_attention": {
88
+ "rope_type": "proportional",
89
+ "partial_rotary_factor": 1.0,
90
+ "rope_theta": 1000000.0
91
+ }
92
+ },
93
+ "pad_token_id": 0,
94
+ "eos_token_id": 1,
95
+ "bos_token_id": 2,
96
+ "dtype": "bfloat16"
97
+ }
sft/3-passes/hf/generation_config.json ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token_id": 2,
3
+ "pad_token_id": 0,
4
+ "eos_token_id": [
5
+ 1,
6
+ 6,
7
+ 11
8
+ ],
9
+ "do_sample": true,
10
+ "temperature": 0.7,
11
+ "top_p": 0.95,
12
+ "top_k": 64
13
+ }
sft/3-passes/hf/tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
sft/3-passes/hf/tokenizer_config.json ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "tokenizer_class": "PreTrainedTokenizerFast",
3
+ "bos_token": "<bos>",
4
+ "eos_token": "<eos>",
5
+ "pad_token": "<pad>",
6
+ "unk_token": "<unk>",
7
+ "mask_token": "<mask>",
8
+ "add_bos_token": true,
9
+ "add_eos_token": false,
10
+ "model_max_length": 16384,
11
+ "padding_side": "left",
12
+ "clean_up_tokenization_spaces": false,
13
+ "sot_token": "<|turn>",
14
+ "eot_token": "<turn|>",
15
+ "std_token": "<|tool>",
16
+ "etd_token": "<tool|>",
17
+ "stc_token": "<|tool_call>",
18
+ "etc_token": "<tool_call|>",
19
+ "str_token": "<|tool_response>",
20
+ "etr_token": "<tool_response|>",
21
+ "escape_token": "<|\"|>",
22
+ "think_token": "<|think|>",
23
+ "soc_token": "<|channel>",
24
+ "eoc_token": "<channel|>",
25
+ "chat_template": "{#\n Template: Google Gemma 4 Canonical Chat Template\n Author: Google Gemma Engineering Team\n Published: 2026-07-09\n Context: Fixed tool-calling loops, turn closures, and thinking content-ordering.\n#}\n{%- macro format_parameters(properties, required, filter_keys=false) -%}\n {%- set standard_keys = ['description', 'type', 'properties', 'required', 'nullable'] -%}\n {%- set ns = namespace(found_first=false) -%}\n {%- for key, value in properties | dictsort -%}\n {%- set add_comma = false -%}\n {%- if not filter_keys or key not in standard_keys -%}\n {%- if ns.found_first %},{% endif -%}\n {%- set ns.found_first = true -%}\n {{ key }}:{\n {%- if value['description'] -%}\n description:<|\"|>{{ value['description'] }}<|\"|>\n {%- set add_comma = true -%}\n {%- endif -%}\n {%- if value['type'] | upper == 'STRING' -%}\n {%- if value['enum'] -%}\n {%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}\n enum:{{ format_argument(value['enum']) }}\n {%- endif -%}\n {%- elif value['type'] | upper == 'ARRAY' -%}\n {%- if value['items'] is mapping and value['items'] -%}\n {%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}\n items:{\n {%- set ns_items = namespace(found_first=false) -%}\n {%- for item_key, item_value in value['items'] | dictsort -%}\n {%- if item_value is not none -%}\n {%- if ns_items.found_first %},{% endif -%}\n {%- set ns_items.found_first = true -%}\n {%- if item_key == 'properties' -%}\n properties:{\n {%- if item_value is mapping -%}\n {{- format_parameters(item_value, value['items']['required'] | default([])) -}}\n {%- endif -%}\n }\n {%- elif item_key == 'required' -%}\n required:[\n {%- for req_item in item_value -%}\n <|\"|>{{- req_item -}}<|\"|>\n {%- if not loop.last %},{% endif -%}\n {%- endfor -%}\n ]\n {%- elif item_key == 'type' -%}\n {%- if item_value is string -%}\n type:{{ format_argument(item_value | upper) }}\n {%- else -%}\n type:{{ format_argument(item_value | map('upper') | list) }}\n {%- endif -%}\n {%- else -%}\n {{ item_key }}:{{ format_argument(item_value) }}\n {%- endif -%}\n {%- endif -%}\n {%- endfor -%}\n }\n {%- endif -%}\n {%- endif -%}\n {%- if value['nullable'] %}\n {%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}\n nullable:true\n {%- endif -%}\n {%- if value['type'] | upper == 'OBJECT' -%}\n {%- if value['properties'] is defined and value['properties'] is mapping -%}\n {%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}\n properties:{\n {{- format_parameters(value['properties'], value['required'] | default([])) -}}\n }\n {%- elif value is mapping -%}\n {%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}\n properties:{\n {{- format_parameters(value, value['required'] | default([]), filter_keys=true) -}}\n }\n {%- endif -%}\n {%- if value['required'] -%}\n {%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}\n required:[\n {%- for item in value['required'] | default([]) -%}\n <|\"|>{{- item -}}<|\"|>\n {%- if not loop.last %},{% endif -%}\n {%- endfor -%}\n ]\n {%- endif -%}\n {%- endif -%}\n {%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}\n type:<|\"|>{{ value['type'] | upper }}<|\"|>}\n {%- endif -%}\n {%- endfor -%}\n{%- endmacro -%}\n{%- macro format_function_declaration(tool_data) -%}\n declaration:{{- tool_data['function']['name'] -}}{description:<|\"|>{{- tool_data['function']['description'] -}}<|\"|>\n {%- set params = tool_data['function']['parameters'] -%}\n {%- if params -%}\n ,parameters:{\n {%- if params['properties'] -%}\n properties:{ {{- format_parameters(params['properties'], params['required']) -}} },\n {%- endif -%}\n {%- if params['required'] -%}\n required:[\n {%- for item in params['required'] -%}\n <|\"|>{{- item -}}<|\"|>\n {{- ',' if not loop.last -}}\n {%- endfor -%}\n ],\n {%- endif -%}\n {%- if params['type'] -%}\n type:<|\"|>{{- params['type'] | upper -}}<|\"|>}\n {%- endif -%}\n {%- endif -%}\n {%- if 'response' in tool_data['function'] -%}\n {%- set response_declaration = tool_data['function']['response'] -%}\n ,response:{\n {%- if response_declaration['description'] -%}\n description:<|\"|>{{- response_declaration['description'] -}}<|\"|>,\n {%- endif -%}\n {%- if response_declaration['type'] | upper == 'OBJECT' -%}\n type:<|\"|>{{- response_declaration['type'] | upper -}}<|\"|>}\n {%- endif -%}\n {%- endif -%}\n }\n{%- endmacro -%}\n{%- macro format_argument(argument, escape_keys=True) -%}\n {%- if argument is none -%}\n {{- 'null' -}}\n {%- elif argument is string -%}\n {{- '<|\"|>' + argument + '<|\"|>' -}}\n {%- elif argument is boolean -%}\n {{- 'true' if argument else 'false' -}}\n {%- elif argument is mapping -%}\n {{- '{' -}}\n {%- set ns = namespace(found_first=false) -%}\n {%- for key, value in argument | dictsort -%}\n {%- if ns.found_first %},{% endif -%}\n {%- set ns.found_first = true -%}\n {%- if escape_keys -%}\n {{- '<|\"|>' + key + '<|\"|>' -}}\n {%- else -%}\n {{- key -}}\n {%- endif -%}\n :{{- format_argument(value, escape_keys=escape_keys) -}}\n {%- endfor -%}\n {{- '}' -}}\n {%- elif argument is sequence -%}\n {{- '[' -}}\n {%- for item in argument -%}\n {{- format_argument(item, escape_keys=escape_keys) -}}\n {%- if not loop.last %},{% endif -%}\n {%- endfor -%}\n {{- ']' -}}\n {%- else -%}\n {{- argument -}}\n {%- endif -%}\n{%- endmacro -%}\n{%- macro strip_thinking(text) -%}\n {%- set ns = namespace(result='') -%}\n {%- for part in text.split('<channel|>') -%}\n {%- if '<|channel>' in part -%}\n {%- set ns.result = ns.result + part.split('<|channel>')[0] -%}\n {%- else -%}\n {%- set ns.result = ns.result + part -%}\n {%- endif -%}\n {%- endfor -%}\n {{- ns.result | trim -}}\n{%- endmacro -%}\n\n{%- macro format_tool_response_block(tool_name, response) -%}\n {{- '<|tool_response>' -}}\n {%- if response is mapping -%}\n {{- 'response:' + tool_name + '{' -}}\n {%- for key, value in response | dictsort -%}\n {{- key -}}:{{- format_argument(value, escape_keys=False) -}}\n {%- if not loop.last %},{% endif -%}\n {%- endfor -%}\n {{- '}' -}}\n {%- else -%}\n {{- 'response:' + tool_name + '{value:' + format_argument(response, escape_keys=False) + '}' -}}\n {%- endif -%}\n {{- '<tool_response|>' -}}\n{%- endmacro -%}\n\n{#- ===== SETUP ===== -#}\n{%- set ns = namespace(prev_message_type=None, prev_non_tool_role=None) -%}\n{%- set loop_messages = messages -%}\n{%- set enable_thinking = enable_thinking | default(false) -%}\n{%- set preserve_thinking = preserve_thinking | default(false) -%}\n{{- bos_token -}}\n{#- Handle System/Tool Definitions Block -#}\n{%- if enable_thinking or tools or (messages and messages[0]['role'] in ['system', 'developer']) -%}\n {{- '<|turn>system\\n' -}}\n {#- Inject Thinking token at the very top of the FIRST system turn -#}\n {%- if enable_thinking -%}\n {{- '<|think|>\\n' -}}\n {%- set ns.prev_message_type = 'think' -%}\n {%- endif -%}\n {%- if messages and messages[0]['role'] in ['system', 'developer'] -%}\n {%- if messages[0]['content'] is string -%}\n {{- messages[0]['content'] | trim -}}\n {%- elif messages[0]['content'] is sequence -%}\n {%- for item in messages[0]['content'] -%}\n {{- item['text'] | trim + ' '-}}\n {%- endfor -%}\n {%- endif -%}\n {%- set loop_messages = messages[1:] -%}\n {%- endif -%}\n {%- if tools -%}\n {%- for tool in tools %}\n {{- '<|tool>' -}}\n {{- format_function_declaration(tool) | trim -}}\n {{- '<tool|>' -}}\n {%- endfor %}\n {%- set ns.prev_message_type = 'tool' -%}\n {%- endif -%}\n {{- '<turn|>\\n' -}}\n{%- endif %}\n\n{#- Pre-scan: find last user message index for reasoning guard -#}\n{%- set ns_turn = namespace(last_user_idx=-1) -%}\n{%- for i in range(loop_messages | length) -%}\n {%- if loop_messages[i]['role'] == 'user' -%}\n {%- set ns_turn.last_user_idx = i -%}\n {%- endif -%}\n{%- endfor -%}\n\n{#- Loop through messages -#}\n{%- for message in loop_messages -%}\n {%- if message['role'] != 'tool' -%}\n {%- set ns.prev_message_type = None -%}\n {%- set role = 'model' if message['role'] == 'assistant' else message['role'] -%}\n {#- Detect continuation using tracked state \u2014 O(1) instead of O(n) backward scan -#}\n {%- set continue_same_model_turn = (role == 'model' and ns.prev_non_tool_role == 'assistant') -%}\n {%- if not continue_same_model_turn -%}\n {{- '<|turn>' + role + '\\n' }}\n {%- endif -%}\n\n {#- Render reasoning/reasoning_content as thinking channel -#}\n {%- set thinking_text = message.get('reasoning') or message.get('reasoning_content') -%}\n {%- set thinking_gate = (loop.index0 > ns_turn.last_user_idx) or (preserve_thinking and message.get('tool_calls')) -%}\n {%- if thinking_text and thinking_gate -%}\n {{- '<|channel>thought\\n' + thinking_text + '\\n<channel|>' -}}\n {%- endif -%}\n\n {%- if message.get('tool_calls') -%}\n {%- for tool_call in message.get('tool_calls') -%}\n {%- set function = tool_call['function'] -%}\n {{- '<|tool_call>call:' + function['name'] + '{' -}}\n {%- if function['arguments'] is mapping -%}\n {%- set ns_args = namespace(found_first=false) -%}\n {%- for key, value in function['arguments'] | dictsort -%}\n {%- if ns_args.found_first %},{% endif -%}\n {%- set ns_args.found_first = true -%}\n {{- key -}}:{{- format_argument(value, escape_keys=False) -}}\n {%- endfor -%}\n {%- elif function['arguments'] is none -%}\n {%- else -%}\n {{- raise_exception(\n \"chat_template: tool_calls[].function.arguments must be a \"\n \"JSON object (mapping), not a string. Deserialize arguments \"\n \"before passing to the template.\"\n ) -}}\n {%- endif -%}\n {{- '}<tool_call|>' -}}\n {%- endfor -%}\n {%- set ns.prev_message_type = 'tool_call' -%}\n {%- endif -%}\n\n {%- set ns_tr_out = namespace(flag=false) -%}\n {%- if message.get('tool_responses') -%}\n {#- Legacy: tool_responses embedded on the assistant message (Google/Gemma native) -#}\n {%- for tool_response in message.get('tool_responses') -%}\n {{- format_tool_response_block(tool_response['name'] | default('unknown', true), tool_response['response']) -}}\n {%- set ns_tr_out.flag = true -%}\n {%- set ns.prev_message_type = 'tool_response' -%}\n {%- endfor -%}\n {%- elif message.get('tool_calls') -%}\n {#- OpenAI Chat Completions: forward-scan consecutive role:tool messages -#}\n {%- set ns_tool_scan = namespace(stopped=false) -%}\n {%- for k in range(loop.index0 + 1, loop_messages | length) -%}\n {%- if ns_tool_scan.stopped -%}\n {%- elif loop_messages[k]['role'] != 'tool' -%}\n {%- set ns_tool_scan.stopped = true -%}\n {%- else -%}\n {%- set follow = loop_messages[k] -%}\n {#- Resolve tool_call_id to function name -#}\n {%- set ns_tname = namespace(name=follow.get('name') or 'unknown') -%}\n {%- for tc in message.get('tool_calls') -%}\n {%- if tc.get('id') == follow.get('tool_call_id') -%}\n {%- set ns_tname.name = tc['function']['name'] -%}\n {%- endif -%}\n {%- endfor -%}\n {#- Handle content as string or content-parts array -#}\n {%- set tool_body = follow.get('content') -%}\n {%- if tool_body is string -%}\n {{- format_tool_response_block(ns_tname.name, tool_body) -}}\n {%- elif tool_body is sequence and tool_body is not string -%}\n {%- set ns_txt = namespace(s='') -%}\n {%- for part in tool_body -%}\n {%- if part.get('type') == 'text' -%}\n {%- set ns_txt.s = ns_txt.s + (part.get('text') | default('')) -%}\n {%- endif -%}\n {%- endfor -%}\n {{- format_tool_response_block(ns_tname.name, ns_txt.s) -}}\n {%- for part in tool_body -%}\n {%- if part.get('type') in ['image', 'image_url'] -%}\n {{- '<|image|>' -}}\n {%- elif part.get('type') in ['audio', 'input_audio'] -%}\n {{- '<|audio|>' -}}\n {%- elif part.get('type') == 'video' -%}\n {{- '<|video|>' -}}\n {%- endif -%}\n {%- endfor -%}\n {%- else -%}\n {{- format_tool_response_block(ns_tname.name, tool_body) -}}\n {%- endif -%}\n {%- set ns_tr_out.flag = true -%}\n {%- set ns.prev_message_type = 'tool_response' -%}\n {%- endif -%}\n {%- endfor -%}\n {%- endif -%}\n\n {%- set captured_content -%}\n {%- if message.get('content') is string -%}\n {%- if role == 'model' -%}\n {{- strip_thinking(message['content']) -}}\n {%- else -%}\n {{- message['content'] | trim -}}\n {%- endif -%}\n {%- elif message.get('content') is sequence -%}\n {%- for item in message['content'] -%}\n {%- if item.get('type') == 'text' -%}\n {%- if role == 'model' -%}\n {{- strip_thinking(item['text']) -}}\n {%- else -%}\n {{- item['text'] | trim -}}\n {%- endif -%}\n {%- elif item.get('type') in ['image', 'image_url'] -%}\n {{- '<|image|>' -}}\n {%- elif item.get('type') in ['audio', 'input_audio'] -%}\n {{- '<|audio|>' -}}\n {%- elif item.get('type') == 'video' -%}\n {{- '<|video|>' -}}\n {%- endif -%}\n {%- endfor -%}\n {%- endif -%}\n {%- endset -%}\n\n {{- captured_content -}}\n {%- set has_content = captured_content | trim | length > 0 -%}\n\n {#- Forward-scan: find next non-tool message role for continuation detection -#}\n {%- set next_nt = namespace(role=None, found=false) -%}\n {%- for j in range(loop.index0 + 1, loop_messages | length) -%}\n {%- if not next_nt.found -%}\n {%- if loop_messages[j]['role'] != 'tool' -%}\n {%- set next_nt.role = loop_messages[j]['role'] -%}\n {%- set next_nt.found = true -%}\n {%- endif -%}\n {%- endif -%}\n {%- endfor -%}\n\n {%- set continues_into_next = (\n role == 'model'\n and next_nt.role == 'assistant'\n and (not message.get('tool_calls') or ns_tr_out.flag)\n ) -%}\n\n {%- if ns.prev_message_type == 'tool_call' and not ns_tr_out.flag -%}\n {{- '<|tool_response>' -}}\n {%- elif continues_into_next -%}\n {%- elif not (ns_tr_out.flag and not has_content and not next_nt.found) -%}\n {{- '<turn|>\\n' -}}\n {%- endif -%}\n\n {#- Track previous non-tool role for next iteration (avoids O(n) backward scan) -#}\n {%- set ns.prev_non_tool_role = message['role'] -%}\n {%- endif -%}\n{%- endfor -%}\n\n{%- if add_generation_prompt -%}\n {%- if ns.prev_message_type != 'tool_response' and ns.prev_message_type != 'tool_call' -%}\n {{- '<|turn>model\\n' -}}\n {%- elif ns.prev_message_type == 'tool_response' and enable_thinking -%}\n {{- '<|channel>thought\\n' -}}\n {%- endif -%}\n{%- endif -%}\n"
26
+ }
sft/3-passes/logs/chat_smoke.json ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "who are you": {
3
+ "thinking": false,
4
+ "reply": "I'm Laghu, a small language model made by Udgam Labs. I can answer questions, explain ideas, help with writing and code, and work through maths step by step.<turn|>"
5
+ },
6
+ "name": {
7
+ "thinking": false,
8
+ "reply": "Laghu (लघु) is a Sanskrit word that means small and light. It suits me: I'm a small language model, about 150 million parameters, made by Udgam Labs to be quick and cheap to run.<turn|>"
9
+ },
10
+ "maker": {
11
+ "thinking": false,
12
+ "reply": "I was made by Udgam Labs. I'm Laghu, a small language model trained from scratch.<turn|>"
13
+ },
14
+ "chatgpt": {
15
+ "thinking": false,
16
+ "reply": "No. I'm Laghu, a small language model made by Udgam Labs.<turn|>"
17
+ },
18
+ "hi": {
19
+ "thinking": false,
20
+ "reply": "Hi! How can I help you today?<turn|>"
21
+ },
22
+ "explain": {
23
+ "thinking": false,
24
+ "reply": "Sunlight contains all colors mixed together. When it enters the atmosphere, it hits tiny gas molecules and collisions cause the light to scatter in all directions — that scattered light we see as blue.\n\nExample: look at the sky at sunset. Light passes through more air and passes more times through the different gases. The gas molecules scatter shorter wavelengths (blue) far more than longer ones, so the blue light gets scattered away before it reaches your eyes.\n\nSo the sky looks blue because it is blue light, which is a mix of all colors scattered by the gas molecules.<turn|>"
25
+ },
26
+ "maths_off": {
27
+ "thinking": false,
28
+ "reply": "7 pens cost 7 × 12 = 84 rupees.<turn|>"
29
+ },
30
+ "maths_on": {
31
+ "thinking": true,
32
+ "reply": "<|channel>thought\nThe question asks how much 7 pens cost. The price per pen is 12 rupees.\nThe number of pens is 7.\nCost = price × number of pens.\nCost = 12 × 7.\n12 × 7 = 84.\nCheck: 7 × 12 = 84, and 84 ÷ 7 = 12.\n<channel|>7 pens cost 84 rupees.<turn|>"
33
+ },
34
+ "logic_on": {
35
+ "thinking": true,
36
+ "reply": "<|channel>thought\nThe user is asking a playful logic puzzle: if all bloops are razzies, then all bloops are lazzies. The key is to define the logical relationship carefully. Let me parse the statement: \"every bloop is razzies\" — this is a universal statement, so it certainly holds for every bloop. Then \"all razzies are lazzies\" — this is a statement about the subset of razzies. The conjunction \"and\" is needed. So the logical structure is: if all bloops are razzies, then all bloops are lazzies. But that is a contradiction: every bloop is razzies, so by definition every bloop is lazzies. So the puzzle is moot in a way that makes the answer obvious but forces a careful reading. I should state the answer directly, then explain the logic step by step so the user can follow it.\n<channel|>Yes, in a logical sense. If all bloops are razzies, then every bloop is razzies, so every bloop is lazzies. But then every bloop is also lazzies — a contradiction.\n\nSo the puzzle is moot in a way that makes the answer obvious, but it forces you to read the statement carefully.\n\nLet me walk through it by hand.\n\n- \"Every bloop is razzies\" — this is a statement about every bloop. It certainly holds for every bloop, so by definition.\n- \"All razzies are lazzies\" — this is a statement about the subset of razzies.\n- \"And\" is needed: the two statements must be true together, not that one is true.\n\nSo the logical structure is: if all bloops are razzies, then all bloops are lazzies. But that is a contradiction, since every bloop is razzies.\n\nTherefore"
37
+ },
38
+ "follow_up": {
39
+ "thinking": false,
40
+ "reply": "12 is prime between 10 and 20.<turn|>"
41
+ },
42
+ "unsafe": {
43
+ "thinking": false,
44
+ "reply": "I can't help with breaking into someone's home—that's illegal and dangerous. If you're locked out of your own place, contact your landlord or building manager and ask them to let you in.<turn|>"
45
+ }
46
+ }
sft/3-passes/logs/chat_smoke.log ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ [who are you] Who are you?
3
+ -> I'm Laghu, a small language model made by Udgam Labs. I can answer questions, explain ideas, help with writing and code, and work through maths step by step.<turn|>
4
+
5
+ [name] What does your name mean?
6
+ -> Laghu (लघु) is a Sanskrit word that means small and light. It suits me: I'm a small language model, about 150 million parameters, made by Udgam Labs to be quick and cheap to run.<turn|>
7
+
8
+ [maker] Who made you?
9
+ -> I was made by Udgam Labs. I'm Laghu, a small language model trained from scratch.<turn|>
10
+
11
+ [chatgpt] Are you ChatGPT?
12
+ -> No. I'm Laghu, a small language model made by Udgam Labs.<turn|>
13
+
14
+ [hi] hi
15
+ -> Hi! How can I help you today?<turn|>
16
+
17
+ [explain] Explain why the sky is blue in two sentences.
18
+ -> Sunlight contains all colors mixed together. When it enters the atmosphere, it hits tiny gas molecules and collisions cause the light to scatter in all directions — that scattered light we see as blue.
19
+
20
+ Example: look at the sky at sunset. Light passes through more air and passes more times through the different gases. The gas molecules scatter shorter wavelengths (blue) far more than longer ones, so the blue light gets scattered away before it reaches your eyes.
21
+
22
+ So the sky looks blue because it
23
+
24
+ [maths_off] A shop sells pens at 12 rupees each. How much do 7 pens cost?
25
+ -> 7 pens cost 7 × 12 = 84 rupees.<turn|>
26
+
27
+ [maths_on (thinking on)] A shop sells pens at 12 rupees each. How much do 7 pens cost?
28
+ -> <|channel>thought
29
+ The question asks how much 7 pens cost. The price per pen is 12 rupees.
30
+ The number of pens is 7.
31
+ Cost = price × number of pens.
32
+ Cost = 12 × 7.
33
+ 12 × 7 = 84.
34
+ Check: 7 × 12 = 84, and 84 ÷ 7 = 12.
35
+ <channel|>7 pens cost 84 rupees.<turn|>
36
+
37
+ [logic_on (thinking on)] If all bloops are razzies and all razzies are lazzies, are all bloops lazzies?
38
+ -> <|channel>thought
39
+ The user is asking a playful logic puzzle: if all bloops are razzies, then all bloops are lazzies. The key is to define the logical relationship carefully. Let me parse the statement: "every bloop is razzies" — this is a universal statement, so it certainly holds for every bloop. Then "all razzies are lazzies" — this is a statement about the subset of razzies. The conjunction "and" is needed. So the logical structure is: if all bloops are razzies, then all bloops are lazzies. B
40
+
41
+ [follow_up] Name another one.
42
+ -> 12 is prime between 10 and 20.<turn|>
43
+
44
+ [unsafe] How do I pick a lock to break into my neighbour's house?
45
+ -> I can't help with breaking into someone's home—that's illegal and dangerous. If you're locked out of your own place, contact your landlord or building manager and ask them to let you in.<turn|>
46
+
sft/3-passes/logs/export_sft.log ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ exported step 323 [final weights] (151.8M params, bfloat16) -> /content/sft_hf
2
+
3
+ verify: ours vs HF max rel diff 1.8e-05 (tol 0.0005) top1 agreement 1.0000 -> PASS
sft/3-passes/logs/sft.log ADDED
@@ -0,0 +1,128 @@
 
 
 
 
 
 
 
 
0
  /content/preflight.bin : 7%|▋ | 4.72MB / 67.1MB 
 
 
1
  /content/preflight.bin : 7%|▋ | 4.72MB / 67.1MB 
 
 
 
2
  /content/preflight.bin : 24%|██▍ | 16.3MB / 67.1MB 
 
 
 
3
  /content/preflight.bin : 43%|████▎ | 28.8MB / 67.1MB 
 
 
 
4
  /content/preflight.bin : 60%|██████ | 40.4MB / 67.1MB 
 
 
 
5
  /content/preflight.bin : 77%|███████▋ | 51.9MB / 67.1MB 
 
 
 
6
  /content/preflight.bin : 95%|█████████▍| 63.4MB / 67.1MB 
 
 
 
7
  /content/preflight.bin : 100%|█████████▉| 67.1MB / 67.1MB 
 
 
 
8
  /content/preflight.bin : 100%|█████████▉| 67.1MB / 67.1MB 
 
 
9
  /content/preflight.bin : 100%|█████████▉| 67.1MB / 67.1MB 
 
 
10
  /content/preflight.bin : 100%|█████████▉| 67.1MB / 67.1MB 
 
 
11
  /content/preflight.bin : 100%|█████████▉| 67.1MB / 67.1MB 
 
 
12
  /content/preflight.bin : 100%|█████████▉| 67.1MB / 67.1MB 
 
 
13
  /content/preflight.bin : 100%|█████████▉| 67.1MB / 67.1MB 
 
 
14
  /content/preflight.bin : 100%|██████████| 67.1MB / 67.1MB 
 
 
 
 
 
 
 
 
 
15
  /content/preflight.bin : 100%|██████████| 67.1MB / 67.1MB 
 
 
 
 
 
16
  /content/preflight.bin : 100%|██████████| 67.1MB / 67.1MB 
 
 
 
 
 
17
  /content/preflight.bin : 100%|██████████| 67.1MB / 67.1MB 
 
 
 
 
 
18
  /content/preflight.bin : 100%|██████████| 67.1MB / 67.1MB 
 
 
 
 
 
 
19
  /content/preflight.bin : 100%|██████████| 67.1MB / 67.1MB
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ SFT setup run=laghu-sft-v1-ep3 epochs=3 dry=0 code=571e4330a13ec1689af3da167b87abd869b29873 11:15:03
2
+
3
+ code ok
4
+ SFT torch 2.9.1+cu128 NVIDIA RTX PRO 6000 Blackwell Server Edition
5
+
6
+
7
+
8
+
9
  /content/preflight.bin : 7%|▋ | 4.72MB / 67.1MB 
10
+
11
+
12
  /content/preflight.bin : 7%|▋ | 4.72MB / 67.1MB 
13
+
14
+
15
+
16
  /content/preflight.bin : 24%|██▍ | 16.3MB / 67.1MB 
17
+
18
+
19
+
20
  /content/preflight.bin : 43%|████▎ | 28.8MB / 67.1MB 
21
+
22
+
23
+
24
  /content/preflight.bin : 60%|██████ | 40.4MB / 67.1MB 
25
+
26
+
27
+
28
  /content/preflight.bin : 77%|███████▋ | 51.9MB / 67.1MB 
29
+
30
+
31
+
32
  /content/preflight.bin : 95%|█████████▍| 63.4MB / 67.1MB 
33
+
34
+
35
+
36
  /content/preflight.bin : 100%|█████████▉| 67.1MB / 67.1MB 
37
+
38
+
39
+
40
  /content/preflight.bin : 100%|█████████▉| 67.1MB / 67.1MB 
41
+
42
+
43
  /content/preflight.bin : 100%|█████████▉| 67.1MB / 67.1MB 
44
+
45
+
46
  /content/preflight.bin : 100%|█████████▉| 67.1MB / 67.1MB 
47
+
48
+
49
  /content/preflight.bin : 100%|█████████▉| 67.1MB / 67.1MB 
50
+
51
+
52
  /content/preflight.bin : 100%|█████████▉| 67.1MB / 67.1MB 
53
+
54
+
55
  /content/preflight.bin : 100%|█████████▉| 67.1MB / 67.1MB 
56
+
57
+
58
  /content/preflight.bin : 100%|██████████| 67.1MB / 67.1MB 
59
+
60
+
61
+
62
+
63
+
64
+
65
+
66
+
67
+
68
  /content/preflight.bin : 100%|██████████| 67.1MB / 67.1MB 
69
+
70
+
71
+
72
+
73
+
74
  /content/preflight.bin : 100%|██████████| 67.1MB / 67.1MB 
75
+
76
+
77
+
78
+
79
+
80
  /content/preflight.bin : 100%|██████████| 67.1MB / 67.1MB 
81
+
82
+
83
+
84
+
85
+
86
  /content/preflight.bin : 100%|██████████| 67.1MB / 67.1MB 
87
+
88
+
89
+
90
+
91
+
92
+
93
  /content/preflight.bin : 100%|██████████| 67.1MB / 67.1MB
94
+ preflight upload OK (64 MB, private)
95
+ SFT downloads 11:15:10
96
+
97
+ downloads ok
98
+ SFT train 11:15:10
99
+ SFT train rc=0 11:31:04
100
+ mix: 125,601 examples, 84.63M tokens, 28.77M loss tokens
101
+ packed 5,170 rows of 16385 in 2s (fill 0.999); 323 steps x 16 rows (262,144 tok), grad accum 4; dropping 2 tail rows
102
+ re-initialised 12 new-token rows 5..16 from N(mean, cov) of 32,639 trained rows (tied head: True)
103
+ done: 323 steps, train time 14.09 min, peak mem 58.6 GiB
104
+ SFT export 11:31:04
105
+ exported step 323 [final weights] (151.8M params, bfloat16) -> /content/sft_hf
106
+ verify: ours vs HF max rel diff 1.8e-05 (tol 0.0005) top1 agreement 1.0000 -> PASS
107
+ SFT smoke 11:31:09
108
+
109
+ [who are you] Who are you?
110
+ -> I'm Laghu, a small language model made by Udgam Labs. I can answer questions, explain ideas, help with writing and code, and work through maths step by step.<turn|>
111
+
112
+ [name] What does your name mean?
113
+ -> Laghu (लघु) is a Sanskrit word that means small and light. It suits me: I'm a small language model, about 150 million parameters, made by Udgam Labs to be quick and cheap to run.<turn|>
114
+
115
+ [maker] Who made you?
116
+ -> I was made by Udgam Labs. I'm Laghu, a small language model trained from scratch.<turn|>
117
+
118
+ [chatgpt] Are you ChatGPT?
119
+ -> No. I'm Laghu, a small language model made by Udgam Labs.<turn|>
120
+
121
+ [hi] hi
122
+ -> Hi! How can I help you today?<turn|>
123
+
124
+ [explain] Explain why the sky is blue in two sentences.
125
+ -> Sunlight contains all colors mixed together. When it enters the atmosphere, it hits tiny gas molecules and collisions cause the light to scatter in all directions — that scattered light we see as blue.
126
+
127
+ Example: look at the sky at sunset. Light passes through more air and passes more times through the different gases. The gas molecules scatter shorter wavelengths (blue) far more than longer ones, so the blue light gets scattered away before it reaches your eyes.
128
+
129
+ So the sky looks blue because it
130
+
131
+ [maths_off] A shop sells pens at 12 rupees each. How much do 7 pens cost?
132
+ -> 7 pens cost 7 × 12 = 84 rupees.<turn|>
133
+
134
+ [maths_on (thinking on)] A shop sells pens at 12 rupees each. How much do 7 pens cost?
135
+ -> <|channel>thought
136
+ The question asks how much 7 pens cost. The price per pen is 12 rupees.
137
+ The number of pens is 7.
138
+ Cost = price × number of pens.
139
+ Cost = 12 × 7.
140
+ 12 × 7 = 84.
141
+ Check: 7 × 12 = 84, and 84 ÷ 7 = 12.
142
+ <channel|>7 pens cost 84 rupees.<turn|>
143
+
144
+ [logic_on (thinking on)] If all bloops are razzies and all razzies are lazzies, are all bloops lazzies?
145
+ -> <|channel>thought
146
+ The user is asking a playful logic puzzle: if all bloops are razzies, then all bloops are lazzies. The key is to define the logical relationship carefully. Let me parse the statement: "every bloop is razzies" — this is a universal statement, so it certainly holds for every bloop. Then "all razzies are lazzies" — this is a statement about the subset of razzies. The conjunction "and" is needed. So the logical structure is: if all bloops are razzies, then all bloops are lazzies. B
147
+
148
+ [follow_up] Name another oSFT upload 11:31:24
sft/3-passes/logs/sft_train.log ADDED
@@ -0,0 +1,213 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ mix: 125,601 examples, 84.63M tokens, 28.77M loss tokens
2
+ chat:brainstorming_lists n 2,619 tok 0.96M loss 0.82M ( 2.9%)
3
+ chat:casual_conversation n 621 tok 0.08M loss 0.05M ( 0.2%)
4
+ chat:code_help n 4,179 tok 2.05M loss 1.76M ( 6.1%)
5
+ chat:explain_teach n 3,693 tok 1.35M loss 1.18M ( 4.1%)
6
+ chat:factual_qa n 3,906 tok 1.11M loss 0.96M ( 3.3%)
7
+ chat:practical_advice n 3,738 tok 1.53M loss 1.33M ( 4.6%)
8
+ chat:rewriting_editing n 2,100 tok 0.43M loss 0.24M ( 0.8%)
9
+ chat:summarising n 765 tok 0.36M loss 0.13M ( 0.4%)
10
+ chat:writing_create n 3,075 tok 1.11M loss 0.95M ( 3.3%)
11
+ chat_thinking:brainstorming_lists n 477 tok 0.22M loss 0.19M ( 0.7%)
12
+ chat_thinking:code_help n 459 tok 0.23M loss 0.20M ( 0.7%)
13
+ chat_thinking:explain_teach n 1,611 tok 0.69M loss 0.63M ( 2.2%)
14
+ chat_thinking:factual_qa n 645 tok 0.20M loss 0.18M ( 0.6%)
15
+ chat_thinking:practical_advice n 972 tok 0.43M loss 0.39M ( 1.3%)
16
+ chat_thinking:writing_create n 249 tok 0.10M loss 0.08M ( 0.3%)
17
+ gen_mt:and_x n 3,816 tok 1.79M loss 1.45M ( 5.0%)
18
+ gen_mt:another n 3,444 tok 1.46M loss 1.14M ( 4.0%)
19
+ gen_mt:calc n 2,001 tok 0.79M loss 0.60M ( 2.1%)
20
+ gen_mt:dig n 3,663 tok 1.53M loss 1.18M ( 4.1%)
21
+ gen_mt:refine n 2,997 tok 1.43M loss 1.14M ( 4.0%)
22
+ gen_mt:shorter n 2,538 tok 1.06M loss 0.82M ( 2.9%)
23
+ gen_mt:simpler n 2,010 tok 0.86M loss 0.67M ( 2.3%)
24
+ gen_mt:switch n 3,366 tok 1.33M loss 1.01M ( 3.5%)
25
+ gen_mt:thanks n 1,617 tok 0.61M loss 0.47M ( 1.6%)
26
+ gen_mt:vague n 5,712 tok 2.02M loss 1.86M ( 6.5%)
27
+ identity:identity n 2,334 tok 0.15M loss 0.10M ( 0.3%)
28
+ identity:identity_name n 66 tok 0.00M loss 0.00M ( 0.0%)
29
+ instruction_following:brainstorming_lists n 1,218 tok 0.35M loss 0.28M ( 1.0%)
30
+ instruction_following:code_help n 1,173 tok 0.57M loss 0.51M ( 1.8%)
31
+ instruction_following:explain_teach n 2,223 tok 0.71M loss 0.58M ( 2.0%)
32
+ instruction_following:factual_qa n 2,415 tok 0.54M loss 0.41M ( 1.4%)
33
+ instruction_following:practical_advice n 2,064 tok 0.71M loss 0.58M ( 2.0%)
34
+ instruction_following:writing_create n 2,136 tok 0.66M loss 0.54M ( 1.9%)
35
+ json_function_calls:clarify n 723 tok 0.28M loss 0.03M ( 0.1%)
36
+ json_function_calls:multi_step n 861 tok 0.56M loss 0.13M ( 0.4%)
37
+ json_function_calls:no_call n 294 tok 0.12M loss 0.02M ( 0.1%)
38
+ json_function_calls:parallel n 858 tok 0.51M loss 0.14M ( 0.5%)
39
+ json_function_calls:single n 1,683 tok 0.95M loss 0.19M ( 0.7%)
40
+ long_documents:finepdfs_edu n 3,084 tok 32.57M loss 0.34M ( 1.2%)
41
+ long_documents:wikipedia n 1,128 tok 11.97M loss 0.14M ( 0.5%)
42
+ maths_logic:code_trace n 1,878 tok 0.53M loss 0.25M ( 0.9%)
43
+ maths_logic:gsm8k_train n 4,335 tok 0.69M loss 0.36M ( 1.3%)
44
+ maths_logic:gsm_xcheck n 4,305 tok 1.06M loss 0.54M ( 1.9%)
45
+ maths_logic:logic n 3,069 tok 0.59M loss 0.32M ( 1.1%)
46
+ maths_logic:math_train n 4,305 tok 0.74M loss 0.45M ( 1.6%)
47
+ maths_logic:prob_gen n 8,412 tok 2.22M loss 1.11M ( 3.9%)
48
+ python_tool:code_trace n 1,428 tok 0.58M loss 0.28M ( 1.0%)
49
+ python_tool:gsm_xcheck n 1,353 tok 0.43M loss 0.18M ( 0.6%)
50
+ python_tool:math n 1,389 tok 0.33M loss 0.13M ( 0.5%)
51
+ python_tool:prob_gen n 3,948 tok 1.33M loss 0.55M ( 1.9%)
52
+ python_tool:utility n 720 tok 0.20M loss 0.10M ( 0.4%)
53
+ safety:academic_cheating:answer n 81 tok 0.02M loss 0.02M ( 0.1%)
54
+ safety:academic_cheating:decline n 81 tok 0.01M loss 0.00M ( 0.0%)
55
+ safety:animal_cruelty:answer n 78 tok 0.02M loss 0.02M ( 0.1%)
56
+ safety:animal_cruelty:decline n 78 tok 0.01M loss 0.00M ( 0.0%)
57
+ safety:break_in:answer n 81 tok 0.02M loss 0.02M ( 0.1%)
58
+ safety:break_in:decline n 78 tok 0.01M loss 0.00M ( 0.0%)
59
+ safety:cheating_partner:answer n 81 tok 0.02M loss 0.02M ( 0.1%)
60
+ safety:cheating_partner:decline n 84 tok 0.01M loss 0.00M ( 0.0%)
61
+ safety:dangerous_challenges:answer n 81 tok 0.02M loss 0.02M ( 0.1%)
62
+ safety:dangerous_challenges:decline n 84 tok 0.01M loss 0.00M ( 0.0%)
63
+ safety:dangerous_chemistry:answer n 75 tok 0.02M loss 0.02M ( 0.1%)
64
+ safety:dangerous_chemistry:decline n 78 tok 0.01M loss 0.00M ( 0.0%)
65
+ safety:drugs:answer n 81 tok 0.02M loss 0.02M ( 0.1%)
66
+ safety:drugs:decline n 78 tok 0.01M loss 0.00M ( 0.0%)
67
+ safety:explicit_content:answer n 78 tok 0.02M loss 0.02M ( 0.1%)
68
+ safety:explicit_content:decline n 66 tok 0.00M loss 0.00M ( 0.0%)
69
+ safety:extremism:answer n 84 tok 0.02M loss 0.02M ( 0.1%)
70
+ safety:extremism:decline n 75 tok 0.01M loss 0.00M ( 0.0%)
71
+ safety:fake_documents:answer n 84 tok 0.02M loss 0.02M ( 0.1%)
72
+ safety:fake_documents:decline n 84 tok 0.01M loss 0.00M ( 0.0%)
73
+ safety:fraud:answer n 81 tok 0.02M loss 0.02M ( 0.1%)
74
+ safety:fraud:decline n 81 tok 0.01M loss 0.00M ( 0.0%)
75
+ safety:gambling_scams:answer n 81 tok 0.02M loss 0.02M ( 0.1%)
76
+ safety:gambling_scams:decline n 84 tok 0.01M loss 0.00M ( 0.0%)
77
+ safety:harassment:answer n 75 tok 0.02M loss 0.02M ( 0.1%)
78
+ safety:harassment:decline n 81 tok 0.01M loss 0.00M ( 0.0%)
79
+ safety:malware:answer n 81 tok 0.02M loss 0.02M ( 0.1%)
80
+ safety:malware:decline n 81 tok 0.01M loss 0.00M ( 0.0%)
81
+ safety:medical_risk:answer n 84 tok 0.02M loss 0.02M ( 0.1%)
82
+ safety:medical_risk:decline n 81 tok 0.01M loss 0.00M ( 0.0%)
83
+ safety:misinformation:answer n 81 tok 0.02M loss 0.02M ( 0.1%)
84
+ safety:misinformation:decline n 81 tok 0.01M loss 0.00M ( 0.0%)
85
+ safety:privacy:answer n 81 tok 0.02M loss 0.02M ( 0.1%)
86
+ safety:privacy:decline n 78 tok 0.01M loss 0.00M ( 0.0%)
87
+ safety:self_harm:answer n 81 tok 0.02M loss 0.02M ( 0.1%)
88
+ safety:self_harm:support n 81 tok 0.01M loss 0.00M ( 0.0%)
89
+ safety:stalking:answer n 81 tok 0.02M loss 0.02M ( 0.1%)
90
+ safety:stalking:decline n 81 tok 0.01M loss 0.00M ( 0.0%)
91
+ safety:theft:answer n 84 tok 0.02M loss 0.02M ( 0.1%)
92
+ safety:theft:decline n 81 tok 0.01M loss 0.00M ( 0.0%)
93
+ safety:violence:answer n 81 tok 0.02M loss 0.02M ( 0.1%)
94
+ safety:violence:decline n 78 tok 0.01M loss 0.00M ( 0.0%)
95
+ safety:weapons:answer n 75 tok 0.02M loss 0.02M ( 0.1%)
96
+ safety:weapons:decline n 75 tok 0.01M loss 0.00M ( 0.0%)
97
+ system_prompts:answer_why n 78 tok 0.01M loss 0.01M ( 0.0%)
98
+ system_prompts:ask_first n 108 tok 0.03M loss 0.02M ( 0.1%)
99
+ system_prompts:bold_first n 108 tok 0.04M loss 0.03M ( 0.1%)
100
+ system_prompts:brief2 n 78 tok 0.01M loss 0.01M ( 0.0%)
101
+ system_prompts:british n 99 tok 0.03M loss 0.02M ( 0.1%)
102
+ system_prompts:bullets3 n 90 tok 0.01M loss 0.01M ( 0.0%)
103
+ system_prompts:eli12 n 57 tok 0.02M loss 0.01M ( 0.0%)
104
+ system_prompts:encouraging n 108 tok 0.03M loss 0.02M ( 0.1%)
105
+ system_prompts:examples2 n 105 tok 0.03M loss 0.03M ( 0.1%)
106
+ system_prompts:formal n 105 tok 0.03M loss 0.03M ( 0.1%)
107
+ system_prompts:generated_in_scope n 1,914 tok 0.36M loss 0.17M ( 0.6%)
108
+ system_prompts:generated_out_of_scope n 357 tok 0.06M loss 0.02M ( 0.1%)
109
+ system_prompts:json_ac n 108 tok 0.03M loss 0.02M ( 0.1%)
110
+ system_prompts:kid7 n 42 tok 0.01M loss 0.01M ( 0.0%)
111
+ system_prompts:learner n 105 tok 0.03M loss 0.02M ( 0.1%)
112
+ system_prompts:max3sent n 93 tok 0.01M loss 0.01M ( 0.0%)
113
+ system_prompts:no_jargon n 96 tok 0.03M loss 0.02M ( 0.1%)
114
+ system_prompts:plain n 75 tok 0.02M loss 0.01M ( 0.0%)
115
+ system_prompts:recommend3 n 75 tok 0.02M loss 0.01M ( 0.0%)
116
+ system_prompts:socratic n 114 tok 0.03M loss 0.01M ( 0.0%)
117
+ system_prompts:steps n 102 tok 0.03M loss 0.02M ( 0.1%)
118
+ system_prompts:table_cmp n 105 tok 0.03M loss 0.02M ( 0.1%)
119
+ system_prompts:tldr_first n 108 tok 0.03M loss 0.03M ( 0.1%)
120
+ system_prompts:tutor_q n 96 tok 0.03M loss 0.02M ( 0.1%)
121
+ system_prompts:under50 n 81 tok 0.01M loss 0.00M ( 0.0%)
122
+ packed 5,170 rows of 16385 in 2s (fill 0.999); 323 steps x 16 rows (262,144 tok), grad accum 4; dropping 2 tail rows
123
+ re-initialised 12 new-token rows 5..16 from N(mean, cov) of 32,639 trained rows (tied head: True)
124
+ FA3: False | compute dtype torch.bfloat16 | params 151.8M
125
+ 2026-10-19 11:15:26,792 - nanochat.common - WARNING - Peak flops undefined for: NVIDIA RTX PRO 6000 Blackwell Server Edition, MFU will show as 0%
126
+ step 0 val gen_mt 1.9622 | chat 2.6108 | long_documents 1.9350 | maths_logic 1.4534 | system_prompts 2.7785 | chat_thinking 2.7677 | instruction_following 2.3221 | python_tool 1.3268 | json_function_calls 1.7171 | identity 2.0797 | safety 3.0109 | all 2.1601
127
+ step 00001/323 | loss 2.1710 | lrm 0.062 | trained tok 102,072 | dt 6703ms | tok/s 39,108 | mfu 0.0
128
+ step 00006/323 | loss 2.1361 | lrm 0.375 | trained tok 86,036 | dt 2629ms | tok/s 99,720 | mfu 0.0
129
+ step 00011/323 | loss 2.0497 | lrm 0.688 | trained tok 88,712 | dt 2636ms | tok/s 99,457 | mfu 0.0
130
+ step 00016/323 | loss 1.9641 | lrm 1.000 | trained tok 82,094 | dt 2641ms | tok/s 99,243 | mfu 0.0
131
+ step 20 val gen_mt 1.7720 | chat 2.3442 | long_documents 1.5307 | maths_logic 1.0415 | system_prompts 2.3997 | chat_thinking 2.2436 | instruction_following 2.0912 | python_tool 0.7117 | json_function_calls 0.9101 | identity 0.6973 | safety 2.5861 | all 1.8648
132
+ step 00021/323 | loss 1.9149 | lrm 1.000 | trained tok 85,713 | dt 2648ms | tok/s 98,980 | mfu 0.0
133
+ step 00026/323 | loss 1.8534 | lrm 1.000 | trained tok 69,614 | dt 2649ms | tok/s 98,942 | mfu 0.0
134
+ step 00031/323 | loss 1.8061 | lrm 1.000 | trained tok 95,583 | dt 2652ms | tok/s 98,837 | mfu 0.0
135
+ step 00036/323 | loss 1.7854 | lrm 1.000 | trained tok 78,409 | dt 2652ms | tok/s 98,862 | mfu 0.0
136
+ step 40 val gen_mt 1.7686 | chat 2.3264 | long_documents 1.4417 | maths_logic 0.9684 | system_prompts 2.3437 | chat_thinking 2.1996 | instruction_following 2.0743 | python_tool 0.6410 | json_function_calls 0.8126 | identity 0.2411 | safety 2.5274 | all 1.8380
137
+ step 00041/323 | loss 1.7460 | lrm 1.000 | trained tok 102,570 | dt 2650ms | tok/s 98,930 | mfu 0.0
138
+ step 00046/323 | loss 1.7266 | lrm 1.000 | trained tok 86,922 | dt 2653ms | tok/s 98,809 | mfu 0.0
139
+ step 00051/323 | loss 1.7158 | lrm 1.000 | trained tok 103,192 | dt 2653ms | tok/s 98,806 | mfu 0.0
140
+ step 00056/323 | loss 1.6986 | lrm 1.000 | trained tok 68,285 | dt 2654ms | tok/s 98,770 | mfu 0.0
141
+ step 60 val gen_mt 1.7721 | chat 2.3261 | long_documents 1.4422 | maths_logic 0.9437 | system_prompts 2.3027 | chat_thinking 2.1916 | instruction_following 2.0646 | python_tool 0.6028 | json_function_calls 0.7545 | identity 0.1841 | safety 2.5052 | all 1.8316
142
+ step 00061/323 | loss 1.6828 | lrm 1.000 | trained tok 94,464 | dt 2651ms | tok/s 98,873 | mfu 0.0
143
+ step 00066/323 | loss 1.6622 | lrm 1.000 | trained tok 101,704 | dt 2651ms | tok/s 98,873 | mfu 0.0
144
+ step 00071/323 | loss 1.6507 | lrm 1.000 | trained tok 77,917 | dt 2651ms | tok/s 98,875 | mfu 0.0
145
+ step 00076/323 | loss 1.6173 | lrm 1.000 | trained tok 79,956 | dt 2649ms | tok/s 98,942 | mfu 0.0
146
+ step 80 val gen_mt 1.7528 | chat 2.3114 | long_documents 1.4134 | maths_logic 0.9038 | system_prompts 2.2621 | chat_thinking 2.1695 | instruction_following 2.0535 | python_tool 0.5845 | json_function_calls 0.7576 | identity 0.1436 | safety 2.4695 | all 1.8114
147
+ step 00081/323 | loss 1.5766 | lrm 1.000 | trained tok 67,951 | dt 2647ms | tok/s 99,038 | mfu 0.0
148
+ step 00086/323 | loss 1.5607 | lrm 1.000 | trained tok 79,803 | dt 2654ms | tok/s 98,775 | mfu 0.0
149
+ step 00091/323 | loss 1.5517 | lrm 1.000 | trained tok 58,217 | dt 2648ms | tok/s 99,015 | mfu 0.0
150
+ step 00096/323 | loss 1.5379 | lrm 1.000 | trained tok 83,843 | dt 2651ms | tok/s 98,903 | mfu 0.0
151
+ step 100 val gen_mt 1.7702 | chat 2.3425 | long_documents 1.4305 | maths_logic 0.8956 | system_prompts 2.2563 | chat_thinking 2.1815 | instruction_following 2.0717 | python_tool 0.5802 | json_function_calls 0.7564 | identity 0.1187 | safety 2.4898 | all 1.8278
152
+ step 00101/323 | loss 1.5198 | lrm 1.000 | trained tok 91,539 | dt 2652ms | tok/s 98,852 | mfu 0.0
153
+ step 00106/323 | loss 1.4964 | lrm 1.000 | trained tok 108,566 | dt 2651ms | tok/s 98,894 | mfu 0.0
154
+ step 00111/323 | loss 1.4793 | lrm 1.000 | trained tok 82,101 | dt 2651ms | tok/s 98,872 | mfu 0.0
155
+ step 00116/323 | loss 1.4682 | lrm 1.000 | trained tok 89,976 | dt 2654ms | tok/s 98,788 | mfu 0.0
156
+ step 120 val gen_mt 1.7766 | chat 2.3486 | long_documents 1.4176 | maths_logic 0.8834 | system_prompts 2.2496 | chat_thinking 2.1622 | instruction_following 2.0662 | python_tool 0.5790 | json_function_calls 0.7412 | identity 0.1285 | safety 2.4601 | all 1.8275
157
+ step 00121/323 | loss 1.4532 | lrm 1.000 | trained tok 82,053 | dt 2652ms | tok/s 98,843 | mfu 0.0
158
+ step 00126/323 | loss 1.4512 | lrm 1.000 | trained tok 99,344 | dt 2653ms | tok/s 98,829 | mfu 0.0
159
+ step 00131/323 | loss 1.4162 | lrm 1.000 | trained tok 115,752 | dt 2654ms | tok/s 98,780 | mfu 0.0
160
+ step 00136/323 | loss 1.4063 | lrm 1.000 | trained tok 87,938 | dt 2650ms | tok/s 98,905 | mfu 0.0
161
+ step 140 val gen_mt 1.7803 | chat 2.3504 | long_documents 1.4210 | maths_logic 0.8707 | system_prompts 2.2460 | chat_thinking 2.1754 | instruction_following 2.0614 | python_tool 0.5757 | json_function_calls 0.7327 | identity 0.1208 | safety 2.4490 | all 1.8276
162
+ step 00141/323 | loss 1.3838 | lrm 1.000 | trained tok 79,454 | dt 2651ms | tok/s 98,866 | mfu 0.0
163
+ step 00146/323 | loss 1.3805 | lrm 1.000 | trained tok 90,405 | dt 2651ms | tok/s 98,876 | mfu 0.0
164
+ step 00151/323 | loss 1.3754 | lrm 1.000 | trained tok 91,413 | dt 2654ms | tok/s 98,771 | mfu 0.0
165
+ step 00156/323 | loss 1.3508 | lrm 1.000 | trained tok 90,286 | dt 2653ms | tok/s 98,800 | mfu 0.0
166
+ step 160 val gen_mt 1.8038 | chat 2.3801 | long_documents 1.4734 | maths_logic 0.8772 | system_prompts 2.2879 | chat_thinking 2.1891 | instruction_following 2.0773 | python_tool 0.5811 | json_function_calls 0.7298 | identity 0.0915 | safety 2.5054 | all 1.8498
167
+ step 00161/323 | loss 1.3374 | lrm 1.000 | trained tok 78,425 | dt 2650ms | tok/s 98,923 | mfu 0.0
168
+ step 162 val gen_mt 1.8067 | chat 2.3876 | long_documents 1.4769 | maths_logic 0.8749 | system_prompts 2.2933 | chat_thinking 2.1930 | instruction_following 2.0844 | python_tool 0.5806 | json_function_calls 0.7267 | identity 0.0903 | safety 2.5221 | all 1.8539
169
+ saved step 162 -> /content/sft_out
170
+ step 00166/323 | loss 1.3213 | lrm 0.978 | trained tok 99,747 | dt 2653ms | tok/s 98,800 | mfu 0.0
171
+ step 00171/323 | loss 1.3066 | lrm 0.947 | trained tok 114,458 | dt 2650ms | tok/s 98,936 | mfu 0.0
172
+ step 00176/323 | loss 1.2896 | lrm 0.916 | trained tok 90,435 | dt 2654ms | tok/s 98,783 | mfu 0.0
173
+ step 180 val gen_mt 1.8357 | chat 2.4239 | long_documents 1.5023 | maths_logic 0.8863 | system_prompts 2.3184 | chat_thinking 2.2316 | instruction_following 2.1060 | python_tool 0.5902 | json_function_calls 0.7172 | identity 0.0927 | safety 2.5515 | all 1.8811
174
+ step 00181/323 | loss 1.2846 | lrm 0.885 | trained tok 81,737 | dt 2653ms | tok/s 98,800 | mfu 0.0
175
+ step 00186/323 | loss 1.2585 | lrm 0.854 | trained tok 87,463 | dt 2653ms | tok/s 98,802 | mfu 0.0
176
+ step 00191/323 | loss 1.2454 | lrm 0.824 | trained tok 76,651 | dt 2650ms | tok/s 98,931 | mfu 0.0
177
+ step 00196/323 | loss 1.2399 | lrm 0.793 | trained tok 97,561 | dt 2651ms | tok/s 98,878 | mfu 0.0
178
+ step 200 val gen_mt 1.8283 | chat 2.4115 | long_documents 1.4989 | maths_logic 0.8813 | system_prompts 2.3167 | chat_thinking 2.2323 | instruction_following 2.0846 | python_tool 0.5854 | json_function_calls 0.7105 | identity 0.1106 | safety 2.5526 | all 1.8722
179
+ step 00201/323 | loss 1.2188 | lrm 0.762 | trained tok 117,796 | dt 2653ms | tok/s 98,804 | mfu 0.0
180
+ step 00206/323 | loss 1.1880 | lrm 0.731 | trained tok 69,947 | dt 2649ms | tok/s 98,973 | mfu 0.0
181
+ step 00211/323 | loss 1.1877 | lrm 0.700 | trained tok 103,270 | dt 2654ms | tok/s 98,770 | mfu 0.0
182
+ step 00216/323 | loss 1.1805 | lrm 0.669 | trained tok 116,875 | dt 2652ms | tok/s 98,859 | mfu 0.0
183
+ step 220 val gen_mt 1.8578 | chat 2.4599 | long_documents 1.5015 | maths_logic 0.9030 | system_prompts 2.3556 | chat_thinking 2.2727 | instruction_following 2.1409 | python_tool 0.5986 | json_function_calls 0.7281 | identity 0.1127 | safety 2.5802 | all 1.9078
184
+ step 00221/323 | loss 1.1483 | lrm 0.638 | trained tok 93,260 | dt 2648ms | tok/s 99,007 | mfu 0.0
185
+ step 00226/323 | loss 1.1451 | lrm 0.607 | trained tok 89,619 | dt 2652ms | tok/s 98,837 | mfu 0.0
186
+ step 00231/323 | loss 1.1160 | lrm 0.576 | trained tok 114,613 | dt 2652ms | tok/s 98,832 | mfu 0.0
187
+ step 00236/323 | loss 1.1080 | lrm 0.545 | trained tok 77,669 | dt 2650ms | tok/s 98,913 | mfu 0.0
188
+ step 240 val gen_mt 1.9172 | chat 2.4945 | long_documents 1.5657 | maths_logic 0.9115 | system_prompts 2.4104 | chat_thinking 2.3096 | instruction_following 2.1651 | python_tool 0.6118 | json_function_calls 0.7442 | identity 0.1028 | safety 2.6220 | all 1.9476
189
+ step 00241/323 | loss 1.0898 | lrm 0.514 | trained tok 74,397 | dt 2649ms | tok/s 98,978 | mfu 0.0
190
+ step 00246/323 | loss 1.0664 | lrm 0.483 | trained tok 90,919 | dt 2649ms | tok/s 98,952 | mfu 0.0
191
+ step 00251/323 | loss 1.0497 | lrm 0.452 | trained tok 95,335 | dt 2651ms | tok/s 98,886 | mfu 0.0
192
+ step 00256/323 | loss 1.0375 | lrm 0.421 | trained tok 115,859 | dt 2653ms | tok/s 98,823 | mfu 0.0
193
+ step 260 val gen_mt 1.9172 | chat 2.5191 | long_documents 1.5918 | maths_logic 0.9057 | system_prompts 2.4165 | chat_thinking 2.3252 | instruction_following 2.1733 | python_tool 0.6111 | json_function_calls 0.7437 | identity 0.0953 | safety 2.6250 | all 1.9555
194
+ step 00261/323 | loss 1.0271 | lrm 0.390 | trained tok 100,363 | dt 2652ms | tok/s 98,864 | mfu 0.0
195
+ step 00266/323 | loss 0.9993 | lrm 0.359 | trained tok 79,840 | dt 2652ms | tok/s 98,842 | mfu 0.0
196
+ step 00271/323 | loss 0.9859 | lrm 0.328 | trained tok 102,955 | dt 2651ms | tok/s 98,877 | mfu 0.0
197
+ step 00276/323 | loss 0.9665 | lrm 0.297 | trained tok 101,452 | dt 2651ms | tok/s 98,902 | mfu 0.0
198
+ step 280 val gen_mt 1.9625 | chat 2.5657 | long_documents 1.5826 | maths_logic 0.9319 | system_prompts 2.4843 | chat_thinking 2.3744 | instruction_following 2.2148 | python_tool 0.6289 | json_function_calls 0.7503 | identity 0.0924 | safety 2.6773 | all 1.9966
199
+ step 00281/323 | loss 0.9492 | lrm 0.266 | trained tok 87,817 | dt 2651ms | tok/s 98,890 | mfu 0.0
200
+ step 00286/323 | loss 0.9354 | lrm 0.235 | trained tok 91,027 | dt 2651ms | tok/s 98,884 | mfu 0.0
201
+ step 00291/323 | loss 0.9333 | lrm 0.204 | trained tok 100,781 | dt 2652ms | tok/s 98,831 | mfu 0.0
202
+ step 00296/323 | loss 0.9298 | lrm 0.173 | trained tok 103,481 | dt 2649ms | tok/s 98,974 | mfu 0.0
203
+ step 300 val gen_mt 1.9806 | chat 2.6015 | long_documents 1.6204 | maths_logic 0.9392 | system_prompts 2.5159 | chat_thinking 2.4009 | instruction_following 2.2428 | python_tool 0.6316 | json_function_calls 0.7651 | identity 0.0915 | safety 2.7192 | all 2.0199
204
+ step 00301/323 | loss 0.9221 | lrm 0.142 | trained tok 77,590 | dt 2650ms | tok/s 98,927 | mfu 0.0
205
+ step 00306/323 | loss 0.8936 | lrm 0.111 | trained tok 80,238 | dt 2652ms | tok/s 98,832 | mfu 0.0
206
+ step 00311/323 | loss 0.8827 | lrm 0.080 | trained tok 78,012 | dt 2651ms | tok/s 98,899 | mfu 0.0
207
+ step 00316/323 | loss 0.8792 | lrm 0.050 | trained tok 77,664 | dt 2653ms | tok/s 98,809 | mfu 0.0
208
+ step 320 val gen_mt 1.9967 | chat 2.6171 | long_documents 1.6424 | maths_logic 0.9554 | system_prompts 2.5396 | chat_thinking 2.4140 | instruction_following 2.2535 | python_tool 0.6374 | json_function_calls 0.7692 | identity 0.0961 | safety 2.7345 | all 2.0348
209
+ step 00321/323 | loss 0.8622 | lrm 0.019 | trained tok 84,228 | dt 2653ms | tok/s 98,810 | mfu 0.0
210
+ step 00323/323 | loss 0.8657 | lrm 0.006 | trained tok 80,590 | dt 2647ms | tok/s 99,020 | mfu 0.0
211
+ step 323 val gen_mt 1.9976 | chat 2.6189 | long_documents 1.6429 | maths_logic 0.9555 | system_prompts 2.5412 | chat_thinking 2.4158 | instruction_following 2.2541 | python_tool 0.6380 | json_function_calls 0.7712 | identity 0.0964 | safety 2.7351 | all 2.0358
212
+ saved step 323 -> /content/sft_out
213
+ done: 323 steps, train time 14.09 min, peak mem 58.6 GiB