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 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
global {
    model_type="llama2"
    ducttape_output=/mnt/data/shared/multilingual_llm/experiments_megatron/continue_pretraining_tinyllama_all_20B
    repo=/mnt/data/jpombal/multilinguality_megatron

    external_model_dir=/mnt/data/shared/multilingual_llm/experiments_megatron/continue_pretraining_tinyllama_all_20B/mc4_parallel_synth_pre_annealing_20B_checkpoints_doc_attn
    external_model_dir_annealing=/mnt/data/shared/multilingual_llm/experiments_megatron/continue_pretraining_tinyllama_all_20B/mc4_parallel_20B_checkpoints_annealed_doc_attn
    model_path=/mnt/data_2/cache/models--TinyLlama--TinyLlama-1.1B-intermediate-step-1431k-3T/snapshots/036fa4651240b9a1487f709833b9e4b96b4c1574/
    tokenizer_path=/mnt/data_2/cache/models--TinyLlama--TinyLlama-1.1B-intermediate-step-1431k-3T/snapshots/036fa4651240b9a1487f709833b9e4b96b4c1574

    tokenizer_type=PretrainedFromHF

    dataset=(Dataset: en de fr es it nl pt ru zh ko en_de de_en en_fr fr_en en_es es_en en_it it_en en_nl nl_en en_pt pt_en en_ru ru_en en_zh zh_en en_ko ko_en en_de_pre_annealing de_en_pre_annealing en_fr_pre_annealing fr_en_pre_annealing en_es_pre_annealing es_en_pre_annealing en_it_pre_annealing it_en_pre_annealing en_nl_pre_annealing nl_en_pre_annealing en_pt_pre_annealing pt_en_pre_annealing en_ru_pre_annealing ru_en_pre_annealing en_zh_pre_annealing zh_en_pre_annealing en_ko_pre_annealing ko_en_pre_annealing en_synth es_synth de_synth fr_synth nl_synth pt_synth it_synth ru_synth zh_synth ko_synth instructions)
    dataset_path=(Dataset: 
            en=/mnt/data_2/shared/tower_llm_data/en/data
            en_synth=""
            es=/mnt/data_2/shared/tower_llm_data/es/3/0000.json.gz 
            es_synth=""
            de=/mnt/data_2/shared/tower_llm_data/de/2/0000.json.gz 
            de_synth=""
            fr=/mnt/data_2/shared/tower_llm_data/fr/1/0000.json.gz 
            fr_synth=""
            nl=/mnt/data_2/shared/tower_llm_data/nl/0000.json.gz 
            nl_synth=""
            pt=/mnt/data_2/shared/tower_llm_data/pt/0000.json.gz   
            pt_synth=""           
            it=/mnt/data_2/shared/tower_llm_data/it/0000.json.gz 
            it_synth=""
            ru=/mnt/data_2/shared/tower_llm_data/ru/6/0000.json.gz
            ru_synth=""
            zh=/mnt/data_2/shared/tower_llm_data/zh/0000.json.gz 
            zh_synth=""
            ko=/mnt/data_2/shared/tower_llm_data/ko/0000.json.gz
            ko_synth=""
            en_de="/mnt/data/shared/tower_llm_data/bilingual_data/v1/en-de/bicleaner_0.5_cometkiwi-wmt22-cometkiwi-da/threshold_0.75"
            de_en="/mnt/data/shared/tower_llm_data/bilingual_data/v1/en-de/bicleaner_0.5_cometkiwi-wmt22-cometkiwi-da/threshold_0.75" 
            en_fr="/mnt/data/shared/tower_llm_data/bilingual_data/v1/en-fr/bicleaner_0.5_cometkiwi-wmt22-cometkiwi-da/threshold_0.75" 
            fr_en="/mnt/data/shared/tower_llm_data/bilingual_data/v1/en-fr/bicleaner_0.5_cometkiwi-wmt22-cometkiwi-da/threshold_0.75" 
            en_es="/mnt/data/shared/tower_llm_data/bilingual_data/v1/en-es/bicleaner_0.5_cometkiwi-wmt22-cometkiwi-da/threshold_0.75" 
            es_en="/mnt/data/shared/tower_llm_data/bilingual_data/v1/en-es/bicleaner_0.5_cometkiwi-wmt22-cometkiwi-da/threshold_0.75" 
            en_it="/mnt/data/shared/tower_llm_data/bilingual_data/v1/en-it/bicleaner_0.5_cometkiwi-wmt22-cometkiwi-da/threshold_0.75" 
            it_en="/mnt/data/shared/tower_llm_data/bilingual_data/v1/en-it/bicleaner_0.5_cometkiwi-wmt22-cometkiwi-da/threshold_0.75" 
            en_nl="/mnt/data/shared/tower_llm_data/bilingual_data/v1/en-nl/bicleaner_0.5_cometkiwi-wmt22-cometkiwi-da/threshold_0.75" 
            nl_en="/mnt/data/shared/tower_llm_data/bilingual_data/v1/en-nl/bicleaner_0.5_cometkiwi-wmt22-cometkiwi-da/threshold_0.75" 
            en_pt="/mnt/data/shared/tower_llm_data/bilingual_data/v1/en-pt/bicleaner_0.6_cometkiwi-wmt22-cometkiwi-da/threshold_0.75" 
            pt_en="/mnt/data/shared/tower_llm_data/bilingual_data/v1/en-pt/bicleaner_0.6_cometkiwi-wmt22-cometkiwi-da/threshold_0.75" 
            en_ru="/mnt/data/shared/tower_llm_data/bilingual_data/v1/en-ru/bicleaner_0.5_cometkiwi-wmt22-cometkiwi-da/threshold_0.75" 
            ru_en="/mnt/data/shared/tower_llm_data/bilingual_data/v1/en-ru/bicleaner_0.5_cometkiwi-wmt22-cometkiwi-da/threshold_0.75" 
            en_zh="/mnt/data/shared/tower_llm_data/bilingual_data/v1/en-zh/no_bicleaner_cometkiwi-wmt22-cometkiwi-da/threshold_0.75" 
            zh_en="/mnt/data/shared/tower_llm_data/bilingual_data/v1/en-zh/no_bicleaner_cometkiwi-wmt22-cometkiwi-da/threshold_0.75" 
            en_ko="/mnt/data/shared/tower_llm_data/bilingual_data/v1/en-ko/bicleaner_0.5_cometkiwi-wmt22-cometkiwi-da/threshold_0.75" 
            ko_en="/mnt/data/shared/tower_llm_data/bilingual_data/v1/en-ko/bicleaner_0.5_cometkiwi-wmt22-cometkiwi-da/threshold_0.75"
            instructions="oi"
            en_de_pre_annealing="oi"
            de_en_pre_annealing="oi"
            en_fr_pre_annealing="oi"
            fr_en_pre_annealing="oi"
            en_es_pre_annealing="oi"
            es_en_pre_annealing="oi"
            en_it_pre_annealing="oi"
            it_en_pre_annealing="oi"
            en_nl_pre_annealing="oi"
            nl_en_pre_annealing="oi"
            en_pt_pre_annealing="oi"
            pt_en_pre_annealing="oi"
            en_ru_pre_annealing="oi"
            ru_en_pre_annealing="oi"
            en_zh_pre_annealing="oi"
            zh_en_pre_annealing="oi"
            en_ko_pre_annealing="oi"
            ko_en_pre_annealing="oi"
        )
    
    is_hf_dataset=(Dataset: 
            en=True 
            es=False
            de=False
            fr=False
            nl=False
            pt=False      
            it=False
            ru=False
            zh=False
            ko=False
            en_de=False
            de_en=False 
            en_fr=False 
            fr_en=False 
            en_es=False 
            es_en=False 
            en_it=False 
            it_en=False 
            en_nl=False 
            nl_en=False
            en_pt=False 
            pt_en=False 
            en_ru=False 
            ru_en=False 
            en_zh=False 
            zh_en=False 
            en_ko=False 
            ko_en=False
            en_synth=False
            es_synth=False
            de_synth=False
            fr_synth=False
            nl_synth=False
            pt_synth=False
            it_synth=False
            ru_synth=False
            zh_synth=False
            ko_synth=False
            instructions="oi"
            en_de_pre_annealing="oi"
            de_en_pre_annealing="oi"
            en_fr_pre_annealing="oi"
            fr_en_pre_annealing="oi"
            en_es_pre_annealing="oi"
            es_en_pre_annealing="oi"
            en_it_pre_annealing="oi"
            it_en_pre_annealing="oi"
            en_nl_pre_annealing="oi"
            nl_en_pre_annealing="oi"
            en_pt_pre_annealing="oi"
            pt_en_pre_annealing="oi"
            en_ru_pre_annealing="oi"
            ru_en_pre_annealing="oi"
            en_zh_pre_annealing="oi"
            zh_en_pre_annealing="oi"
            en_ko_pre_annealing="oi"
            ko_en_pre_annealing="oi"
        )

    threshold=(Dataset:
                en=516       
                es=275
                de=611
                fr=322
                nl=649
                pt=257
                it=332
                ru=334
                zh=2041
                ko=198
                en_de=100000
                de_en=100000 
                en_fr=100000 
                fr_en=100000 
                en_es=100000 
                es_en=100000 
                en_it=100000 
                it_en=100000 
                en_nl=100000 
                nl_en=100000 
                en_pt=100000 
                pt_en=100000 
                en_ru=100000 
                ru_en=100000 
                en_zh=100000 
                zh_en=100000 
                en_ko=100000 
                ko_en=100000
                en_synth=100000
                es_synth=100000
                de_synth=100000
                fr_synth=100000
                nl_synth=100000
                pt_synth=100000
                it_synth=100000
                ru_synth=100000
                zh_synth=100000
                ko_synth=100000
                instructions="oi"
                en_de_pre_annealing="oi"
                de_en_pre_annealing="oi"
                en_fr_pre_annealing="oi"
                fr_en_pre_annealing="oi"
                en_es_pre_annealing="oi"
                es_en_pre_annealing="oi"
                en_it_pre_annealing="oi"
                it_en_pre_annealing="oi"
                en_nl_pre_annealing="oi"
                nl_en_pre_annealing="oi"
                en_pt_pre_annealing="oi"
                pt_en_pre_annealing="oi"
                en_ru_pre_annealing="oi"
                ru_en_pre_annealing="oi"
                en_zh_pre_annealing="oi"
                zh_en_pre_annealing="oi"
                en_ko_pre_annealing="oi"
                ko_en_pre_annealing="oi"
            )

    # rougly 67% for mc4, 33% for total parallel data
    datamix_weights=(
        DataMix: 
            mc4_parallel_uniform=(
                Dataset:
                    en=637
                    es=637
                    de=637
                    fr=637
                    nl=637
                    pt=637
                    it=637
                    ru=637
                    zh=637
                    ko=637
                    en_de=0
                    de_en=0 
                    en_fr=0 
                    fr_en=0 
                    en_es=0 
                    es_en=0 
                    en_it=0 
                    it_en=0 
                    en_nl=0 
                    nl_en=0 
                    en_pt=0 
                    pt_en=0 
                    en_ru=0 
                    ru_en=0 
                    en_zh=0 
                    zh_en=0 
                    en_ko=0 
                    ko_en=0 
                    en_synth=34
                    es_synth=34
                    de_synth=34
                    fr_synth=34
                    nl_synth=34
                    pt_synth=34
                    it_synth=34
                    ru_synth=34
                    zh_synth=34
                    ko_synth=34
                    instructions=0
                    en_de_pre_annealing=183
                    de_en_pre_annealing=183
                    en_fr_pre_annealing=183
                    fr_en_pre_annealing=183
                    en_es_pre_annealing=183
                    es_en_pre_annealing=183
                    en_it_pre_annealing=183
                    it_en_pre_annealing=183
                    en_nl_pre_annealing=183
                    nl_en_pre_annealing=183
                    en_pt_pre_annealing=183
                    pt_en_pre_annealing=183
                    en_ru_pre_annealing=183
                    ru_en_pre_annealing=183
                    en_zh_pre_annealing=183
                    zh_en_pre_annealing=183
                    en_ko_pre_annealing=183
                    ko_en_pre_annealing=183
            )
        )

    datamix_weights_annealing=(
        DataMix: 
            mc4_parallel_uniform=(
                Dataset:
                    en=0
                    es=0
                    de=0
                    fr=0
                    nl=0
                    pt=0
                    it=0
                    ru=0
                    zh=0
                    ko=0
                    en_de=833
                    de_en=833
                    en_fr=833 
                    fr_en=833 
                    en_es=833 
                    es_en=833 
                    en_it=833 
                    it_en=833 
                    en_nl=833 
                    nl_en=833 
                    en_pt=833 
                    pt_en=833 
                    en_ru=833 
                    ru_en=833 
                    en_zh=833 
                    zh_en=833 
                    en_ko=833 
                    ko_en=833
                    en_synth=0
                    es_synth=0
                    de_synth=0
                    fr_synth=0
                    nl_synth=0
                    pt_synth=0
                    it_synth=0
                    ru_synth=0
                    zh_synth=0
                    ko_synth=0
                    instructions=85000
                    en_de_pre_annealing=0
                    de_en_pre_annealing=0
                    en_fr_pre_annealing=0
                    fr_en_pre_annealing=0
                    en_es_pre_annealing=0
                    es_en_pre_annealing=0
                    en_it_pre_annealing=0
                    it_en_pre_annealing=0
                    en_nl_pre_annealing=0
                    nl_en_pre_annealing=0
                    en_pt_pre_annealing=0
                    pt_en_pre_annealing=0
                    en_ru_pre_annealing=0
                    ru_en_pre_annealing=0
                    en_zh_pre_annealing=0
                    zh_en_pre_annealing=0
                    en_ko_pre_annealing=0
                    ko_en_pre_annealing=0
            )
        )


    # number such that final tokens for each language are around 1B
    n_tokens=(Dataset:
                en=1000000000
                es=833333330
                de=833333330
                fr=833333330
                nl=833333330
                pt=833333330
                it=833333330
                ru=500000000
                zh=13888888
                ko=250000000
                en_de=20000000
                de_en=20000000 
                en_fr=20000000 
                fr_en=20000000 
                en_es=20000000 
                es_en=20000000
                en_it=20000000 
                it_en=20000000 
                en_nl=20000000 
                nl_en=20000000 
                en_pt=20000000 
                pt_en=20000000 
                en_ru=20000000 
                ru_en=20000000 
                en_zh=20000000
                zh_en=20000000 
                en_ko=20000000
                ko_en=20000000
                en_synth=20000000
                es_synth=20000000
                de_synth=20000000
                fr_synth=20000000
                nl_synth=20000000
                pt_synth=20000000
                it_synth=20000000
                ru_synth=20000000
                zh_synth=20000000
                ko_synth=20000000
                instructions="oi"
                en_de_pre_annealing="oi"
                de_en_pre_annealing="oi"
                en_fr_pre_annealing="oi"
                fr_en_pre_annealing="oi"
                en_es_pre_annealing="oi"
                es_en_pre_annealing="oi"
                en_it_pre_annealing="oi"
                it_en_pre_annealing="oi"
                en_nl_pre_annealing="oi"
                nl_en_pre_annealing="oi"
                en_pt_pre_annealing="oi"
                pt_en_pre_annealing="oi"
                en_ru_pre_annealing="oi"
                ru_en_pre_annealing="oi"
                en_zh_pre_annealing="oi"
                zh_en_pre_annealing="oi"
                en_ko_pre_annealing="oi"
                ko_en_pre_annealing="oi"
            )

    is_parallel=(Dataset:
        en=False
        es=False
        de=False
        fr=False
        nl=False
        pt=False
        it=False
        ru=False
        zh=False
        ko=False
        en_de=True
        de_en=True
        en_fr=True
        fr_en=True
        en_es=True
        es_en=True
        en_it=True
        it_en=True
        en_nl=True
        nl_en=True
        en_pt=True
        pt_en=True
        en_ru=True
        ru_en=True
        en_zh=True
        zh_en=True
        en_ko=True
        ko_en=True
        en_synth=False
        es_synth=False
        de_synth=False
        fr_synth=False
        nl_synth=False
        pt_synth=False
        it_synth=False
        ru_synth=False
        zh_synth=False
        ko_synth=False
        instructions="oi"
        en_de_pre_annealing="oi"
        de_en_pre_annealing="oi"
        en_fr_pre_annealing="oi"
        fr_en_pre_annealing="oi"
        en_es_pre_annealing="oi"
        es_en_pre_annealing="oi"
        en_it_pre_annealing="oi"
        it_en_pre_annealing="oi"
        en_nl_pre_annealing="oi"
        nl_en_pre_annealing="oi"
        en_pt_pre_annealing="oi"
        pt_en_pre_annealing="oi"
        en_ru_pre_annealing="oi"
        ru_en_pre_annealing="oi"
        en_zh_pre_annealing="oi"
        zh_en_pre_annealing="oi"
        en_ko_pre_annealing="oi"
        ko_en_pre_annealing="oi"
    )   

    lp=(Dataset:
        en=""
        es=""
        de=""
        fr=""
        nl=""
        pt=""
        it=""
        ru=""
        zh=""
        ko=""
        en_de="en-de"
        de_en="de-en"
        en_fr="en-fr"
        fr_en="fr-en"
        en_es="en-es"
        es_en="es-en"
        en_it="en-it"
        it_en="it-en"
        en_nl="en-nl"
        nl_en="nl-en"
        en_pt="en-pt"
        pt_en="pt-en"
        en_ru="en-ru"
        ru_en="ru-en"
        en_zh="en-zh"
        zh_en="zh-en"
        en_ko="en-ko"
        ko_en="ko-en"
        en_synth=""
        es_synth=""
        de_synth=""
        fr_synth=""
        nl_synth=""
        pt_synth=""
        it_synth=""
        ru_synth=""
        zh_synth=""
        ko_synth=""
        instructions="oi"
        en_de_pre_annealing="oi"
        de_en_pre_annealing="oi"
        en_fr_pre_annealing="oi"
        fr_en_pre_annealing="oi"
        en_es_pre_annealing="oi"
        es_en_pre_annealing="oi"
        en_it_pre_annealing="oi"
        it_en_pre_annealing="oi"
        en_nl_pre_annealing="oi"
        nl_en_pre_annealing="oi"
        en_pt_pre_annealing="oi"
        pt_en_pre_annealing="oi"
        en_ru_pre_annealing="oi"
        ru_en_pre_annealing="oi"
        en_zh_pre_annealing="oi"
        zh_en_pre_annealing="oi"
        en_ko_pre_annealing="oi"
        ko_en_pre_annealing="oi"
    )    

    min_perplexity=50

    size=(Size: 1 7 13)

    log_interval=1
    save_interval=635
    eval_interval=635
    train_steps=11430
    train_steps_annealing=1270
    
    lr_scheduler=constant
    warmup_steps=32
    lr=3e-5
    lr_min=3e-6
    weight_decay=0.1
    
    lr_scheduler_annealing=linear
    warmup_steps_annealing=0
    lr_annealing=3e-5
    lr_min_annealing=3e-6

    n_gpus=8
    gpu_ids=0,1,2,3,4,5,6,7
    tp=(TP: 1 2 3 4 5 6 7 8)
    pp=(PP: 1 2 3 4)
    micro_batch_size=24
    grad_accum_steps=4
    vocab_size=32000

    cpu_workers=16
    wikipedia=False
    freeze_layers=""
    posterior_tokens=False
    n_posterior_tokens=0
    eval_iters=1
    kv_channels=""
    glu_activation=swiglu
    layernorm_epsilon=1e-5

    seq_length=2048
}