Datasets:

Modalities:
Text
Formats:
text
Languages:
English
Size:
< 1K
Libraries:
Datasets
loubnabnl HF Staff commited on
Commit
430a5f9
·
1 Parent(s): 236fba0

add configs

Browse files
attention/gqa_16groups.yaml ADDED
@@ -0,0 +1,164 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ checkpoints:
2
+ checkpoint_interval: 1000
3
+ checkpoints_path: /scratch/loubna/checkpoints
4
+ checkpoints_path_is_shared_file_system: false
5
+ load_lr_scheduler: true
6
+ load_optimizer: true
7
+ resume_checkpoint_path: null
8
+ save_final_state: true
9
+ save_initial_state: false
10
+ data_stages:
11
+ - data:
12
+ dataset:
13
+ dataset_read_path:
14
+ - /fsx/loubna/projects_v2/data/blog/fineweb-edu
15
+ - /fsx/loubna/projects_v2/data/blog/finemath-3plus
16
+ - /fsx/loubna/projects_v2/data/blog/stack-edu-python
17
+ dataset_folder:
18
+ - s3://smollm3/datasets/llama_tokenized-global-chunks/fineweb-edu/fineweb-edu/
19
+ - s3://smollm3/datasets/llama_tokenized-individual-chunks/finemath/
20
+ - s3://smollm3/datasets/llama_tokenized-individual-chunks/stack-edu-Python/
21
+ dataset_weights:
22
+ - 0.7
23
+ - 0.1
24
+ - 0.2
25
+ pad_samples_to_global_batch_size: false
26
+ return_positions: true
27
+ token_size_in_bytes: 4
28
+ tokenizer_name: HuggingFaceTB/SmolLM3-3B
29
+ use_old_brrr_dataloader: false
30
+ vocab_size: 128256
31
+ num_loading_workers: 0
32
+ seed: 6
33
+ name: stable
34
+ start_training_step: 1
35
+ general:
36
+ benchmark_csv_path: null
37
+ consumed_train_samples: null
38
+ ignore_sanity_checks: true
39
+ project: smollm3-blog
40
+ run: baseline-gqa-16groups
41
+ seed: 6
42
+ step: null
43
+ logging:
44
+ iteration_step_info_interval: 1
45
+ log_level: info
46
+ log_level_replica: info
47
+ model:
48
+ ddp_bucket_cap_mb: 50
49
+ dtype: bfloat16
50
+ init_method:
51
+ std: 0.02
52
+ make_vocab_size_divisible_by: 1
53
+ model_config:
54
+ _attn_implementation: flash_attention_2
55
+ _fused_rms_norm: true
56
+ _fused_rotary_emb: true
57
+ _use_doc_masking: false
58
+ _use_qkv_packed: true
59
+ attention_bias: false
60
+ bos_token_id: 128000
61
+ eos_token_id: 128001
62
+ flex_attention_mask: null
63
+ hidden_act: silu
64
+ hidden_size: 2048
65
+ initializer_range: 0.02
66
+ intermediate_size: 8192
67
+ is_qwen2_config: true
68
+ max_position_embeddings: 4096
69
+ moe_config: null
70
+ num_attention_heads: 32
71
+ num_hidden_layers: 16
72
+ num_key_value_heads: 2 #from 4 to 8
73
+ pad_token_id: null
74
+ pretraining_tp: 1
75
+ rms_norm_eps: 1.0e-05
76
+ rope_interleaved: false
77
+ rope_scaling: null
78
+ rope_theta: 50000.0
79
+ sliding_window_size: null
80
+ tie_word_embeddings: true
81
+ use_cache: true
82
+ vocab_size: 128256
83
+ no_rope_layer: null
84
+ optimizer:
85
+ accumulate_grad_in_fp32: true
86
+ clip_grad: 1.0
87
+ learning_rate_scheduler:
88
+ learning_rate: 0.0005
89
+ lr_decay_starting_step: 2000
90
+ lr_decay_steps: 28000
91
+ lr_decay_style: cosine
92
+ lr_warmup_steps: 2000
93
+ lr_warmup_style: linear
94
+ min_decay_lr: 5.0e-05
95
+ optimizer_factory:
96
+ adam_beta1: 0.9
97
+ adam_beta2: 0.95
98
+ adam_eps: 1.0e-08
99
+ name: adamW
100
+ torch_adam_is_fused: true
101
+ weight_decay: 0.1
102
+ weight_decay_exclude_named_params: null
103
+ zero_stage: 0
104
+ parallelism:
105
+ context_parallel_size: 1
106
+ dp: 8
107
+ expert_parallel_size: 1
108
+ moe_layer_recompute: false
109
+ pp: 1
110
+ pp_engine: 1f1b
111
+ recompute_layer: false
112
+ tp: 1
113
+ tp_linear_async_communication: true
114
+ tp_mode: REDUCE_SCATTER
115
+ tp_recompute_allgather: true
116
+ profiler: null
117
+ s3_upload:
118
+ remove_after_upload: true
119
+ s5cmd_concurrency: 5
120
+ s5cmd_numworkers: 16
121
+ s5cmd_path: /fsx/loubna/.venv-2-6-cu124/bin/s5cmd
122
+ upload_s3_path: s3://smollm3/blogpost-ablations/baseline-gqa-16groups
123
+ tokenizer:
124
+ tokenizer_max_length: 4096
125
+ tokenizer_name_or_path: HuggingFaceTB/SmolLM3-3B
126
+ tokenizer_revision: null
127
+ metrics_logging:
128
+ log_level: 1
129
+ log_detail_interval: 100
130
+ tokens:
131
+ batch_accumulation_per_replica: 16
132
+ limit_test_batches: 0
133
+ limit_val_batches: 0
134
+ micro_batch_size: 3 # 1.5M tokens
135
+ sequence_length: 4096
136
+ train_steps: 30000 # 30B tokens
137
+ val_check_interval: 100
138
+ lighteval:
139
+ slurm_script_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/launch-config" # Default path for launch scripts
140
+ logs_path: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/logs" # Default path for evaluation logs
141
+ local_checkpoint_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/evals-ckpt" # Default path for temporary checkpoint storage. Will store under {local_checkpoint_dir}/{run_name}/{step}
142
+ nanotron_path: "/fsx/loubna/projects_v2/smollm3/nanotron"
143
+ output_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/results"
144
+ s3_save_path: "s3://smollm3/blogpost-evals"
145
+ upload_to_wandb: true
146
+ wandb_project: smollm3-blog-evals
147
+ wandb_entity: huggingface
148
+ parallelism:
149
+ dp: 8
150
+ pp: 1
151
+ tp: 1
152
+ tp_linear_async_communication: true
153
+ batch_size: 1 # Optional batch size for evaluation
154
+ eval_config_override: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_configs/ablations_blog.yaml" # The evaluation config file to use
155
+ eval_interval: 1000
156
+ eval_interval_file: null
157
+ slurm:
158
+ gpus_per_node: 8
159
+ partition: "hopper-prod"
160
+ hf_cache: "/fsx/loubna/.cache/huggingface"
161
+ cpus_per_task: 88
162
+ qos: "normal"
163
+ time: "01:59:00"
164
+ reservation: null
attention/gqa_2groups.yaml ADDED
@@ -0,0 +1,164 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ checkpoints:
2
+ checkpoint_interval: 1000
3
+ checkpoints_path: /scratch/loubna/checkpoints
4
+ checkpoints_path_is_shared_file_system: false
5
+ load_lr_scheduler: true
6
+ load_optimizer: true
7
+ resume_checkpoint_path: null
8
+ save_final_state: true
9
+ save_initial_state: false
10
+ data_stages:
11
+ - data:
12
+ dataset:
13
+ dataset_read_path:
14
+ - /fsx/loubna/projects_v2/data/blog/fineweb-edu
15
+ - /fsx/loubna/projects_v2/data/blog/finemath-3plus
16
+ - /fsx/loubna/projects_v2/data/blog/stack-edu-python
17
+ dataset_folder:
18
+ - s3://smollm3/datasets/llama_tokenized-global-chunks/fineweb-edu/fineweb-edu/
19
+ - s3://smollm3/datasets/llama_tokenized-individual-chunks/finemath/
20
+ - s3://smollm3/datasets/llama_tokenized-individual-chunks/stack-edu-Python/
21
+ dataset_weights:
22
+ - 0.7
23
+ - 0.1
24
+ - 0.2
25
+ pad_samples_to_global_batch_size: false
26
+ return_positions: true
27
+ token_size_in_bytes: 4
28
+ tokenizer_name: HuggingFaceTB/SmolLM3-3B
29
+ use_old_brrr_dataloader: false
30
+ vocab_size: 128256
31
+ num_loading_workers: 0
32
+ seed: 6
33
+ name: stable
34
+ start_training_step: 1
35
+ general:
36
+ benchmark_csv_path: null
37
+ consumed_train_samples: null
38
+ ignore_sanity_checks: true
39
+ project: smollm3-blog
40
+ run: baseline-gqa-2groups
41
+ seed: 6
42
+ step: null
43
+ logging:
44
+ iteration_step_info_interval: 1
45
+ log_level: info
46
+ log_level_replica: info
47
+ model:
48
+ ddp_bucket_cap_mb: 50
49
+ dtype: bfloat16
50
+ init_method:
51
+ std: 0.02
52
+ make_vocab_size_divisible_by: 1
53
+ model_config:
54
+ _attn_implementation: flash_attention_2
55
+ _fused_rms_norm: true
56
+ _fused_rotary_emb: true
57
+ _use_doc_masking: false
58
+ _use_qkv_packed: true
59
+ attention_bias: false
60
+ bos_token_id: 128000
61
+ eos_token_id: 128001
62
+ flex_attention_mask: null
63
+ hidden_act: silu
64
+ hidden_size: 2048
65
+ initializer_range: 0.02
66
+ intermediate_size: 8192
67
+ is_qwen2_config: true
68
+ max_position_embeddings: 4096
69
+ moe_config: null
70
+ num_attention_heads: 32
71
+ num_hidden_layers: 15
72
+ num_key_value_heads: 16 #from 4 to 16
73
+ pad_token_id: null
74
+ pretraining_tp: 1
75
+ rms_norm_eps: 1.0e-05
76
+ rope_interleaved: false
77
+ rope_scaling: null
78
+ rope_theta: 50000.0
79
+ sliding_window_size: null
80
+ tie_word_embeddings: true
81
+ use_cache: true
82
+ vocab_size: 128256
83
+ no_rope_layer: null
84
+ optimizer:
85
+ accumulate_grad_in_fp32: true
86
+ clip_grad: 1.0
87
+ learning_rate_scheduler:
88
+ learning_rate: 0.0005
89
+ lr_decay_starting_step: 2000
90
+ lr_decay_steps: 28000
91
+ lr_decay_style: cosine
92
+ lr_warmup_steps: 2000
93
+ lr_warmup_style: linear
94
+ min_decay_lr: 5.0e-05
95
+ optimizer_factory:
96
+ adam_beta1: 0.9
97
+ adam_beta2: 0.95
98
+ adam_eps: 1.0e-08
99
+ name: adamW
100
+ torch_adam_is_fused: true
101
+ weight_decay: 0.1
102
+ weight_decay_exclude_named_params: null
103
+ zero_stage: 0
104
+ parallelism:
105
+ context_parallel_size: 1
106
+ dp: 8
107
+ expert_parallel_size: 1
108
+ moe_layer_recompute: false
109
+ pp: 1
110
+ pp_engine: 1f1b
111
+ recompute_layer: false
112
+ tp: 1
113
+ tp_linear_async_communication: true
114
+ tp_mode: REDUCE_SCATTER
115
+ tp_recompute_allgather: true
116
+ profiler: null
117
+ s3_upload:
118
+ remove_after_upload: true
119
+ s5cmd_concurrency: 5
120
+ s5cmd_numworkers: 16
121
+ s5cmd_path: /fsx/loubna/.venv-2-6-cu124/bin/s5cmd
122
+ upload_s3_path: s3://smollm3/blogpost-ablations/baseline-gqa-2groups
123
+ tokenizer:
124
+ tokenizer_max_length: 4096
125
+ tokenizer_name_or_path: HuggingFaceTB/SmolLM3-3B
126
+ tokenizer_revision: null
127
+ metrics_logging:
128
+ log_level: 1
129
+ log_detail_interval: 100
130
+ tokens:
131
+ batch_accumulation_per_replica: 16
132
+ limit_test_batches: 0
133
+ limit_val_batches: 0
134
+ micro_batch_size: 3 # 1.5M tokens
135
+ sequence_length: 4096
136
+ train_steps: 30000 # 30B tokens
137
+ val_check_interval: 100
138
+ lighteval:
139
+ slurm_script_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/launch-config" # Default path for launch scripts
140
+ logs_path: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/logs" # Default path for evaluation logs
141
+ local_checkpoint_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/evals-ckpt" # Default path for temporary checkpoint storage. Will store under {local_checkpoint_dir}/{run_name}/{step}
142
+ nanotron_path: "/fsx/loubna/projects_v2/smollm3/nanotron"
143
+ output_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/results"
144
+ s3_save_path: "s3://smollm3/blogpost-evals"
145
+ upload_to_wandb: true
146
+ wandb_project: smollm3-blog-evals
147
+ wandb_entity: huggingface
148
+ parallelism:
149
+ dp: 8
150
+ pp: 1
151
+ tp: 1
152
+ tp_linear_async_communication: true
153
+ batch_size: 1 # Optional batch size for evaluation
154
+ eval_config_override: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_configs/ablations_blog.yaml" # The evaluation config file to use
155
+ eval_interval: 1000
156
+ eval_interval_file: null
157
+ slurm:
158
+ gpus_per_node: 8
159
+ partition: "hopper-prod"
160
+ hf_cache: "/fsx/loubna/.cache/huggingface"
161
+ cpus_per_task: 88
162
+ qos: "normal"
163
+ time: "01:59:00"
164
+ reservation: null
attention/gqa_4groups.yaml ADDED
@@ -0,0 +1,164 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ checkpoints:
2
+ checkpoint_interval: 1000
3
+ checkpoints_path: /scratch/loubna/checkpoints
4
+ checkpoints_path_is_shared_file_system: false
5
+ load_lr_scheduler: true
6
+ load_optimizer: true
7
+ resume_checkpoint_path: null
8
+ save_final_state: true
9
+ save_initial_state: false
10
+ data_stages:
11
+ - data:
12
+ dataset:
13
+ dataset_read_path:
14
+ - /fsx/loubna/projects_v2/data/blog/fineweb-edu
15
+ - /fsx/loubna/projects_v2/data/blog/finemath-3plus
16
+ - /fsx/loubna/projects_v2/data/blog/stack-edu-python
17
+ dataset_folder:
18
+ - s3://smollm3/datasets/llama_tokenized-global-chunks/fineweb-edu/fineweb-edu/
19
+ - s3://smollm3/datasets/llama_tokenized-individual-chunks/finemath/
20
+ - s3://smollm3/datasets/llama_tokenized-individual-chunks/stack-edu-Python/
21
+ dataset_weights:
22
+ - 0.7
23
+ - 0.1
24
+ - 0.2
25
+ pad_samples_to_global_batch_size: false
26
+ return_positions: true
27
+ token_size_in_bytes: 4
28
+ tokenizer_name: HuggingFaceTB/SmolLM3-3B
29
+ use_old_brrr_dataloader: false
30
+ vocab_size: 128256
31
+ num_loading_workers: 0
32
+ seed: 6
33
+ name: stable
34
+ start_training_step: 1
35
+ general:
36
+ benchmark_csv_path: null
37
+ consumed_train_samples: null
38
+ ignore_sanity_checks: true
39
+ project: smollm3-blog
40
+ run: baseline-gqa-4groups
41
+ seed: 6
42
+ step: null
43
+ logging:
44
+ iteration_step_info_interval: 1
45
+ log_level: info
46
+ log_level_replica: info
47
+ model:
48
+ ddp_bucket_cap_mb: 50
49
+ dtype: bfloat16
50
+ init_method:
51
+ std: 0.02
52
+ make_vocab_size_divisible_by: 1
53
+ model_config:
54
+ _attn_implementation: flash_attention_2
55
+ _fused_rms_norm: true
56
+ _fused_rotary_emb: true
57
+ _use_doc_masking: false
58
+ _use_qkv_packed: true
59
+ attention_bias: false
60
+ bos_token_id: 128000
61
+ eos_token_id: 128001
62
+ flex_attention_mask: null
63
+ hidden_act: silu
64
+ hidden_size: 2048
65
+ initializer_range: 0.02
66
+ intermediate_size: 8192
67
+ is_qwen2_config: true
68
+ max_position_embeddings: 4096
69
+ moe_config: null
70
+ num_attention_heads: 32
71
+ num_hidden_layers: 16
72
+ num_key_value_heads: 8 #from 4 to 8
73
+ pad_token_id: null
74
+ pretraining_tp: 1
75
+ rms_norm_eps: 1.0e-05
76
+ rope_interleaved: false
77
+ rope_scaling: null
78
+ rope_theta: 50000.0
79
+ sliding_window_size: null
80
+ tie_word_embeddings: true
81
+ use_cache: true
82
+ vocab_size: 128256
83
+ no_rope_layer: null
84
+ optimizer:
85
+ accumulate_grad_in_fp32: true
86
+ clip_grad: 1.0
87
+ learning_rate_scheduler:
88
+ learning_rate: 0.0005
89
+ lr_decay_starting_step: 2000
90
+ lr_decay_steps: 28000
91
+ lr_decay_style: cosine
92
+ lr_warmup_steps: 2000
93
+ lr_warmup_style: linear
94
+ min_decay_lr: 5.0e-05
95
+ optimizer_factory:
96
+ adam_beta1: 0.9
97
+ adam_beta2: 0.95
98
+ adam_eps: 1.0e-08
99
+ name: adamW
100
+ torch_adam_is_fused: true
101
+ weight_decay: 0.1
102
+ weight_decay_exclude_named_params: null
103
+ zero_stage: 0
104
+ parallelism:
105
+ context_parallel_size: 1
106
+ dp: 8
107
+ expert_parallel_size: 1
108
+ moe_layer_recompute: false
109
+ pp: 1
110
+ pp_engine: 1f1b
111
+ recompute_layer: false
112
+ tp: 1
113
+ tp_linear_async_communication: true
114
+ tp_mode: REDUCE_SCATTER
115
+ tp_recompute_allgather: true
116
+ profiler: null
117
+ s3_upload:
118
+ remove_after_upload: true
119
+ s5cmd_concurrency: 5
120
+ s5cmd_numworkers: 16
121
+ s5cmd_path: /fsx/loubna/.venv-2-6-cu124/bin/s5cmd
122
+ upload_s3_path: s3://smollm3/blogpost-ablations/baseline-gqa-4groups
123
+ tokenizer:
124
+ tokenizer_max_length: 4096
125
+ tokenizer_name_or_path: HuggingFaceTB/SmolLM3-3B
126
+ tokenizer_revision: null
127
+ metrics_logging:
128
+ log_level: 1
129
+ log_detail_interval: 100
130
+ tokens:
131
+ batch_accumulation_per_replica: 16
132
+ limit_test_batches: 0
133
+ limit_val_batches: 0
134
+ micro_batch_size: 3 # 1.5M tokens
135
+ sequence_length: 4096
136
+ train_steps: 30000 # 30B tokens
137
+ val_check_interval: 100
138
+ lighteval:
139
+ slurm_script_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/launch-config" # Default path for launch scripts
140
+ logs_path: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/logs" # Default path for evaluation logs
141
+ local_checkpoint_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/evals-ckpt" # Default path for temporary checkpoint storage. Will store under {local_checkpoint_dir}/{run_name}/{step}
142
+ nanotron_path: "/fsx/loubna/projects_v2/smollm3/nanotron"
143
+ output_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/results"
144
+ s3_save_path: "s3://smollm3/blogpost-evals"
145
+ upload_to_wandb: true
146
+ wandb_project: smollm3-blog-evals
147
+ wandb_entity: huggingface
148
+ parallelism:
149
+ dp: 8
150
+ pp: 1
151
+ tp: 1
152
+ tp_linear_async_communication: true
153
+ batch_size: 1 # Optional batch size for evaluation
154
+ eval_config_override: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_configs/ablations_blog.yaml" # The evaluation config file to use
155
+ eval_interval: 1000
156
+ eval_interval_file: null
157
+ slurm:
158
+ gpus_per_node: 8
159
+ partition: "hopper-prod"
160
+ hf_cache: "/fsx/loubna/.cache/huggingface"
161
+ cpus_per_task: 88
162
+ qos: "normal"
163
+ time: "01:59:00"
164
+ reservation: null
attention/gqa_4groups_compensate.yaml ADDED
@@ -0,0 +1,166 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ checkpoints:
2
+ checkpoint_interval: 1000
3
+ checkpoints_path: /scratch/loubna/checkpoints
4
+ checkpoints_path_is_shared_file_system: false
5
+ load_lr_scheduler: true
6
+ load_optimizer: true
7
+ resume_checkpoint_path: null
8
+ save_final_state: true
9
+ save_initial_state: false
10
+ data_stages:
11
+ - data:
12
+ dataset:
13
+ dataset_read_path:
14
+ - /fsx/loubna/projects_v2/data/blog/fineweb-edu
15
+ - /fsx/loubna/projects_v2/data/blog/finemath-3plus
16
+ - /fsx/loubna/projects_v2/data/blog/stack-edu-python
17
+ dataset_folder:
18
+ - s3://smollm3/datasets/llama_tokenized-global-chunks/fineweb-edu/fineweb-edu/
19
+ - s3://smollm3/datasets/llama_tokenized-individual-chunks/finemath/
20
+ - s3://smollm3/datasets/llama_tokenized-individual-chunks/stack-edu-Python/
21
+ dataset_weights:
22
+ - 0.7
23
+ - 0.1
24
+ - 0.2
25
+ pad_samples_to_global_batch_size: false
26
+ return_positions: true
27
+ token_size_in_bytes: 4
28
+ tokenizer_name: HuggingFaceTB/SmolLM3-3B
29
+ use_old_brrr_dataloader: false
30
+ vocab_size: 128256
31
+ num_loading_workers: 0
32
+ seed: 6
33
+ name: stable
34
+ start_training_step: 1
35
+ general:
36
+ benchmark_csv_path: null
37
+ consumed_train_samples: null
38
+ ignore_sanity_checks: true
39
+ project: smollm3-blog
40
+ run: baseline-gqa-4groups-compensate
41
+ seed: 6
42
+ step: null
43
+ logging:
44
+ iteration_step_info_interval: 1
45
+ log_level: info
46
+ log_level_replica: info
47
+ model:
48
+ ddp_bucket_cap_mb: 50
49
+ dtype: bfloat16
50
+ init_method:
51
+ std: 0.02
52
+ make_vocab_size_divisible_by: 1
53
+ model_config:
54
+ _attn_implementation: flash_attention_2
55
+ _fused_rms_norm: true
56
+ _fused_rotary_emb: true
57
+ _use_doc_masking: false
58
+ _use_qkv_packed: true
59
+ attention_bias: false
60
+ bos_token_id: 128000
61
+ eos_token_id: 128001
62
+ flex_attention_mask: null
63
+ hidden_act: silu
64
+ hidden_size: 1920
65
+ initializer_range: 0.02
66
+ intermediate_size: 8192
67
+ is_qwen2_config: true
68
+ max_position_embeddings: 4096
69
+ moe_config: null
70
+ num_attention_heads: 32
71
+ num_hidden_layers: 16
72
+ num_key_value_heads: 8 #from 4 to 8
73
+ pad_token_id: null
74
+ pretraining_tp: 1
75
+ rms_norm_eps: 1.0e-05
76
+ rope_interleaved: false
77
+ rope_scaling: null
78
+ rope_theta: 50000.0
79
+ sliding_window_size: null
80
+ tie_word_embeddings: true
81
+ use_cache: true
82
+ vocab_size: 128256
83
+ z_loss_coefficient: 1.0e-05
84
+ z_loss_enabled: false
85
+ # no_rope_layer: 4
86
+ optimizer:
87
+ accumulate_grad_in_fp32: true
88
+ clip_grad: 1.0
89
+ learning_rate_scheduler:
90
+ learning_rate: 0.0005
91
+ lr_decay_starting_step: 2000
92
+ lr_decay_steps: 28000
93
+ lr_decay_style: cosine
94
+ lr_warmup_steps: 2000
95
+ lr_warmup_style: linear
96
+ min_decay_lr: 5.0e-05
97
+ optimizer_factory:
98
+ adam_beta1: 0.9
99
+ adam_beta2: 0.95
100
+ adam_eps: 1.0e-08
101
+ name: adamW
102
+ torch_adam_is_fused: true
103
+ weight_decay: 0.1
104
+ weight_decay_exclude_named_params: null
105
+ zero_stage: 0
106
+ parallelism:
107
+ context_parallel_size: 1
108
+ dp: 8
109
+ expert_parallel_size: 1
110
+ moe_layer_recompute: false
111
+ pp: 1
112
+ pp_engine: 1f1b
113
+ recompute_layer: false
114
+ tp: 1
115
+ tp_linear_async_communication: true
116
+ tp_mode: REDUCE_SCATTER
117
+ tp_recompute_allgather: true
118
+ profiler: null
119
+ s3_upload:
120
+ remove_after_upload: true
121
+ s5cmd_concurrency: 5
122
+ s5cmd_numworkers: 16
123
+ s5cmd_path: /fsx/loubna/.venv-2-6-cu124/bin/s5cmd
124
+ upload_s3_path: s3://smollm3/blogpost-ablations/baseline-gqa-4groups-compensate
125
+ tokenizer:
126
+ tokenizer_max_length: 4096
127
+ tokenizer_name_or_path: /fsx/loubna/projects_v2/smollm3/tokenizer/SmolLM3-3B
128
+ tokenizer_revision: null
129
+ metrics_logging:
130
+ log_level: 1
131
+ log_detail_interval: 100
132
+ tokens:
133
+ batch_accumulation_per_replica: 16
134
+ limit_test_batches: 0
135
+ limit_val_batches: 0
136
+ micro_batch_size: 3 # 1.5M tokens
137
+ sequence_length: 4096
138
+ train_steps: 30000 # 30B tokens
139
+ val_check_interval: 100
140
+ lighteval:
141
+ slurm_script_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/launch-config" # Default path for launch scripts
142
+ logs_path: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/logs" # Default path for evaluation logs
143
+ local_checkpoint_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/evals-ckpt" # Default path for temporary checkpoint storage. Will store under {local_checkpoint_dir}/{run_name}/{step}
144
+ nanotron_path: "/fsx/loubna/projects_v2/smollm3/nanotron"
145
+ output_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/results"
146
+ s3_save_path: "s3://smollm3/blogpost-evals"
147
+ upload_to_wandb: true
148
+ wandb_project: smollm3-blog-evals
149
+ wandb_entity: huggingface
150
+ parallelism:
151
+ dp: 8
152
+ pp: 1
153
+ tp: A
154
+ tp_linear_async_communication: true
155
+ batch_size: 1 # Optional batch size for evaluation
156
+ eval_config_override: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_configs/smollm3_eval_decay.yaml" # The evaluation config file to use
157
+ eval_interval: 1000
158
+ eval_interval_file: null
159
+ slurm:
160
+ gpus_per_node: 8
161
+ partition: "hopper-prod"
162
+ hf_cache: "/fsx/loubna/.cache/huggingface"
163
+ cpus_per_task: 88
164
+ qos: "normal"
165
+ time: "01:59:00"
166
+ reservation: null # Optional reservation name, can be null
attention/gqa_8groups.yaml ADDED
@@ -0,0 +1,166 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ checkpoints:
2
+ checkpoint_interval: 1000
3
+ checkpoints_path: /scratch/loubna/checkpoints
4
+ checkpoints_path_is_shared_file_system: false
5
+ load_lr_scheduler: true
6
+ load_optimizer: true
7
+ resume_checkpoint_path: null
8
+ save_final_state: true
9
+ save_initial_state: false
10
+ data_stages:
11
+ - data:
12
+ dataset:
13
+ dataset_read_path:
14
+ - /fsx/loubna/projects_v2/data/blog/fineweb-edu
15
+ - /fsx/loubna/projects_v2/data/blog/finemath-3plus
16
+ - /fsx/loubna/projects_v2/data/blog/stack-edu-python
17
+ dataset_folder:
18
+ - s3://smollm3/datasets/llama_tokenized-global-chunks/fineweb-edu/fineweb-edu/
19
+ - s3://smollm3/datasets/llama_tokenized-individual-chunks/finemath/
20
+ - s3://smollm3/datasets/llama_tokenized-individual-chunks/stack-edu-Python/
21
+ dataset_weights:
22
+ - 0.7
23
+ - 0.1
24
+ - 0.2
25
+ pad_samples_to_global_batch_size: false
26
+ return_positions: true
27
+ token_size_in_bytes: 4
28
+ tokenizer_name: HuggingFaceTB/SmolLM3-3B
29
+ use_old_brrr_dataloader: false
30
+ vocab_size: 128256
31
+ num_loading_workers: 0
32
+ seed: 6
33
+ name: stable
34
+ start_training_step: 1
35
+ general:
36
+ benchmark_csv_path: null
37
+ consumed_train_samples: null
38
+ ignore_sanity_checks: true
39
+ project: smollm3-blog
40
+ run: baseline-gqa-8groups
41
+ seed: 6
42
+ step: null
43
+ logging:
44
+ iteration_step_info_interval: 1
45
+ log_level: info
46
+ log_level_replica: info
47
+ model:
48
+ ddp_bucket_cap_mb: 50
49
+ dtype: bfloat16
50
+ init_method:
51
+ std: 0.02
52
+ make_vocab_size_divisible_by: 1
53
+ model_config:
54
+ _attn_implementation: flash_attention_2
55
+ _fused_rms_norm: true
56
+ _fused_rotary_emb: true
57
+ _use_doc_masking: false
58
+ _use_qkv_packed: true
59
+ attention_bias: false
60
+ bos_token_id: 128000
61
+ eos_token_id: 128001
62
+ flex_attention_mask: null
63
+ hidden_act: silu
64
+ hidden_size: 2048
65
+ initializer_range: 0.02
66
+ intermediate_size: 8192
67
+ is_qwen2_config: true
68
+ max_position_embeddings: 4096
69
+ moe_config: null
70
+ num_attention_heads: 32
71
+ num_hidden_layers: 16
72
+ num_key_value_heads: 4
73
+ pad_token_id: null
74
+ pretraining_tp: 1
75
+ rms_norm_eps: 1.0e-05
76
+ rope_interleaved: false
77
+ rope_scaling: null
78
+ rope_theta: 50000.0
79
+ sliding_window_size: null
80
+ tie_word_embeddings: true
81
+ use_cache: true
82
+ vocab_size: 128256
83
+ z_loss_coefficient: 1.0e-05
84
+ z_loss_enabled: false
85
+ # no_rope_layer: 4
86
+ optimizer:
87
+ accumulate_grad_in_fp32: true
88
+ clip_grad: 1.0
89
+ learning_rate_scheduler:
90
+ learning_rate: 0.0005
91
+ lr_decay_starting_step: 2000
92
+ lr_decay_steps: 28000
93
+ lr_decay_style: cosine
94
+ lr_warmup_steps: 2000
95
+ lr_warmup_style: linear
96
+ min_decay_lr: 5.0e-05
97
+ optimizer_factory:
98
+ adam_beta1: 0.9
99
+ adam_beta2: 0.95
100
+ adam_eps: 1.0e-08
101
+ name: adamW
102
+ torch_adam_is_fused: true
103
+ weight_decay: 0.1
104
+ weight_decay_exclude_named_params: null
105
+ zero_stage: 0
106
+ parallelism:
107
+ context_parallel_size: 1
108
+ dp: 8
109
+ expert_parallel_size: 1
110
+ moe_layer_recompute: false
111
+ pp: 1
112
+ pp_engine: 1f1b
113
+ recompute_layer: false
114
+ tp: 1
115
+ tp_linear_async_communication: true
116
+ tp_mode: REDUCE_SCATTER
117
+ tp_recompute_allgather: true
118
+ profiler: null
119
+ s3_upload:
120
+ remove_after_upload: true
121
+ s5cmd_concurrency: 5
122
+ s5cmd_numworkers: 16
123
+ s5cmd_path: /fsx/loubna/.venv-2-6-cu124/bin/s5cmd
124
+ upload_s3_path: s3://smollm3/blogpost-ablations/baseline-gqa-8groups
125
+ tokenizer:
126
+ tokenizer_max_length: 4096
127
+ tokenizer_name_or_path: /fsx/loubna/projects_v2/smollm3/tokenizer/SmolLM3-3B
128
+ tokenizer_revision: null
129
+ metrics_logging:
130
+ log_level: 1
131
+ log_detail_interval: 100
132
+ tokens:
133
+ batch_accumulation_per_replica: 16
134
+ limit_test_batches: 0
135
+ limit_val_batches: 0
136
+ micro_batch_size: 3 # 1.5M tokens
137
+ sequence_length: 4096
138
+ train_steps: 30000 # 30B tokens
139
+ val_check_interval: 100
140
+ lighteval:
141
+ slurm_script_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/launch-config" # Default path for launch scripts
142
+ logs_path: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/logs" # Default path for evaluation logs
143
+ local_checkpoint_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/evals-ckpt" # Default path for temporary checkpoint storage. Will store under {local_checkpoint_dir}/{run_name}/{step}
144
+ nanotron_path: "/fsx/loubna/projects_v2/smollm3/nanotron"
145
+ output_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/results"
146
+ s3_save_path: "s3://smollm3/blogpost-evals"
147
+ upload_to_wandb: true
148
+ wandb_project: smollm3-blog-evals
149
+ wandb_entity: huggingface
150
+ parallelism:
151
+ dp: 8
152
+ pp: 1
153
+ tp: 1
154
+ tp_linear_async_communication: true
155
+ batch_size: 8 # Optional batch size for evaluation
156
+ eval_config_override: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_configs/smollm3_eval_decay.yaml" # The evaluation config file to use
157
+ eval_interval: 1000
158
+ eval_interval_file: null
159
+ slurm:
160
+ gpus_per_node: 8
161
+ partition: "hopper-prod"
162
+ hf_cache: "/fsx/loubna/.cache/huggingface"
163
+ cpus_per_task: 88
164
+ qos: "normal"
165
+ time: "01:59:00"
166
+ reservation: null # Optional reservation name, can be null
attention/mha.yaml ADDED
@@ -0,0 +1,164 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ checkpoints:
2
+ checkpoint_interval: 1000
3
+ checkpoints_path: /scratch/loubna/checkpoints
4
+ checkpoints_path_is_shared_file_system: false
5
+ load_lr_scheduler: true
6
+ load_optimizer: true
7
+ resume_checkpoint_path: null
8
+ save_final_state: true
9
+ save_initial_state: false
10
+ data_stages:
11
+ - data:
12
+ dataset:
13
+ dataset_read_path:
14
+ - /fsx/loubna/projects_v2/data/blog/fineweb-edu
15
+ - /fsx/loubna/projects_v2/data/blog/finemath-3plus
16
+ - /fsx/loubna/projects_v2/data/blog/stack-edu-python
17
+ dataset_folder:
18
+ - s3://smollm3/datasets/llama_tokenized-global-chunks/fineweb-edu/fineweb-edu/
19
+ - s3://smollm3/datasets/llama_tokenized-individual-chunks/finemath/
20
+ - s3://smollm3/datasets/llama_tokenized-individual-chunks/stack-edu-Python/
21
+ dataset_weights:
22
+ - 0.7
23
+ - 0.1
24
+ - 0.2
25
+ pad_samples_to_global_batch_size: false
26
+ return_positions: true
27
+ token_size_in_bytes: 4
28
+ tokenizer_name: HuggingFaceTB/SmolLM3-3B
29
+ use_old_brrr_dataloader: false
30
+ vocab_size: 128256
31
+ num_loading_workers: 0
32
+ seed: 6
33
+ name: stable
34
+ start_training_step: 1
35
+ general:
36
+ benchmark_csv_path: null
37
+ consumed_train_samples: null
38
+ ignore_sanity_checks: true
39
+ project: smollm3-blog
40
+ run: baseline-mha-14layers
41
+ seed: 6
42
+ step: null
43
+ logging:
44
+ iteration_step_info_interval: 1
45
+ log_level: info
46
+ log_level_replica: info
47
+ model:
48
+ ddp_bucket_cap_mb: 50
49
+ dtype: bfloat16
50
+ init_method:
51
+ std: 0.02
52
+ make_vocab_size_divisible_by: 1
53
+ model_config:
54
+ _attn_implementation: flash_attention_2
55
+ _fused_rms_norm: true
56
+ _fused_rotary_emb: true
57
+ _use_doc_masking: false
58
+ _use_qkv_packed: true
59
+ attention_bias: false
60
+ bos_token_id: 128000
61
+ eos_token_id: 128001
62
+ flex_attention_mask: null
63
+ hidden_act: silu
64
+ hidden_size: 2048
65
+ initializer_range: 0.02
66
+ intermediate_size: 8192
67
+ is_qwen2_config: true
68
+ max_position_embeddings: 4096
69
+ moe_config: null
70
+ num_attention_heads: 32
71
+ num_hidden_layers: 14
72
+ num_key_value_heads: 32
73
+ pad_token_id: null
74
+ pretraining_tp: 1
75
+ rms_norm_eps: 1.0e-05
76
+ rope_interleaved: false
77
+ rope_scaling: null
78
+ rope_theta: 50000.0
79
+ sliding_window_size: null
80
+ tie_word_embeddings: true
81
+ use_cache: true
82
+ vocab_size: 128256
83
+ no_rope_layer: null
84
+ optimizer:
85
+ accumulate_grad_in_fp32: true
86
+ clip_grad: 1.0
87
+ learning_rate_scheduler:
88
+ learning_rate: 0.0005
89
+ lr_decay_starting_step: 2000
90
+ lr_decay_steps: 28000
91
+ lr_decay_style: cosine
92
+ lr_warmup_steps: 2000
93
+ lr_warmup_style: linear
94
+ min_decay_lr: 5.0e-05
95
+ optimizer_factory:
96
+ adam_beta1: 0.9
97
+ adam_beta2: 0.95
98
+ adam_eps: 1.0e-08
99
+ name: adamW
100
+ torch_adam_is_fused: true
101
+ weight_decay: 0.1
102
+ weight_decay_exclude_named_params: null
103
+ zero_stage: 0
104
+ parallelism:
105
+ context_parallel_size: 1
106
+ dp: 8
107
+ expert_parallel_size: 1
108
+ moe_layer_recompute: false
109
+ pp: 1
110
+ pp_engine: 1f1b
111
+ recompute_layer: false
112
+ tp: 1
113
+ tp_linear_async_communication: true
114
+ tp_mode: REDUCE_SCATTER
115
+ tp_recompute_allgather: true
116
+ profiler: null
117
+ s3_upload:
118
+ remove_after_upload: true
119
+ s5cmd_concurrency: 5
120
+ s5cmd_numworkers: 16
121
+ s5cmd_path: /fsx/loubna/.venv-2-6-cu124/bin/s5cmd
122
+ upload_s3_path: s3://smollm3/blogpost-ablations/baseline-mha-14layers
123
+ tokenizer:
124
+ tokenizer_max_length: 4096
125
+ tokenizer_name_or_path: HuggingFaceTB/SmolLM3-3B
126
+ tokenizer_revision: null
127
+ metrics_logging:
128
+ log_level: 1
129
+ log_detail_interval: 100
130
+ tokens:
131
+ batch_accumulation_per_replica: 16
132
+ limit_test_batches: 0
133
+ limit_val_batches: 0
134
+ micro_batch_size: 3 # 1.5M tokens
135
+ sequence_length: 4096
136
+ train_steps: 30000 # 30B tokens
137
+ val_check_interval: 100
138
+ lighteval:
139
+ slurm_script_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/launch-config" # Default path for launch scripts
140
+ logs_path: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/logs" # Default path for evaluation logs
141
+ local_checkpoint_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/evals-ckpt" # Default path for temporary checkpoint storage. Will store under {local_checkpoint_dir}/{run_name}/{step}
142
+ nanotron_path: "/fsx/loubna/projects_v2/smollm3/nanotron"
143
+ output_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/results"
144
+ s3_save_path: "s3://smollm3/blogpost-evals"
145
+ upload_to_wandb: true
146
+ wandb_project: smollm3-blog-evals
147
+ wandb_entity: huggingface
148
+ parallelism:
149
+ dp: 8
150
+ pp: 1
151
+ tp: 1
152
+ tp_linear_async_communication: true
153
+ batch_size: 1 # Optional batch size for evaluation
154
+ eval_config_override: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_configs/ablations_blog.yaml" # The evaluation config file to use
155
+ eval_interval: 1000
156
+ eval_interval_file: null
157
+ slurm:
158
+ gpus_per_node: 8
159
+ partition: "hopper-prod"
160
+ hf_cache: "/fsx/loubna/.cache/huggingface"
161
+ cpus_per_task: 88
162
+ qos: "normal"
163
+ time: "01:59:00"
164
+ reservation: null
attention/mqa.yaml ADDED
@@ -0,0 +1,164 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ checkpoints:
2
+ checkpoint_interval: 1000
3
+ checkpoints_path: /scratch/loubna/checkpoints
4
+ checkpoints_path_is_shared_file_system: false
5
+ load_lr_scheduler: true
6
+ load_optimizer: true
7
+ resume_checkpoint_path: null
8
+ save_final_state: true
9
+ save_initial_state: false
10
+ data_stages:
11
+ - data:
12
+ dataset:
13
+ dataset_read_path:
14
+ - /fsx/loubna/projects_v2/data/blog/fineweb-edu
15
+ - /fsx/loubna/projects_v2/data/blog/finemath-3plus
16
+ - /fsx/loubna/projects_v2/data/blog/stack-edu-python
17
+ dataset_folder:
18
+ - s3://smollm3/datasets/llama_tokenized-global-chunks/fineweb-edu/fineweb-edu/
19
+ - s3://smollm3/datasets/llama_tokenized-individual-chunks/finemath/
20
+ - s3://smollm3/datasets/llama_tokenized-individual-chunks/stack-edu-Python/
21
+ dataset_weights:
22
+ - 0.7
23
+ - 0.1
24
+ - 0.2
25
+ pad_samples_to_global_batch_size: false
26
+ return_positions: true
27
+ token_size_in_bytes: 4
28
+ tokenizer_name: HuggingFaceTB/SmolLM3-3B
29
+ use_old_brrr_dataloader: false
30
+ vocab_size: 128256
31
+ num_loading_workers: 0
32
+ seed: 6
33
+ name: stable
34
+ start_training_step: 1
35
+ general:
36
+ benchmark_csv_path: null
37
+ consumed_train_samples: null
38
+ ignore_sanity_checks: true
39
+ project: smollm3-blog
40
+ run: baseline-mqa
41
+ seed: 6
42
+ step: null
43
+ logging:
44
+ iteration_step_info_interval: 1
45
+ log_level: info
46
+ log_level_replica: info
47
+ model:
48
+ ddp_bucket_cap_mb: 50
49
+ dtype: bfloat16
50
+ init_method:
51
+ std: 0.02
52
+ make_vocab_size_divisible_by: 1
53
+ model_config:
54
+ _attn_implementation: flash_attention_2
55
+ _fused_rms_norm: true
56
+ _fused_rotary_emb: true
57
+ _use_doc_masking: false
58
+ _use_qkv_packed: true
59
+ attention_bias: false
60
+ bos_token_id: 128000
61
+ eos_token_id: 128001
62
+ flex_attention_mask: null
63
+ hidden_act: silu
64
+ hidden_size: 2048
65
+ initializer_range: 0.02
66
+ intermediate_size: 8192
67
+ is_qwen2_config: true
68
+ max_position_embeddings: 4096
69
+ moe_config: null
70
+ num_attention_heads: 32
71
+ num_hidden_layers: 16
72
+ num_key_value_heads: 1
73
+ pad_token_id: null
74
+ pretraining_tp: 1
75
+ rms_norm_eps: 1.0e-05
76
+ rope_interleaved: false
77
+ rope_scaling: null
78
+ rope_theta: 50000.0
79
+ sliding_window_size: null
80
+ tie_word_embeddings: true
81
+ use_cache: true
82
+ vocab_size: 128256
83
+ no_rope_layer: null
84
+ optimizer:
85
+ accumulate_grad_in_fp32: true
86
+ clip_grad: 1.0
87
+ learning_rate_scheduler:
88
+ learning_rate: 0.0005
89
+ lr_decay_starting_step: 2000
90
+ lr_decay_steps: 28000
91
+ lr_decay_style: cosine
92
+ lr_warmup_steps: 2000
93
+ lr_warmup_style: linear
94
+ min_decay_lr: 5.0e-05
95
+ optimizer_factory:
96
+ adam_beta1: 0.9
97
+ adam_beta2: 0.95
98
+ adam_eps: 1.0e-08
99
+ name: adamW
100
+ torch_adam_is_fused: true
101
+ weight_decay: 0.1
102
+ weight_decay_exclude_named_params: null
103
+ zero_stage: 0
104
+ parallelism:
105
+ context_parallel_size: 1
106
+ dp: 8
107
+ expert_parallel_size: 1
108
+ moe_layer_recompute: false
109
+ pp: 1
110
+ pp_engine: 1f1b
111
+ recompute_layer: false
112
+ tp: 1
113
+ tp_linear_async_communication: true
114
+ tp_mode: REDUCE_SCATTER
115
+ tp_recompute_allgather: true
116
+ profiler: null
117
+ s3_upload:
118
+ remove_after_upload: true
119
+ s5cmd_concurrency: 5
120
+ s5cmd_numworkers: 16
121
+ s5cmd_path: /fsx/loubna/.venv-2-6-cu124/bin/s5cmd
122
+ upload_s3_path: s3://smollm3/blogpost-ablations/baseline-mqa
123
+ tokenizer:
124
+ tokenizer_max_length: 4096
125
+ tokenizer_name_or_path: HuggingFaceTB/SmolLM3-3B
126
+ tokenizer_revision: null
127
+ metrics_logging:
128
+ log_level: 1
129
+ log_detail_interval: 100
130
+ tokens:
131
+ batch_accumulation_per_replica: 16
132
+ limit_test_batches: 0
133
+ limit_val_batches: 0
134
+ micro_batch_size: 3 # 1.5M tokens
135
+ sequence_length: 4096
136
+ train_steps: 30000 # 30B tokens
137
+ val_check_interval: 100
138
+ lighteval:
139
+ slurm_script_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/launch-config" # Default path for launch scripts
140
+ logs_path: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/logs" # Default path for evaluation logs
141
+ local_checkpoint_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/evals-ckpt" # Default path for temporary checkpoint storage. Will store under {local_checkpoint_dir}/{run_name}/{step}
142
+ nanotron_path: "/fsx/loubna/projects_v2/smollm3/nanotron"
143
+ output_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/results"
144
+ s3_save_path: "s3://smollm3/blogpost-evals"
145
+ upload_to_wandb: true
146
+ wandb_project: smollm3-blog-evals
147
+ wandb_entity: huggingface
148
+ parallelism:
149
+ dp: 8
150
+ pp: 1
151
+ tp: 1
152
+ tp_linear_async_communication: true
153
+ batch_size: 1 # Optional batch size for evaluation
154
+ eval_config_override: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_configs/ablations_blog.yaml" # The evaluation config file to use
155
+ eval_interval: 1000
156
+ eval_interval_file: null
157
+ slurm:
158
+ gpus_per_node: 8
159
+ partition: "hopper-prod"
160
+ hf_cache: "/fsx/loubna/.cache/huggingface"
161
+ cpus_per_task: 88
162
+ qos: "normal"
163
+ time: "01:59:00"
164
+ reservation: null
baseline_config_1B.yaml ADDED
@@ -0,0 +1,164 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ checkpoints:
2
+ checkpoint_interval: 1000
3
+ checkpoints_path: /scratch/loubna/checkpoints
4
+ checkpoints_path_is_shared_file_system: false
5
+ load_lr_scheduler: true
6
+ load_optimizer: true
7
+ resume_checkpoint_path: null
8
+ save_final_state: true
9
+ save_initial_state: false
10
+ data_stages:
11
+ - data:
12
+ dataset:
13
+ dataset_read_path:
14
+ - /fsx/loubna/projects_v2/data/blog/fineweb-edu
15
+ - /fsx/loubna/projects_v2/data/blog/finemath-3plus
16
+ - /fsx/loubna/projects_v2/data/blog/stack-edu-python
17
+ dataset_folder:
18
+ - s3://smollm3/datasets/llama_tokenized-global-chunks/fineweb-edu/fineweb-edu/
19
+ - s3://smollm3/datasets/llama_tokenized-individual-chunks/finemath/
20
+ - s3://smollm3/datasets/llama_tokenized-individual-chunks/stack-edu-Python/
21
+ dataset_weights:
22
+ - 0.7
23
+ - 0.1
24
+ - 0.2
25
+ pad_samples_to_global_batch_size: false
26
+ return_positions: true
27
+ token_size_in_bytes: 4
28
+ tokenizer_name: HuggingFaceTB/SmolLM3-3B
29
+ use_old_brrr_dataloader: false
30
+ vocab_size: 128256
31
+ num_loading_workers: 0
32
+ seed: 6
33
+ name: stable
34
+ start_training_step: 1
35
+ general:
36
+ benchmark_csv_path: null
37
+ consumed_train_samples: null
38
+ ignore_sanity_checks: true
39
+ project: smollm3-blog
40
+ run: baseline
41
+ seed: 6
42
+ step: null
43
+ logging:
44
+ iteration_step_info_interval: 1
45
+ log_level: info
46
+ log_level_replica: info
47
+ model:
48
+ ddp_bucket_cap_mb: 50
49
+ dtype: bfloat16
50
+ init_method:
51
+ std: 0.02
52
+ make_vocab_size_divisible_by: 1
53
+ model_config:
54
+ _attn_implementation: flash_attention_2
55
+ _fused_rms_norm: true
56
+ _fused_rotary_emb: true
57
+ _use_doc_masking: false
58
+ _use_qkv_packed: true
59
+ attention_bias: false
60
+ bos_token_id: 128000
61
+ eos_token_id: 128001
62
+ flex_attention_mask: null
63
+ hidden_act: silu
64
+ hidden_size: 2048
65
+ initializer_range: 0.02
66
+ intermediate_size: 8192
67
+ is_qwen2_config: true
68
+ max_position_embeddings: 4096
69
+ moe_config: null
70
+ num_attention_heads: 32
71
+ num_hidden_layers: 16
72
+ num_key_value_heads: 8
73
+ pad_token_id: null
74
+ pretraining_tp: 1
75
+ rms_norm_eps: 1.0e-05
76
+ rope_interleaved: false
77
+ rope_scaling: null
78
+ rope_theta: 50000.0
79
+ sliding_window_size: null
80
+ tie_word_embeddings: true
81
+ use_cache: true
82
+ vocab_size: 128256
83
+ no_rope_layer: null
84
+ optimizer:
85
+ accumulate_grad_in_fp32: true
86
+ clip_grad: 1.0
87
+ learning_rate_scheduler:
88
+ learning_rate: 0.0005
89
+ lr_decay_starting_step: 2000
90
+ lr_decay_steps: 28000
91
+ lr_decay_style: cosine
92
+ lr_warmup_steps: 2000
93
+ lr_warmup_style: linear
94
+ min_decay_lr: 5.0e-05
95
+ optimizer_factory:
96
+ adam_beta1: 0.9
97
+ adam_beta2: 0.95
98
+ adam_eps: 1.0e-08
99
+ name: adamW
100
+ torch_adam_is_fused: true
101
+ weight_decay: 0.1
102
+ weight_decay_exclude_named_params: null
103
+ zero_stage: 0
104
+ parallelism:
105
+ context_parallel_size: 1
106
+ dp: 8
107
+ expert_parallel_size: 1
108
+ moe_layer_recompute: false
109
+ pp: 1
110
+ pp_engine: 1f1b
111
+ recompute_layer: false
112
+ tp: 1
113
+ tp_linear_async_communication: true
114
+ tp_mode: REDUCE_SCATTER
115
+ tp_recompute_allgather: true
116
+ profiler: null
117
+ s3_upload:
118
+ remove_after_upload: true
119
+ s5cmd_concurrency: 5
120
+ s5cmd_numworkers: 16
121
+ s5cmd_path: /fsx/loubna/.venv-2-6-cu124/bin/s5cmd
122
+ upload_s3_path: s3://smollm3/blogpost-ablations/baseline
123
+ tokenizer:
124
+ tokenizer_max_length: 4096
125
+ tokenizer_name_or_path: HuggingFaceTB/SmolLM3-3B
126
+ tokenizer_revision: null
127
+ metrics_logging:
128
+ log_level: 1
129
+ log_detail_interval: 100
130
+ tokens:
131
+ batch_accumulation_per_replica: 16
132
+ limit_test_batches: 0
133
+ limit_val_batches: 0
134
+ micro_batch_size: 3 # 1.5M tokens
135
+ sequence_length: 4096
136
+ train_steps: 30000 # 30B tokens
137
+ val_check_interval: 100
138
+ lighteval:
139
+ slurm_script_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/launch-config" # Default path for launch scripts
140
+ logs_path: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/logs" # Default path for evaluation logs
141
+ local_checkpoint_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/evals-ckpt" # Default path for temporary checkpoint storage. Will store under {local_checkpoint_dir}/{run_name}/{step}
142
+ nanotron_path: "/fsx/loubna/projects_v2/smollm3/nanotron"
143
+ output_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/results"
144
+ s3_save_path: "s3://smollm3/blogpost-evals"
145
+ upload_to_wandb: true
146
+ wandb_project: smollm3-blog-evals
147
+ wandb_entity: huggingface
148
+ parallelism:
149
+ dp: 8
150
+ pp: 1
151
+ tp: 1
152
+ tp_linear_async_communication: true
153
+ batch_size: 1 # Optional batch size for evaluation
154
+ eval_config_override: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_configs/ablations_blog.yaml" # The evaluation config file to use
155
+ eval_interval: 1000
156
+ eval_interval_file: null
157
+ slurm:
158
+ gpus_per_node: 8
159
+ partition: "hopper-prod"
160
+ hf_cache: "/fsx/loubna/.cache/huggingface"
161
+ cpus_per_task: 88
162
+ qos: "normal"
163
+ time: "01:59:00"
164
+ reservation: null
baseline_config_3B.yaml ADDED
@@ -0,0 +1,164 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ checkpoints:
2
+ checkpoint_interval: 1000
3
+ checkpoints_path: /scratch/loubna/checkpoints
4
+ checkpoints_path_is_shared_file_system: false
5
+ load_lr_scheduler: true
6
+ load_optimizer: true
7
+ resume_checkpoint_path: null
8
+ save_final_state: true
9
+ save_initial_state: false
10
+ data_stages:
11
+ - data:
12
+ dataset:
13
+ dataset_read_path:
14
+ - /fsx/loubna/projects_v2/data/blog/fineweb-edu
15
+ - /fsx/loubna/projects_v2/data/blog/finemath-3plus
16
+ - /fsx/loubna/projects_v2/data/blog/stack-edu-python
17
+ dataset_folder:
18
+ - s3://smollm3/datasets/llama_tokenized-global-chunks/fineweb-edu/fineweb-edu/
19
+ - s3://smollm3/datasets/llama_tokenized-individual-chunks/finemath/
20
+ - s3://smollm3/datasets/llama_tokenized-individual-chunks/stack-edu-Python/
21
+ dataset_weights:
22
+ - 0.7
23
+ - 0.1
24
+ - 0.2
25
+ pad_samples_to_global_batch_size: false
26
+ return_positions: true
27
+ token_size_in_bytes: 4
28
+ tokenizer_name: HuggingFaceTB/SmolLM3-3B
29
+ use_old_brrr_dataloader: false
30
+ vocab_size: 128256
31
+ num_loading_workers: 0
32
+ seed: 6
33
+ name: stable
34
+ start_training_step: 1
35
+ general:
36
+ benchmark_csv_path: null
37
+ consumed_train_samples: null
38
+ ignore_sanity_checks: true
39
+ project: smollm3-blog
40
+ run: baseline-3B
41
+ seed: 6
42
+ step: null
43
+ logging:
44
+ iteration_step_info_interval: 1
45
+ log_level: info
46
+ log_level_replica: info
47
+ model:
48
+ ddp_bucket_cap_mb: 50
49
+ dtype: bfloat16
50
+ init_method:
51
+ std: 0.02
52
+ make_vocab_size_divisible_by: 1
53
+ model_config:
54
+ _attn_implementation: flash_attention_2
55
+ _fused_rms_norm: true
56
+ _fused_rotary_emb: true
57
+ _use_doc_masking: false
58
+ _use_qkv_packed: true
59
+ attention_bias: false
60
+ bos_token_id: 128000
61
+ eos_token_id: 128001
62
+ flex_attention_mask: null
63
+ hidden_act: silu
64
+ hidden_size: 2048
65
+ initializer_range: 0.02
66
+ intermediate_size: 11008
67
+ is_qwen2_config: true
68
+ max_position_embeddings: 4096
69
+ moe_config: null
70
+ num_attention_heads: 16
71
+ num_hidden_layers: 36
72
+ num_key_value_heads: 4
73
+ pad_token_id: null
74
+ pretraining_tp: 2
75
+ rms_norm_eps: 1.0e-06
76
+ rope_interleaved: false
77
+ rope_scaling: null
78
+ rope_theta: 50000.0
79
+ sliding_window_size: null
80
+ tie_word_embeddings: true
81
+ use_cache: true
82
+ vocab_size: 128256
83
+ no_rope_layer: null
84
+ optimizer:
85
+ accumulate_grad_in_fp32: true
86
+ clip_grad: 1.0
87
+ learning_rate_scheduler:
88
+ learning_rate: 0.0002
89
+ lr_decay_starting_step: 2000
90
+ lr_decay_steps: 28000
91
+ lr_decay_style: cosine
92
+ lr_warmup_steps: 2000
93
+ lr_warmup_style: linear
94
+ min_decay_lr: 2.0e-05
95
+ optimizer_factory:
96
+ adam_beta1: 0.9
97
+ adam_beta2: 0.95
98
+ adam_eps: 1.0e-08
99
+ name: adamW
100
+ torch_adam_is_fused: true
101
+ weight_decay: 0.1
102
+ weight_decay_exclude_named_params: null
103
+ zero_stage: 0
104
+ parallelism:
105
+ context_parallel_size: 1
106
+ dp: 4
107
+ expert_parallel_size: 1
108
+ moe_layer_recompute: false
109
+ pp: 1
110
+ pp_engine: 1f1b
111
+ recompute_layer: false
112
+ tp: 2
113
+ tp_linear_async_communication: true
114
+ tp_mode: REDUCE_SCATTER
115
+ tp_recompute_allgather: true
116
+ profiler: null
117
+ s3_upload:
118
+ remove_after_upload: true
119
+ s5cmd_concurrency: 5
120
+ s5cmd_numworkers: 16
121
+ s5cmd_path: /fsx/loubna/.venv-2-6-cu124/bin/s5cmd
122
+ upload_s3_path: s3://smollm3/blogpost-ablations/baseline-3B
123
+ tokenizer:
124
+ tokenizer_max_length: 4096
125
+ tokenizer_name_or_path: HuggingFaceTB/SmolLM3-3B
126
+ tokenizer_revision: null
127
+ metrics_logging:
128
+ log_level: 1
129
+ log_detail_interval: 100
130
+ tokens:
131
+ batch_accumulation_per_replica: 48
132
+ limit_test_batches: 0
133
+ limit_val_batches: 0
134
+ micro_batch_size: 3
135
+ sequence_length: 4096
136
+ train_steps: 30000
137
+ val_check_interval: 100
138
+ lighteval:
139
+ slurm_script_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/launch-config" # Default path for launch scripts
140
+ logs_path: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/logs" # Default path for evaluation logs
141
+ local_checkpoint_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/evals-ckpt" # Default path for temporary checkpoint storage. Will store under {local_checkpoint_dir}/{run_name}/{step}
142
+ nanotron_path: "/fsx/loubna/projects_v2/smollm3/nanotron"
143
+ output_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/results"
144
+ s3_save_path: "s3://smollm3/blogpost-evals"
145
+ upload_to_wandb: true
146
+ wandb_project: smollm3-blog-evals
147
+ wandb_entity: huggingface
148
+ parallelism:
149
+ dp: 4
150
+ pp: 1
151
+ tp: 2
152
+ tp_linear_async_communication: true
153
+ batch_size: 2 # Optional batch size for evaluation
154
+ eval_config_override: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_configs/smollm3_eval_decay.yaml" # The evaluation config file to use
155
+ eval_interval: 1000
156
+ eval_interval_file: null
157
+ slurm:
158
+ gpus_per_node: 8
159
+ partition: "hopper-prod"
160
+ hf_cache: "/fsx/loubna/.cache/huggingface"
161
+ cpus_per_task: 88
162
+ qos: "normal"
163
+ time: "01:59:00"
164
+ reservation: null
batch_size/gbs_3M.yaml ADDED
@@ -0,0 +1,164 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ checkpoints:
2
+ checkpoint_interval: 500
3
+ checkpoints_path: /scratch/loubna/checkpoints
4
+ checkpoints_path_is_shared_file_system: false
5
+ load_lr_scheduler: true
6
+ load_optimizer: true
7
+ resume_checkpoint_path: null
8
+ save_final_state: true
9
+ save_initial_state: false
10
+ data_stages:
11
+ - data:
12
+ dataset:
13
+ dataset_read_path:
14
+ - /fsx/loubna/projects_v2/data/blog/fineweb-edu
15
+ - /fsx/loubna/projects_v2/data/blog/finemath-3plus
16
+ - /fsx/loubna/projects_v2/data/blog/stack-edu-python
17
+ dataset_folder:
18
+ - s3://smollm3/datasets/llama_tokenized-global-chunks/fineweb-edu/fineweb-edu/
19
+ - s3://smollm3/datasets/llama_tokenized-individual-chunks/finemath/
20
+ - s3://smollm3/datasets/llama_tokenized-individual-chunks/stack-edu-Python/
21
+ dataset_weights:
22
+ - 0.7
23
+ - 0.1
24
+ - 0.2
25
+ pad_samples_to_global_batch_size: false
26
+ return_positions: true
27
+ token_size_in_bytes: 4
28
+ tokenizer_name: HuggingFaceTB/SmolLM3-3B
29
+ use_old_brrr_dataloader: false
30
+ vocab_size: 128256
31
+ num_loading_workers: 0
32
+ seed: 6
33
+ name: stable
34
+ start_training_step: 1
35
+ general:
36
+ benchmark_csv_path: null
37
+ consumed_train_samples: null
38
+ ignore_sanity_checks: true
39
+ project: smollm3-blog
40
+ run: baseline-gbs-3M
41
+ seed: 6
42
+ step: null
43
+ logging:
44
+ iteration_step_info_interval: 1
45
+ log_level: info
46
+ log_level_replica: info
47
+ model:
48
+ ddp_bucket_cap_mb: 50
49
+ dtype: bfloat16
50
+ init_method:
51
+ std: 0.02
52
+ make_vocab_size_divisible_by: 1
53
+ model_config:
54
+ _attn_implementation: flash_attention_2
55
+ _fused_rms_norm: true
56
+ _fused_rotary_emb: true
57
+ _use_doc_masking: false
58
+ _use_qkv_packed: true
59
+ attention_bias: false
60
+ bos_token_id: 128000
61
+ eos_token_id: 128001
62
+ flex_attention_mask: null
63
+ hidden_act: silu
64
+ hidden_size: 2048
65
+ initializer_range: 0.02
66
+ intermediate_size: 8192
67
+ is_qwen2_config: true
68
+ max_position_embeddings: 4096
69
+ moe_config: null
70
+ num_attention_heads: 32
71
+ num_hidden_layers: 16
72
+ num_key_value_heads: 8
73
+ pad_token_id: null
74
+ pretraining_tp: 1
75
+ rms_norm_eps: 1.0e-05
76
+ rope_interleaved: false
77
+ rope_scaling: null
78
+ rope_theta: 50000.0
79
+ sliding_window_size: null
80
+ tie_word_embeddings: true
81
+ use_cache: true
82
+ vocab_size: 128256
83
+ no_rope_layer: null
84
+ optimizer:
85
+ accumulate_grad_in_fp32: true
86
+ clip_grad: 1.0
87
+ learning_rate_scheduler:
88
+ learning_rate: 0.0005
89
+ lr_decay_starting_step: 1000
90
+ lr_decay_steps: 14000
91
+ lr_decay_style: cosine
92
+ lr_warmup_steps: 1000
93
+ lr_warmup_style: linear
94
+ min_decay_lr: 5.0e-05
95
+ optimizer_factory:
96
+ adam_beta1: 0.9
97
+ adam_beta2: 0.95
98
+ adam_eps: 1.0e-08
99
+ name: adamW
100
+ torch_adam_is_fused: true
101
+ weight_decay: 0.1
102
+ weight_decay_exclude_named_params: null
103
+ zero_stage: 0
104
+ parallelism:
105
+ context_parallel_size: 1
106
+ dp: 8
107
+ expert_parallel_size: 1
108
+ moe_layer_recompute: false
109
+ pp: 1
110
+ pp_engine: 1f1b
111
+ recompute_layer: false
112
+ tp: 1
113
+ tp_linear_async_communication: true
114
+ tp_mode: REDUCE_SCATTER
115
+ tp_recompute_allgather: true
116
+ profiler: null
117
+ s3_upload:
118
+ remove_after_upload: true
119
+ s5cmd_concurrency: 5
120
+ s5cmd_numworkers: 16
121
+ s5cmd_path: /fsx/loubna/.venv-2-6-cu124/bin/s5cmd
122
+ upload_s3_path: s3://smollm3/blogpost-ablations/baseline-gbs-3M
123
+ tokenizer:
124
+ tokenizer_max_length: 4096
125
+ tokenizer_name_or_path: HuggingFaceTB/SmolLM3-3B
126
+ tokenizer_revision: null
127
+ metrics_logging:
128
+ log_level: 1
129
+ log_detail_interval: 100
130
+ tokens:
131
+ batch_accumulation_per_replica: 16
132
+ limit_test_batches: 0
133
+ limit_val_batches: 0
134
+ micro_batch_size: 3 # 1.5M tokens
135
+ sequence_length: 4096
136
+ train_steps: 15000 # 30B tokens
137
+ val_check_interval: 100
138
+ lighteval:
139
+ slurm_script_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/launch-config" # Default path for launch scripts
140
+ logs_path: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/logs" # Default path for evaluation logs
141
+ local_checkpoint_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/evals-ckpt" # Default path for temporary checkpoint storage. Will store under {local_checkpoint_dir}/{run_name}/{step}
142
+ nanotron_path: "/fsx/loubna/projects_v2/smollm3/nanotron"
143
+ output_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/results"
144
+ s3_save_path: "s3://smollm3/blogpost-evals"
145
+ upload_to_wandb: true
146
+ wandb_project: smollm3-blog-evals
147
+ wandb_entity: huggingface
148
+ parallelism:
149
+ dp: 8
150
+ pp: 1
151
+ tp: 1
152
+ tp_linear_async_communication: true
153
+ batch_size: 1 # Optional batch size for evaluation
154
+ eval_config_override: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_configs/ablations_blog.yaml" # The evaluation config file to use
155
+ eval_interval: 500
156
+ eval_interval_file: null
157
+ slurm:
158
+ gpus_per_node: 8
159
+ partition: "hopper-prod"
160
+ hf_cache: "/fsx/loubna/.cache/huggingface"
161
+ cpus_per_task: 88
162
+ qos: "normal"
163
+ time: "01:59:00"
164
+ reservation: null
batch_size/gbs_6M.yaml ADDED
@@ -0,0 +1,164 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ checkpoints:
2
+ checkpoint_interval: 500
3
+ checkpoints_path: /scratch/loubna/checkpoints
4
+ checkpoints_path_is_shared_file_system: false
5
+ load_lr_scheduler: true
6
+ load_optimizer: true
7
+ resume_checkpoint_path: null
8
+ save_final_state: true
9
+ save_initial_state: false
10
+ data_stages:
11
+ - data:
12
+ dataset:
13
+ dataset_read_path:
14
+ - /fsx/loubna/projects_v2/data/blog/fineweb-edu
15
+ - /fsx/loubna/projects_v2/data/blog/finemath-3plus
16
+ - /fsx/loubna/projects_v2/data/blog/stack-edu-python
17
+ dataset_folder:
18
+ - s3://smollm3/datasets/llama_tokenized-global-chunks/fineweb-edu/fineweb-edu/
19
+ - s3://smollm3/datasets/llama_tokenized-individual-chunks/finemath/
20
+ - s3://smollm3/datasets/llama_tokenized-individual-chunks/stack-edu-Python/
21
+ dataset_weights:
22
+ - 0.7
23
+ - 0.1
24
+ - 0.2
25
+ pad_samples_to_global_batch_size: false
26
+ return_positions: true
27
+ token_size_in_bytes: 4
28
+ tokenizer_name: HuggingFaceTB/SmolLM3-3B
29
+ use_old_brrr_dataloader: false
30
+ vocab_size: 128256
31
+ num_loading_workers: 0
32
+ seed: 6
33
+ name: stable
34
+ start_training_step: 1
35
+ general:
36
+ benchmark_csv_path: null
37
+ consumed_train_samples: null
38
+ ignore_sanity_checks: true
39
+ project: smollm3-blog
40
+ run: baseline-gbs-6M
41
+ seed: 6
42
+ step: null
43
+ logging:
44
+ iteration_step_info_interval: 1
45
+ log_level: info
46
+ log_level_replica: info
47
+ model:
48
+ ddp_bucket_cap_mb: 50
49
+ dtype: bfloat16
50
+ init_method:
51
+ std: 0.02
52
+ make_vocab_size_divisible_by: 1
53
+ model_config:
54
+ _attn_implementation: flash_attention_2
55
+ _fused_rms_norm: true
56
+ _fused_rotary_emb: true
57
+ _use_doc_masking: false
58
+ _use_qkv_packed: true
59
+ attention_bias: false
60
+ bos_token_id: 128000
61
+ eos_token_id: 128001
62
+ flex_attention_mask: null
63
+ hidden_act: silu
64
+ hidden_size: 2048
65
+ initializer_range: 0.02
66
+ intermediate_size: 8192
67
+ is_qwen2_config: true
68
+ max_position_embeddings: 4096
69
+ moe_config: null
70
+ num_attention_heads: 32
71
+ num_hidden_layers: 16
72
+ num_key_value_heads: 8
73
+ pad_token_id: null
74
+ pretraining_tp: 1
75
+ rms_norm_eps: 1.0e-05
76
+ rope_interleaved: false
77
+ rope_scaling: null
78
+ rope_theta: 50000.0
79
+ sliding_window_size: null
80
+ tie_word_embeddings: true
81
+ use_cache: true
82
+ vocab_size: 128256
83
+ no_rope_layer: null
84
+ optimizer:
85
+ accumulate_grad_in_fp32: true
86
+ clip_grad: 1.0
87
+ learning_rate_scheduler:
88
+ learning_rate: 0.0005
89
+ lr_decay_starting_step: 500
90
+ lr_decay_steps: 7000
91
+ lr_decay_style: cosine
92
+ lr_warmup_steps: 500
93
+ lr_warmup_style: linear
94
+ min_decay_lr: 5.0e-05
95
+ optimizer_factory:
96
+ adam_beta1: 0.9
97
+ adam_beta2: 0.95
98
+ adam_eps: 1.0e-08
99
+ name: adamW
100
+ torch_adam_is_fused: true
101
+ weight_decay: 0.1
102
+ weight_decay_exclude_named_params: null
103
+ zero_stage: 0
104
+ parallelism:
105
+ context_parallel_size: 1
106
+ dp: 16
107
+ expert_parallel_size: 1
108
+ moe_layer_recompute: false
109
+ pp: 1
110
+ pp_engine: 1f1b
111
+ recompute_layer: false
112
+ tp: 1
113
+ tp_linear_async_communication: true
114
+ tp_mode: REDUCE_SCATTER
115
+ tp_recompute_allgather: true
116
+ profiler: null
117
+ s3_upload:
118
+ remove_after_upload: true
119
+ s5cmd_concurrency: 5
120
+ s5cmd_numworkers: 16
121
+ s5cmd_path: /fsx/loubna/.venv-2-6-cu124/bin/s5cmd
122
+ upload_s3_path: s3://smollm3/blogpost-ablations/baseline-gbs-6M
123
+ tokenizer:
124
+ tokenizer_max_length: 4096
125
+ tokenizer_name_or_path: HuggingFaceTB/SmolLM3-3B
126
+ tokenizer_revision: null
127
+ metrics_logging:
128
+ log_level: 1
129
+ log_detail_interval: 100
130
+ tokens:
131
+ batch_accumulation_per_replica: 32
132
+ limit_test_batches: 0
133
+ limit_val_batches: 0
134
+ micro_batch_size: 3 # 1.5M tokens
135
+ sequence_length: 4096
136
+ train_steps: 7500 # 30B tokens
137
+ val_check_interval: 100
138
+ lighteval:
139
+ slurm_script_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/launch-config" # Default path for launch scripts
140
+ logs_path: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/logs" # Default path for evaluation logs
141
+ local_checkpoint_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/evals-ckpt" # Default path for temporary checkpoint storage. Will store under {local_checkpoint_dir}/{run_name}/{step}
142
+ nanotron_path: "/fsx/loubna/projects_v2/smollm3/nanotron"
143
+ output_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/results"
144
+ s3_save_path: "s3://smollm3/blogpost-evals"
145
+ upload_to_wandb: true
146
+ wandb_project: smollm3-blog-evals
147
+ wandb_entity: loubnabnl
148
+ parallelism:
149
+ dp: 8
150
+ pp: 1
151
+ tp: 1
152
+ tp_linear_async_communication: true
153
+ batch_size: 1 # Optional batch size for evaluation
154
+ eval_config_override: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_configs/ablations_blog.yaml" # The evaluation config file to use
155
+ eval_interval: 500
156
+ eval_interval_file: null
157
+ slurm:
158
+ gpus_per_node: 8
159
+ partition: "hopper-prod"
160
+ hf_cache: "/fsx/loubna/.cache/huggingface"
161
+ cpus_per_task: 88
162
+ qos: "low"
163
+ time: "01:59:00"
164
+ reservation: null
batch_size/gbs_700M.yaml ADDED
@@ -0,0 +1,164 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ checkpoints:
2
+ checkpoint_interval: 2000
3
+ checkpoints_path: /scratch/loubna/checkpoints
4
+ checkpoints_path_is_shared_file_system: false
5
+ load_lr_scheduler: true
6
+ load_optimizer: true
7
+ resume_checkpoint_path: null
8
+ save_final_state: true
9
+ save_initial_state: false
10
+ data_stages:
11
+ - data:
12
+ dataset:
13
+ dataset_read_path:
14
+ - /fsx/loubna/projects_v2/data/blog/fineweb-edu
15
+ - /fsx/loubna/projects_v2/data/blog/finemath-3plus
16
+ - /fsx/loubna/projects_v2/data/blog/stack-edu-python
17
+ dataset_folder:
18
+ - s3://smollm3/datasets/llama_tokenized-global-chunks/fineweb-edu/fineweb-edu/
19
+ - s3://smollm3/datasets/llama_tokenized-individual-chunks/finemath/
20
+ - s3://smollm3/datasets/llama_tokenized-individual-chunks/stack-edu-Python/
21
+ dataset_weights:
22
+ - 0.7
23
+ - 0.1
24
+ - 0.2
25
+ pad_samples_to_global_batch_size: false
26
+ return_positions: true
27
+ token_size_in_bytes: 4
28
+ tokenizer_name: HuggingFaceTB/SmolLM3-3B
29
+ use_old_brrr_dataloader: false
30
+ vocab_size: 128256
31
+ num_loading_workers: 0
32
+ seed: 6
33
+ name: stable
34
+ start_training_step: 1
35
+ general:
36
+ benchmark_csv_path: null
37
+ consumed_train_samples: null
38
+ ignore_sanity_checks: true
39
+ project: smollm3-blog
40
+ run: baseline-gbs-750M
41
+ seed: 6
42
+ step: null
43
+ logging:
44
+ iteration_step_info_interval: 1
45
+ log_level: info
46
+ log_level_replica: info
47
+ model:
48
+ ddp_bucket_cap_mb: 50
49
+ dtype: bfloat16
50
+ init_method:
51
+ std: 0.02
52
+ make_vocab_size_divisible_by: 1
53
+ model_config:
54
+ _attn_implementation: flash_attention_2
55
+ _fused_rms_norm: true
56
+ _fused_rotary_emb: true
57
+ _use_doc_masking: false
58
+ _use_qkv_packed: true
59
+ attention_bias: false
60
+ bos_token_id: 128000
61
+ eos_token_id: 128001
62
+ flex_attention_mask: null
63
+ hidden_act: silu
64
+ hidden_size: 2048
65
+ initializer_range: 0.02
66
+ intermediate_size: 8192
67
+ is_qwen2_config: true
68
+ max_position_embeddings: 4096
69
+ moe_config: null
70
+ num_attention_heads: 32
71
+ num_hidden_layers: 16
72
+ num_key_value_heads: 8
73
+ pad_token_id: null
74
+ pretraining_tp: 1
75
+ rms_norm_eps: 1.0e-05
76
+ rope_interleaved: false
77
+ rope_scaling: null
78
+ rope_theta: 50000.0
79
+ sliding_window_size: null
80
+ tie_word_embeddings: true
81
+ use_cache: true
82
+ vocab_size: 128256
83
+ no_rope_layer: null
84
+ optimizer:
85
+ accumulate_grad_in_fp32: true
86
+ clip_grad: 1.0
87
+ learning_rate_scheduler:
88
+ learning_rate: 0.0005
89
+ lr_decay_starting_step: 4000
90
+ lr_decay_steps: 56000
91
+ lr_decay_style: cosine
92
+ lr_warmup_steps: 4000
93
+ lr_warmup_style: linear
94
+ min_decay_lr: 5.0e-05
95
+ optimizer_factory:
96
+ adam_beta1: 0.9
97
+ adam_beta2: 0.95
98
+ adam_eps: 1.0e-08
99
+ name: adamW
100
+ torch_adam_is_fused: true
101
+ weight_decay: 0.1
102
+ weight_decay_exclude_named_params: null
103
+ zero_stage: 0
104
+ parallelism:
105
+ context_parallel_size: 1
106
+ dp: 16
107
+ expert_parallel_size: 1
108
+ moe_layer_recompute: false
109
+ pp: 1
110
+ pp_engine: 1f1b
111
+ recompute_layer: false
112
+ tp: 1
113
+ tp_linear_async_communication: true
114
+ tp_mode: REDUCE_SCATTER
115
+ tp_recompute_allgather: true
116
+ profiler: null
117
+ s3_upload:
118
+ remove_after_upload: true
119
+ s5cmd_concurrency: 5
120
+ s5cmd_numworkers: 16
121
+ s5cmd_path: /fsx/loubna/.venv-2-6-cu124/bin/s5cmd
122
+ upload_s3_path: s3://smollm3/blogpost-ablations/baseline-gbs-750M
123
+ tokenizer:
124
+ tokenizer_max_length: 4096
125
+ tokenizer_name_or_path: HuggingFaceTB/SmolLM3-3B
126
+ tokenizer_revision: null
127
+ metrics_logging:
128
+ log_level: 1
129
+ log_detail_interval: 100
130
+ tokens:
131
+ batch_accumulation_per_replica: 4
132
+ limit_test_batches: 0
133
+ limit_val_batches: 0
134
+ micro_batch_size: 3 # 1.5M tokens
135
+ sequence_length: 4096
136
+ train_steps: 60000 # 30B tokens
137
+ val_check_interval: 100
138
+ lighteval:
139
+ slurm_script_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/launch-config" # Default path for launch scripts
140
+ logs_path: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/logs" # Default path for evaluation logs
141
+ local_checkpoint_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/evals-ckpt" # Default path for temporary checkpoint storage. Will store under {local_checkpoint_dir}/{run_name}/{step}
142
+ nanotron_path: "/fsx/loubna/projects_v2/smollm3/nanotron"
143
+ output_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/results"
144
+ s3_save_path: "s3://smollm3/blogpost-evals"
145
+ upload_to_wandb: true
146
+ wandb_project: smollm3-blog-evals
147
+ wandb_entity: loubnabnl
148
+ parallelism:
149
+ dp: 8
150
+ pp: 1
151
+ tp: 1
152
+ tp_linear_async_communication: true
153
+ batch_size: 1 # Optional batch size for evaluation
154
+ eval_config_override: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_configs/ablations_blog.yaml" # The evaluation config file to use
155
+ eval_interval: 2000
156
+ eval_interval_file: null
157
+ slurm:
158
+ gpus_per_node: 8
159
+ partition: "hopper-prod"
160
+ hf_cache: "/fsx/loubna/.cache/huggingface"
161
+ cpus_per_task: 88
162
+ qos: "normal"
163
+ time: "01:59:00"
164
+ reservation: null
doc_masking/doc_masking.yaml ADDED
@@ -0,0 +1,164 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ checkpoints:
2
+ checkpoint_interval: 1000
3
+ checkpoints_path: /scratch/loubna/checkpoints
4
+ checkpoints_path_is_shared_file_system: false
5
+ load_lr_scheduler: true
6
+ load_optimizer: true
7
+ resume_checkpoint_path: null
8
+ save_final_state: true
9
+ save_initial_state: false
10
+ data_stages:
11
+ - data:
12
+ dataset:
13
+ dataset_read_path:
14
+ - /fsx/loubna/projects_v2/data/blog/fineweb-edu
15
+ - /fsx/loubna/projects_v2/data/blog/finemath-3plus
16
+ - /fsx/loubna/projects_v2/data/blog/stack-edu-python
17
+ dataset_folder:
18
+ - s3://smollm3/datasets/llama_tokenized-global-chunks/fineweb-edu/fineweb-edu/
19
+ - s3://smollm3/datasets/llama_tokenized-individual-chunks/finemath/
20
+ - s3://smollm3/datasets/llama_tokenized-individual-chunks/stack-edu-Python/
21
+ dataset_weights:
22
+ - 0.7
23
+ - 0.1
24
+ - 0.2
25
+ pad_samples_to_global_batch_size: false
26
+ return_positions: true
27
+ token_size_in_bytes: 4
28
+ tokenizer_name: HuggingFaceTB/SmolLM3-3B
29
+ use_old_brrr_dataloader: false
30
+ vocab_size: 128256
31
+ num_loading_workers: 0
32
+ seed: 6
33
+ name: stable
34
+ start_training_step: 1
35
+ general:
36
+ benchmark_csv_path: null
37
+ consumed_train_samples: null
38
+ ignore_sanity_checks: true
39
+ project: smollm3-blog
40
+ run: baseline-doc-masking
41
+ seed: 6
42
+ step: null
43
+ logging:
44
+ iteration_step_info_interval: 1
45
+ log_level: info
46
+ log_level_replica: info
47
+ model:
48
+ ddp_bucket_cap_mb: 50
49
+ dtype: bfloat16
50
+ init_method:
51
+ std: 0.02
52
+ make_vocab_size_divisible_by: 1
53
+ model_config:
54
+ _attn_implementation: flash_attention_2
55
+ _fused_rms_norm: true
56
+ _fused_rotary_emb: true
57
+ _use_doc_masking: true
58
+ _use_qkv_packed: true
59
+ attention_bias: false
60
+ bos_token_id: 128000
61
+ eos_token_id: 128001
62
+ flex_attention_mask: null
63
+ hidden_act: silu
64
+ hidden_size: 2048
65
+ initializer_range: 0.02
66
+ intermediate_size: 8192
67
+ is_qwen2_config: true
68
+ max_position_embeddings: 4096
69
+ moe_config: null
70
+ num_attention_heads: 32
71
+ num_hidden_layers: 16
72
+ num_key_value_heads: 8
73
+ pad_token_id: null
74
+ pretraining_tp: 1
75
+ rms_norm_eps: 1.0e-05
76
+ rope_interleaved: false
77
+ rope_scaling: null
78
+ rope_theta: 50000.0
79
+ sliding_window_size: null
80
+ tie_word_embeddings: true
81
+ use_cache: true
82
+ vocab_size: 128256
83
+ no_rope_layer: null
84
+ optimizer:
85
+ accumulate_grad_in_fp32: true
86
+ clip_grad: 1.0
87
+ learning_rate_scheduler:
88
+ learning_rate: 0.0005
89
+ lr_decay_starting_step: 2000
90
+ lr_decay_steps: 28000
91
+ lr_decay_style: cosine
92
+ lr_warmup_steps: 2000
93
+ lr_warmup_style: linear
94
+ min_decay_lr: 5.0e-05
95
+ optimizer_factory:
96
+ adam_beta1: 0.9
97
+ adam_beta2: 0.95
98
+ adam_eps: 1.0e-08
99
+ name: adamW
100
+ torch_adam_is_fused: true
101
+ weight_decay: 0.1
102
+ weight_decay_exclude_named_params: null
103
+ zero_stage: 0
104
+ parallelism:
105
+ context_parallel_size: 1
106
+ dp: 8
107
+ expert_parallel_size: 1
108
+ moe_layer_recompute: false
109
+ pp: 1
110
+ pp_engine: 1f1b
111
+ recompute_layer: false
112
+ tp: 1
113
+ tp_linear_async_communication: true
114
+ tp_mode: REDUCE_SCATTER
115
+ tp_recompute_allgather: true
116
+ profiler: null
117
+ s3_upload:
118
+ remove_after_upload: true
119
+ s5cmd_concurrency: 5
120
+ s5cmd_numworkers: 16
121
+ s5cmd_path: /fsx/loubna/.venv-2-6-cu124/bin/s5cmd
122
+ upload_s3_path: s3://smollm3/blogpost-ablations/baseline-doc-masking
123
+ tokenizer:
124
+ tokenizer_max_length: 4096
125
+ tokenizer_name_or_path: HuggingFaceTB/SmolLM3-3B
126
+ tokenizer_revision: null
127
+ metrics_logging:
128
+ log_level: 1
129
+ log_detail_interval: 100
130
+ tokens:
131
+ batch_accumulation_per_replica: 16
132
+ limit_test_batches: 0
133
+ limit_val_batches: 0
134
+ micro_batch_size: 3 # 1.5M tokens
135
+ sequence_length: 4096
136
+ train_steps: 30000 # 30B tokens
137
+ val_check_interval: 100
138
+ lighteval:
139
+ slurm_script_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/launch-config" # Default path for launch scripts
140
+ logs_path: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/logs" # Default path for evaluation logs
141
+ local_checkpoint_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/evals-ckpt" # Default path for temporary checkpoint storage. Will store under {local_checkpoint_dir}/{run_name}/{step}
142
+ nanotron_path: "/fsx/loubna/projects_v2/smollm3/nanotron"
143
+ output_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/results"
144
+ s3_save_path: "s3://smollm3/blogpost-evals"
145
+ upload_to_wandb: true
146
+ wandb_project: smollm3-blog-evals
147
+ wandb_entity: huggingface
148
+ parallelism:
149
+ dp: 8
150
+ pp: 1
151
+ tp: 1
152
+ tp_linear_async_communication: true
153
+ batch_size: 1 # Optional batch size for evaluation
154
+ eval_config_override: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_configs/ablations_blog.yaml" # The evaluation config file to use
155
+ eval_interval: 1000
156
+ eval_interval_file: null
157
+ slurm:
158
+ gpus_per_node: 8
159
+ partition: "hopper-prod"
160
+ hf_cache: "/fsx/loubna/.cache/huggingface"
161
+ cpus_per_task: 88
162
+ qos: "normal"
163
+ time: "01:59:00"
164
+ reservation: null
learning_rate/lr_high.yaml ADDED
@@ -0,0 +1,164 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ checkpoints:
2
+ checkpoint_interval: 1000
3
+ checkpoints_path: /scratch/loubna/checkpoints
4
+ checkpoints_path_is_shared_file_system: false
5
+ load_lr_scheduler: true
6
+ load_optimizer: true
7
+ resume_checkpoint_path: null
8
+ save_final_state: true
9
+ save_initial_state: false
10
+ data_stages:
11
+ - data:
12
+ dataset:
13
+ dataset_read_path:
14
+ - /fsx/loubna/projects_v2/data/blog/fineweb-edu
15
+ - /fsx/loubna/projects_v2/data/blog/finemath-3plus
16
+ - /fsx/loubna/projects_v2/data/blog/stack-edu-python
17
+ dataset_folder:
18
+ - s3://smollm3/datasets/llama_tokenized-global-chunks/fineweb-edu/fineweb-edu/
19
+ - s3://smollm3/datasets/llama_tokenized-individual-chunks/finemath/
20
+ - s3://smollm3/datasets/llama_tokenized-individual-chunks/stack-edu-Python/
21
+ dataset_weights:
22
+ - 0.7
23
+ - 0.1
24
+ - 0.2
25
+ pad_samples_to_global_batch_size: false
26
+ return_positions: true
27
+ token_size_in_bytes: 4
28
+ tokenizer_name: HuggingFaceTB/SmolLM3-3B
29
+ use_old_brrr_dataloader: false
30
+ vocab_size: 128256
31
+ num_loading_workers: 0
32
+ seed: 6
33
+ name: stable
34
+ start_training_step: 1
35
+ general:
36
+ benchmark_csv_path: null
37
+ consumed_train_samples: null
38
+ ignore_sanity_checks: true
39
+ project: smollm3-blog
40
+ run: baseline-lr-5e-3
41
+ seed: 6
42
+ step: null
43
+ logging:
44
+ iteration_step_info_interval: 1
45
+ log_level: info
46
+ log_level_replica: info
47
+ model:
48
+ ddp_bucket_cap_mb: 50
49
+ dtype: bfloat16
50
+ init_method:
51
+ std: 0.02
52
+ make_vocab_size_divisible_by: 1
53
+ model_config:
54
+ _attn_implementation: flash_attention_2
55
+ _fused_rms_norm: true
56
+ _fused_rotary_emb: true
57
+ _use_doc_masking: false
58
+ _use_qkv_packed: true
59
+ attention_bias: false
60
+ bos_token_id: 128000
61
+ eos_token_id: 128001
62
+ flex_attention_mask: null
63
+ hidden_act: silu
64
+ hidden_size: 2048
65
+ initializer_range: 0.02
66
+ intermediate_size: 8192
67
+ is_qwen2_config: true
68
+ max_position_embeddings: 4096
69
+ moe_config: null
70
+ num_attention_heads: 32
71
+ num_hidden_layers: 16
72
+ num_key_value_heads: 8
73
+ pad_token_id: null
74
+ pretraining_tp: 1
75
+ rms_norm_eps: 1.0e-05
76
+ rope_interleaved: false
77
+ rope_scaling: null
78
+ rope_theta: 50000.0
79
+ sliding_window_size: null
80
+ tie_word_embeddings: true
81
+ use_cache: true
82
+ vocab_size: 128256
83
+ no_rope_layer: null
84
+ optimizer:
85
+ accumulate_grad_in_fp32: true
86
+ clip_grad: 1.0
87
+ learning_rate_scheduler:
88
+ learning_rate: 0.005
89
+ lr_decay_starting_step: 2000
90
+ lr_decay_steps: 28000
91
+ lr_decay_style: cosine
92
+ lr_warmup_steps: 2000
93
+ lr_warmup_style: linear
94
+ min_decay_lr: 5.0e-05
95
+ optimizer_factory:
96
+ adam_beta1: 0.9
97
+ adam_beta2: 0.95
98
+ adam_eps: 1.0e-08
99
+ name: adamW
100
+ torch_adam_is_fused: true
101
+ weight_decay: 0.1
102
+ weight_decay_exclude_named_params: null
103
+ zero_stage: 0
104
+ parallelism:
105
+ context_parallel_size: 1
106
+ dp: 8
107
+ expert_parallel_size: 1
108
+ moe_layer_recompute: false
109
+ pp: 1
110
+ pp_engine: 1f1b
111
+ recompute_layer: false
112
+ tp: 1
113
+ tp_linear_async_communication: true
114
+ tp_mode: REDUCE_SCATTER
115
+ tp_recompute_allgather: true
116
+ profiler: null
117
+ s3_upload:
118
+ remove_after_upload: true
119
+ s5cmd_concurrency: 5
120
+ s5cmd_numworkers: 16
121
+ s5cmd_path: /fsx/loubna/.venv-2-6-cu124/bin/s5cmd
122
+ upload_s3_path: s3://smollm3/blogpost-ablations/baseline-lr-5e-3
123
+ tokenizer:
124
+ tokenizer_max_length: 4096
125
+ tokenizer_name_or_path: HuggingFaceTB/SmolLM3-3B
126
+ tokenizer_revision: null
127
+ metrics_logging:
128
+ log_level: 1
129
+ log_detail_interval: 100
130
+ tokens:
131
+ batch_accumulation_per_replica: 16
132
+ limit_test_batches: 0
133
+ limit_val_batches: 0
134
+ micro_batch_size: 3 # 1.5M tokens
135
+ sequence_length: 4096
136
+ train_steps: 30000 # 30B tokens
137
+ val_check_interval: 100
138
+ lighteval:
139
+ slurm_script_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/launch-config" # Default path for launch scripts
140
+ logs_path: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/logs" # Default path for evaluation logs
141
+ local_checkpoint_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/evals-ckpt" # Default path for temporary checkpoint storage. Will store under {local_checkpoint_dir}/{run_name}/{step}
142
+ nanotron_path: "/fsx/loubna/projects_v2/smollm3/nanotron"
143
+ output_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/results"
144
+ s3_save_path: "s3://smollm3/blogpost-evals"
145
+ upload_to_wandb: true
146
+ wandb_project: smollm3-blog-evals
147
+ wandb_entity: huggingface
148
+ parallelism:
149
+ dp: 8
150
+ pp: 1
151
+ tp: 1
152
+ tp_linear_async_communication: true
153
+ batch_size: 1 # Optional batch size for evaluation
154
+ eval_config_override: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_configs/ablations_blog.yaml" # The evaluation config file to use
155
+ eval_interval: 1000
156
+ eval_interval_file: null
157
+ slurm:
158
+ gpus_per_node: 8
159
+ partition: "hopper-prod"
160
+ hf_cache: "/fsx/loubna/.cache/huggingface"
161
+ cpus_per_task: 88
162
+ qos: "normal"
163
+ time: "01:59:00"
164
+ reservation: null
learning_rate/lr_low.yaml ADDED
@@ -0,0 +1,164 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ checkpoints:
2
+ checkpoint_interval: 1000
3
+ checkpoints_path: /scratch/loubna/checkpoints
4
+ checkpoints_path_is_shared_file_system: false
5
+ load_lr_scheduler: true
6
+ load_optimizer: true
7
+ resume_checkpoint_path: null
8
+ save_final_state: true
9
+ save_initial_state: false
10
+ data_stages:
11
+ - data:
12
+ dataset:
13
+ dataset_read_path:
14
+ - /fsx/loubna/projects_v2/data/blog/fineweb-edu
15
+ - /fsx/loubna/projects_v2/data/blog/finemath-3plus
16
+ - /fsx/loubna/projects_v2/data/blog/stack-edu-python
17
+ dataset_folder:
18
+ - s3://smollm3/datasets/llama_tokenized-global-chunks/fineweb-edu/fineweb-edu/
19
+ - s3://smollm3/datasets/llama_tokenized-individual-chunks/finemath/
20
+ - s3://smollm3/datasets/llama_tokenized-individual-chunks/stack-edu-Python/
21
+ dataset_weights:
22
+ - 0.7
23
+ - 0.1
24
+ - 0.2
25
+ pad_samples_to_global_batch_size: false
26
+ return_positions: true
27
+ token_size_in_bytes: 4
28
+ tokenizer_name: HuggingFaceTB/SmolLM3-3B
29
+ use_old_brrr_dataloader: false
30
+ vocab_size: 128256
31
+ num_loading_workers: 0
32
+ seed: 6
33
+ name: stable
34
+ start_training_step: 1
35
+ general:
36
+ benchmark_csv_path: null
37
+ consumed_train_samples: null
38
+ ignore_sanity_checks: true
39
+ project: smollm3-blog
40
+ run: baseline-lr-1e-4
41
+ seed: 6
42
+ step: null
43
+ logging:
44
+ iteration_step_info_interval: 1
45
+ log_level: info
46
+ log_level_replica: info
47
+ model:
48
+ ddp_bucket_cap_mb: 50
49
+ dtype: bfloat16
50
+ init_method:
51
+ std: 0.02
52
+ make_vocab_size_divisible_by: 1
53
+ model_config:
54
+ _attn_implementation: flash_attention_2
55
+ _fused_rms_norm: true
56
+ _fused_rotary_emb: true
57
+ _use_doc_masking: false
58
+ _use_qkv_packed: true
59
+ attention_bias: false
60
+ bos_token_id: 128000
61
+ eos_token_id: 128001
62
+ flex_attention_mask: null
63
+ hidden_act: silu
64
+ hidden_size: 2048
65
+ initializer_range: 0.02
66
+ intermediate_size: 8192
67
+ is_qwen2_config: true
68
+ max_position_embeddings: 4096
69
+ moe_config: null
70
+ num_attention_heads: 32
71
+ num_hidden_layers: 16
72
+ num_key_value_heads: 8
73
+ pad_token_id: null
74
+ pretraining_tp: 1
75
+ rms_norm_eps: 1.0e-05
76
+ rope_interleaved: false
77
+ rope_scaling: null
78
+ rope_theta: 50000.0
79
+ sliding_window_size: null
80
+ tie_word_embeddings: true
81
+ use_cache: true
82
+ vocab_size: 128256
83
+ no_rope_layer: null
84
+ optimizer:
85
+ accumulate_grad_in_fp32: true
86
+ clip_grad: 1.0
87
+ learning_rate_scheduler:
88
+ learning_rate: 0.0001
89
+ lr_decay_starting_step: 2000
90
+ lr_decay_steps: 28000
91
+ lr_decay_style: cosine
92
+ lr_warmup_steps: 2000
93
+ lr_warmup_style: linear
94
+ min_decay_lr: 5.0e-05
95
+ optimizer_factory:
96
+ adam_beta1: 0.9
97
+ adam_beta2: 0.95
98
+ adam_eps: 1.0e-08
99
+ name: adamW
100
+ torch_adam_is_fused: true
101
+ weight_decay: 0.1
102
+ weight_decay_exclude_named_params: null
103
+ zero_stage: 0
104
+ parallelism:
105
+ context_parallel_size: 1
106
+ dp: 8
107
+ expert_parallel_size: 1
108
+ moe_layer_recompute: false
109
+ pp: 1
110
+ pp_engine: 1f1b
111
+ recompute_layer: false
112
+ tp: 1
113
+ tp_linear_async_communication: true
114
+ tp_mode: REDUCE_SCATTER
115
+ tp_recompute_allgather: true
116
+ profiler: null
117
+ s3_upload:
118
+ remove_after_upload: true
119
+ s5cmd_concurrency: 5
120
+ s5cmd_numworkers: 16
121
+ s5cmd_path: /fsx/loubna/.venv-2-6-cu124/bin/s5cmd
122
+ upload_s3_path: s3://smollm3/blogpost-ablations/baseline-lr-1e-4
123
+ tokenizer:
124
+ tokenizer_max_length: 4096
125
+ tokenizer_name_or_path: HuggingFaceTB/SmolLM3-3B
126
+ tokenizer_revision: null
127
+ metrics_logging:
128
+ log_level: 1
129
+ log_detail_interval: 100
130
+ tokens:
131
+ batch_accumulation_per_replica: 16 # changed from 8 to match lr_high
132
+ limit_test_batches: 0
133
+ limit_val_batches: 0
134
+ micro_batch_size: 3 # 1.5M tokens
135
+ sequence_length: 4096
136
+ train_steps: 30000 # 30B tokens
137
+ val_check_interval: 100
138
+ lighteval:
139
+ slurm_script_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/launch-config" # Default path for launch scripts
140
+ logs_path: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/logs" # Default path for evaluation logs
141
+ local_checkpoint_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/evals-ckpt" # Default path for temporary checkpoint storage. Will store under {local_checkpoint_dir}/{run_name}/{step}
142
+ nanotron_path: "/fsx/loubna/projects_v2/smollm3/nanotron"
143
+ output_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/results"
144
+ s3_save_path: "s3://smollm3/blogpost-evals"
145
+ upload_to_wandb: true
146
+ wandb_project: smollm3-blog-evals
147
+ wandb_entity: huggingface
148
+ parallelism:
149
+ dp: 8
150
+ pp: 1
151
+ tp: 1
152
+ tp_linear_async_communication: true
153
+ batch_size: 1 # Optional batch size for evaluation
154
+ eval_config_override: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_configs/ablations_blog.yaml" # The evaluation config file to use
155
+ eval_interval: 1000
156
+ eval_interval_file: null
157
+ slurm:
158
+ gpus_per_node: 8
159
+ partition: "hopper-prod"
160
+ hf_cache: "/fsx/loubna/.cache/huggingface"
161
+ cpus_per_task: 88
162
+ qos: "normal"
163
+ time: "01:59:00"
164
+ reservation: null
learning_rate/lr_medium.yaml ADDED
@@ -0,0 +1,164 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ checkpoints:
2
+ checkpoint_interval: 1000
3
+ checkpoints_path: /scratch/loubna/checkpoints
4
+ checkpoints_path_is_shared_file_system: false
5
+ load_lr_scheduler: true
6
+ load_optimizer: true
7
+ resume_checkpoint_path: null
8
+ save_final_state: true
9
+ save_initial_state: false
10
+ data_stages:
11
+ - data:
12
+ dataset:
13
+ dataset_read_path:
14
+ - /fsx/loubna/projects_v2/data/blog/fineweb-edu
15
+ - /fsx/loubna/projects_v2/data/blog/finemath-3plus
16
+ - /fsx/loubna/projects_v2/data/blog/stack-edu-python
17
+ dataset_folder:
18
+ - s3://smollm3/datasets/llama_tokenized-global-chunks/fineweb-edu/fineweb-edu/
19
+ - s3://smollm3/datasets/llama_tokenized-individual-chunks/finemath/
20
+ - s3://smollm3/datasets/llama_tokenized-individual-chunks/stack-edu-Python/
21
+ dataset_weights:
22
+ - 0.7
23
+ - 0.1
24
+ - 0.2
25
+ pad_samples_to_global_batch_size: false
26
+ return_positions: true
27
+ token_size_in_bytes: 4
28
+ tokenizer_name: HuggingFaceTB/SmolLM3-3B
29
+ use_old_brrr_dataloader: false
30
+ vocab_size: 128256
31
+ num_loading_workers: 0
32
+ seed: 6
33
+ name: stable
34
+ start_training_step: 1
35
+ general:
36
+ benchmark_csv_path: null
37
+ consumed_train_samples: null
38
+ ignore_sanity_checks: true
39
+ project: smollm3-blog
40
+ run: baseline
41
+ seed: 6
42
+ step: null
43
+ logging:
44
+ iteration_step_info_interval: 1
45
+ log_level: info
46
+ log_level_replica: info
47
+ model:
48
+ ddp_bucket_cap_mb: 50
49
+ dtype: bfloat16
50
+ init_method:
51
+ std: 0.02
52
+ make_vocab_size_divisible_by: 1
53
+ model_config:
54
+ _attn_implementation: flash_attention_2
55
+ _fused_rms_norm: true
56
+ _fused_rotary_emb: true
57
+ _use_doc_masking: false
58
+ _use_qkv_packed: true
59
+ attention_bias: false
60
+ bos_token_id: 128000
61
+ eos_token_id: 128001
62
+ flex_attention_mask: null
63
+ hidden_act: silu
64
+ hidden_size: 2048
65
+ initializer_range: 0.02
66
+ intermediate_size: 8192
67
+ is_qwen2_config: true
68
+ max_position_embeddings: 4096
69
+ moe_config: null
70
+ num_attention_heads: 32
71
+ num_hidden_layers: 16
72
+ num_key_value_heads: 8
73
+ pad_token_id: null
74
+ pretraining_tp: 1
75
+ rms_norm_eps: 1.0e-05
76
+ rope_interleaved: false
77
+ rope_scaling: null
78
+ rope_theta: 50000.0
79
+ sliding_window_size: null
80
+ tie_word_embeddings: true
81
+ use_cache: true
82
+ vocab_size: 128256
83
+ no_rope_layer: null
84
+ optimizer:
85
+ accumulate_grad_in_fp32: true
86
+ clip_grad: 1.0
87
+ learning_rate_scheduler:
88
+ learning_rate: 0.0005
89
+ lr_decay_starting_step: 2000
90
+ lr_decay_steps: 28000
91
+ lr_decay_style: cosine
92
+ lr_warmup_steps: 2000
93
+ lr_warmup_style: linear
94
+ min_decay_lr: 5.0e-05
95
+ optimizer_factory:
96
+ adam_beta1: 0.9
97
+ adam_beta2: 0.95
98
+ adam_eps: 1.0e-08
99
+ name: adamW
100
+ torch_adam_is_fused: true
101
+ weight_decay: 0.1
102
+ weight_decay_exclude_named_params: null
103
+ zero_stage: 0
104
+ parallelism:
105
+ context_parallel_size: 1
106
+ dp: 8
107
+ expert_parallel_size: 1
108
+ moe_layer_recompute: false
109
+ pp: 1
110
+ pp_engine: 1f1b
111
+ recompute_layer: false
112
+ tp: 1
113
+ tp_linear_async_communication: true
114
+ tp_mode: REDUCE_SCATTER
115
+ tp_recompute_allgather: true
116
+ profiler: null
117
+ s3_upload:
118
+ remove_after_upload: true
119
+ s5cmd_concurrency: 5
120
+ s5cmd_numworkers: 16
121
+ s5cmd_path: /fsx/loubna/.venv-2-6-cu124/bin/s5cmd
122
+ upload_s3_path: s3://smollm3/blogpost-ablations/baseline
123
+ tokenizer:
124
+ tokenizer_max_length: 4096
125
+ tokenizer_name_or_path: HuggingFaceTB/SmolLM3-3B
126
+ tokenizer_revision: null
127
+ metrics_logging:
128
+ log_level: 1
129
+ log_detail_interval: 100
130
+ tokens:
131
+ batch_accumulation_per_replica: 16
132
+ limit_test_batches: 0
133
+ limit_val_batches: 0
134
+ micro_batch_size: 3 # 1.5M tokens
135
+ sequence_length: 4096
136
+ train_steps: 30000 # 30B tokens
137
+ val_check_interval: 100
138
+ lighteval:
139
+ slurm_script_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/launch-config" # Default path for launch scripts
140
+ logs_path: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/logs" # Default path for evaluation logs
141
+ local_checkpoint_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/evals-ckpt" # Default path for temporary checkpoint storage. Will store under {local_checkpoint_dir}/{run_name}/{step}
142
+ nanotron_path: "/fsx/loubna/projects_v2/smollm3/nanotron"
143
+ output_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/results"
144
+ s3_save_path: "s3://smollm3/blogpost-evals"
145
+ upload_to_wandb: true
146
+ wandb_project: smollm3-blog-evals
147
+ wandb_entity: huggingface
148
+ parallelism:
149
+ dp: 8
150
+ pp: 1
151
+ tp: 1
152
+ tp_linear_async_communication: true
153
+ batch_size: 2 # Optional batch size for evaluation
154
+ eval_config_override: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_configs/ablations_blog.yaml" # The evaluation config file to use
155
+ eval_interval: 1000
156
+ eval_interval_file: null
157
+ slurm:
158
+ gpus_per_node: 8
159
+ partition: "hopper-prod"
160
+ hf_cache: "/fsx/loubna/.cache/huggingface"
161
+ cpus_per_task: 88
162
+ qos: "normal"
163
+ time: "01:59:00"
164
+ reservation: null
learning_rate/lr_very_high.yaml ADDED
@@ -0,0 +1,164 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ checkpoints:
2
+ checkpoint_interval: 1000
3
+ checkpoints_path: /scratch/loubna/checkpoints
4
+ checkpoints_path_is_shared_file_system: false
5
+ load_lr_scheduler: true
6
+ load_optimizer: true
7
+ resume_checkpoint_path: null
8
+ save_final_state: true
9
+ save_initial_state: false
10
+ data_stages:
11
+ - data:
12
+ dataset:
13
+ dataset_read_path:
14
+ - /fsx/loubna/projects_v2/data/blog/fineweb-edu
15
+ - /fsx/loubna/projects_v2/data/blog/finemath-3plus
16
+ - /fsx/loubna/projects_v2/data/blog/stack-edu-python
17
+ dataset_folder:
18
+ - s3://smollm3/datasets/llama_tokenized-global-chunks/fineweb-edu/fineweb-edu/
19
+ - s3://smollm3/datasets/llama_tokenized-individual-chunks/finemath/
20
+ - s3://smollm3/datasets/llama_tokenized-individual-chunks/stack-edu-Python/
21
+ dataset_weights:
22
+ - 0.7
23
+ - 0.1
24
+ - 0.2
25
+ pad_samples_to_global_batch_size: false
26
+ return_positions: true
27
+ token_size_in_bytes: 4
28
+ tokenizer_name: HuggingFaceTB/SmolLM3-3B
29
+ use_old_brrr_dataloader: false
30
+ vocab_size: 128256
31
+ num_loading_workers: 0
32
+ seed: 6
33
+ name: stable
34
+ start_training_step: 1
35
+ general:
36
+ benchmark_csv_path: null
37
+ consumed_train_samples: null
38
+ ignore_sanity_checks: true
39
+ project: smollm3-blog
40
+ run: baseline-lr-5e-2
41
+ seed: 6
42
+ step: null
43
+ logging:
44
+ iteration_step_info_interval: 1
45
+ log_level: info
46
+ log_level_replica: info
47
+ model:
48
+ ddp_bucket_cap_mb: 50
49
+ dtype: bfloat16
50
+ init_method:
51
+ std: 0.02
52
+ make_vocab_size_divisible_by: 1
53
+ model_config:
54
+ _attn_implementation: flash_attention_2
55
+ _fused_rms_norm: true
56
+ _fused_rotary_emb: true
57
+ _use_doc_masking: false
58
+ _use_qkv_packed: true
59
+ attention_bias: false
60
+ bos_token_id: 128000
61
+ eos_token_id: 128001
62
+ flex_attention_mask: null
63
+ hidden_act: silu
64
+ hidden_size: 2048
65
+ initializer_range: 0.02
66
+ intermediate_size: 8192
67
+ is_qwen2_config: true
68
+ max_position_embeddings: 4096
69
+ moe_config: null
70
+ num_attention_heads: 32
71
+ num_hidden_layers: 16
72
+ num_key_value_heads: 8
73
+ pad_token_id: null
74
+ pretraining_tp: 1
75
+ rms_norm_eps: 1.0e-05
76
+ rope_interleaved: false
77
+ rope_scaling: null
78
+ rope_theta: 50000.0
79
+ sliding_window_size: null
80
+ tie_word_embeddings: true
81
+ use_cache: true
82
+ vocab_size: 128256
83
+ no_rope_layer: null
84
+ optimizer:
85
+ accumulate_grad_in_fp32: true
86
+ clip_grad: 1.0
87
+ learning_rate_scheduler:
88
+ learning_rate: 0.05
89
+ lr_decay_starting_step: 2000
90
+ lr_decay_steps: 28000
91
+ lr_decay_style: cosine
92
+ lr_warmup_steps: 2000
93
+ lr_warmup_style: linear
94
+ min_decay_lr: 5.0e-05
95
+ optimizer_factory:
96
+ adam_beta1: 0.9
97
+ adam_beta2: 0.95
98
+ adam_eps: 1.0e-08
99
+ name: adamW
100
+ torch_adam_is_fused: true
101
+ weight_decay: 0.1
102
+ weight_decay_exclude_named_params: null
103
+ zero_stage: 0
104
+ parallelism:
105
+ context_parallel_size: 1
106
+ dp: 8
107
+ expert_parallel_size: 1
108
+ moe_layer_recompute: false
109
+ pp: 1
110
+ pp_engine: 1f1b
111
+ recompute_layer: false
112
+ tp: 1
113
+ tp_linear_async_communication: true
114
+ tp_mode: REDUCE_SCATTER
115
+ tp_recompute_allgather: true
116
+ profiler: null
117
+ s3_upload:
118
+ remove_after_upload: true
119
+ s5cmd_concurrency: 5
120
+ s5cmd_numworkers: 16
121
+ s5cmd_path: /fsx/loubna/.venv-2-6-cu124/bin/s5cmd
122
+ upload_s3_path: s3://smollm3/blogpost-ablations/baseline-lr-5e-2
123
+ tokenizer:
124
+ tokenizer_max_length: 4096
125
+ tokenizer_name_or_path: HuggingFaceTB/SmolLM3-3B
126
+ tokenizer_revision: null
127
+ metrics_logging:
128
+ log_level: 1
129
+ log_detail_interval: 100
130
+ tokens:
131
+ batch_accumulation_per_replica: 16
132
+ limit_test_batches: 0
133
+ limit_val_batches: 0
134
+ micro_batch_size: 3 # 1.5M tokens
135
+ sequence_length: 4096
136
+ train_steps: 30000 # 30B tokens
137
+ val_check_interval: 100
138
+ lighteval:
139
+ slurm_script_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/launch-config" # Default path for launch scripts
140
+ logs_path: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/logs" # Default path for evaluation logs
141
+ local_checkpoint_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/evals-ckpt" # Default path for temporary checkpoint storage. Will store under {local_checkpoint_dir}/{run_name}/{step}
142
+ nanotron_path: "/fsx/loubna/projects_v2/smollm3/nanotron"
143
+ output_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/results"
144
+ s3_save_path: "s3://smollm3/blogpost-evals"
145
+ upload_to_wandb: true
146
+ wandb_project: smollm3-blog-evals
147
+ wandb_entity: huggingface
148
+ parallelism:
149
+ dp: 8
150
+ pp: 1
151
+ tp: 1
152
+ tp_linear_async_communication: true
153
+ batch_size: 1 # Optional batch size for evaluation
154
+ eval_config_override: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_configs/ablations_blog.yaml" # The evaluation config file to use
155
+ eval_interval: 1000
156
+ eval_interval_file: null
157
+ slurm:
158
+ gpus_per_node: 8
159
+ partition: "hopper-prod"
160
+ hf_cache: "/fsx/loubna/.cache/huggingface"
161
+ cpus_per_task: 88
162
+ qos: "normal"
163
+ time: "01:59:00"
164
+ reservation: null
learning_rate/wsd_10p.yaml ADDED
@@ -0,0 +1,166 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ checkpoints:
2
+ checkpoint_interval: 1000
3
+ checkpoints_path: /scratch/loubna/checkpoints
4
+ checkpoints_path_is_shared_file_system: false
5
+ load_lr_scheduler: true
6
+ load_optimizer: true
7
+ resume_checkpoint_path: null
8
+ save_final_state: true
9
+ save_initial_state: false
10
+ data_stages:
11
+ - data:
12
+ dataset:
13
+ dataset_read_path:
14
+ - /fsx/loubna/projects_v2/data/blog/fineweb-edu
15
+ - /fsx/loubna/projects_v2/data/blog/finemath-3plus
16
+ - /fsx/loubna/projects_v2/data/blog/stack-edu-python
17
+ dataset_folder:
18
+ - s3://smollm3/datasets/llama_tokenized-global-chunks/fineweb-edu/fineweb-edu/
19
+ - s3://smollm3/datasets/llama_tokenized-individual-chunks/finemath/
20
+ - s3://smollm3/datasets/llama_tokenized-individual-chunks/stack-edu-Python/
21
+ dataset_weights:
22
+ - 0.7
23
+ - 0.1
24
+ - 0.2
25
+ pad_samples_to_global_batch_size: false
26
+ return_positions: true
27
+ token_size_in_bytes: 4
28
+ tokenizer_name: HuggingFaceTB/SmolLM3-3B
29
+ use_old_brrr_dataloader: false
30
+ vocab_size: 128256
31
+ num_loading_workers: 0
32
+ seed: 6
33
+ name: stable
34
+ start_training_step: 1
35
+ general:
36
+ benchmark_csv_path: null
37
+ consumed_train_samples: null
38
+ ignore_sanity_checks: true
39
+ project: smollm3-blog
40
+ run: baseline-wsd-10p
41
+ seed: 6
42
+ step: null
43
+ logging:
44
+ iteration_step_info_interval: 1
45
+ log_level: info
46
+ log_level_replica: info
47
+ model:
48
+ ddp_bucket_cap_mb: 50
49
+ dtype: bfloat16
50
+ init_method:
51
+ std: 0.02
52
+ make_vocab_size_divisible_by: 1
53
+ model_config:
54
+ _attn_implementation: flash_attention_2
55
+ _fused_rms_norm: true
56
+ _fused_rotary_emb: true
57
+ _use_doc_masking: false
58
+ _use_qkv_packed: true
59
+ attention_bias: false
60
+ bos_token_id: 128000
61
+ eos_token_id: 128001
62
+ flex_attention_mask: null
63
+ hidden_act: silu
64
+ hidden_size: 2048
65
+ initializer_range: 0.02
66
+ intermediate_size: 8192
67
+ is_qwen2_config: true
68
+ max_position_embeddings: 4096
69
+ moe_config: null
70
+ num_attention_heads: 32
71
+ num_hidden_layers: 16
72
+ num_key_value_heads: 8
73
+ pad_token_id: null
74
+ pretraining_tp: 1
75
+ rms_norm_eps: 1.0e-05
76
+ rope_interleaved: false
77
+ rope_scaling: null
78
+ rope_theta: 50000.0
79
+ sliding_window_size: null
80
+ tie_word_embeddings: true
81
+ use_cache: true
82
+ vocab_size: 128256
83
+ # z_loss_coefficient: 1.0e-05
84
+ # z_loss_enabled: false
85
+ no_rope_layer: null
86
+ optimizer:
87
+ accumulate_grad_in_fp32: true
88
+ clip_grad: 1.0
89
+ learning_rate_scheduler:
90
+ learning_rate: 0.0005
91
+ lr_decay_starting_step: 27000
92
+ lr_decay_steps: 3000 # 10% decay
93
+ lr_decay_style: linear
94
+ lr_warmup_steps: 2000
95
+ lr_warmup_style: linear
96
+ min_decay_lr: 0
97
+ optimizer_factory:
98
+ adam_beta1: 0.9
99
+ adam_beta2: 0.95
100
+ adam_eps: 1.0e-08
101
+ name: adamW
102
+ torch_adam_is_fused: true
103
+ weight_decay: 0.1
104
+ weight_decay_exclude_named_params: null
105
+ zero_stage: 0
106
+ parallelism:
107
+ context_parallel_size: 1
108
+ dp: 8
109
+ expert_parallel_size: 1
110
+ moe_layer_recompute: false
111
+ pp: 1
112
+ pp_engine: 1f1b
113
+ recompute_layer: false
114
+ tp: 1
115
+ tp_linear_async_communication: true
116
+ tp_mode: REDUCE_SCATTER
117
+ tp_recompute_allgather: true
118
+ profiler: null
119
+ s3_upload:
120
+ remove_after_upload: true
121
+ s5cmd_concurrency: 5
122
+ s5cmd_numworkers: 16
123
+ s5cmd_path: /fsx/loubna/.venv-2-6-cu124/bin/s5cmd
124
+ upload_s3_path: s3://smollm3/blogpost-ablations/baseline-wsd-10p
125
+ tokenizer:
126
+ tokenizer_max_length: 4096
127
+ tokenizer_name_or_path: HuggingFaceTB/SmolLM3-3B
128
+ tokenizer_revision: null
129
+ metrics_logging:
130
+ log_level: 1
131
+ log_detail_interval: 100
132
+ tokens:
133
+ batch_accumulation_per_replica: 16
134
+ limit_test_batches: 0
135
+ limit_val_batches: 0
136
+ micro_batch_size: 3 # 1.5M tokens
137
+ sequence_length: 4096
138
+ train_steps: 30000 # 30B tokens
139
+ val_check_interval: 100
140
+ lighteval:
141
+ slurm_script_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/launch-config" # Default path for launch scripts
142
+ logs_path: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/logs" # Default path for evaluation logs
143
+ local_checkpoint_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/evals-ckpt" # Default path for temporary checkpoint storage. Will store under {local_checkpoint_dir}/{run_name}/{step}
144
+ nanotron_path: "/fsx/loubna/projects_v2/smollm3/nanotron"
145
+ output_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/results"
146
+ s3_save_path: "s3://smollm3/blogpost-evals"
147
+ upload_to_wandb: true
148
+ wandb_project: smollm3-blog-evals
149
+ wandb_entity: huggingface
150
+ parallelism:
151
+ dp: 8
152
+ pp: 1
153
+ tp: 1
154
+ tp_linear_async_communication: true
155
+ batch_size: 1 # Optional batch size for evaluation
156
+ eval_config_override: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_configs/ablations_blog.yaml" # The evaluation config file to use
157
+ eval_interval: 1000
158
+ eval_interval_file: null
159
+ slurm:
160
+ gpus_per_node: 8
161
+ partition: "hopper-prod"
162
+ hf_cache: "/fsx/loubna/.cache/huggingface"
163
+ cpus_per_task: 88
164
+ qos: "normal"
165
+ time: "01:59:00"
166
+ reservation: null
learning_rate/wsd_20p.yaml ADDED
@@ -0,0 +1,166 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ checkpoints:
2
+ checkpoint_interval: 1000
3
+ checkpoints_path: /scratch/loubna/checkpoints
4
+ checkpoints_path_is_shared_file_system: false
5
+ load_lr_scheduler: true
6
+ load_optimizer: true
7
+ resume_checkpoint_path: null
8
+ save_final_state: true
9
+ save_initial_state: false
10
+ data_stages:
11
+ - data:
12
+ dataset:
13
+ dataset_read_path:
14
+ - /fsx/loubna/projects_v2/data/blog/fineweb-edu
15
+ - /fsx/loubna/projects_v2/data/blog/finemath-3plus
16
+ - /fsx/loubna/projects_v2/data/blog/stack-edu-python
17
+ dataset_folder:
18
+ - s3://smollm3/datasets/llama_tokenized-global-chunks/fineweb-edu/fineweb-edu/
19
+ - s3://smollm3/datasets/llama_tokenized-individual-chunks/finemath/
20
+ - s3://smollm3/datasets/llama_tokenized-individual-chunks/stack-edu-Python/
21
+ dataset_weights:
22
+ - 0.7
23
+ - 0.1
24
+ - 0.2
25
+ pad_samples_to_global_batch_size: false
26
+ return_positions: true
27
+ token_size_in_bytes: 4
28
+ tokenizer_name: HuggingFaceTB/SmolLM3-3B
29
+ use_old_brrr_dataloader: false
30
+ vocab_size: 128256
31
+ num_loading_workers: 0
32
+ seed: 6
33
+ name: stable
34
+ start_training_step: 1
35
+ general:
36
+ benchmark_csv_path: null
37
+ consumed_train_samples: null
38
+ ignore_sanity_checks: true
39
+ project: smollm3-blog
40
+ run: baseline-wsd-20p
41
+ seed: 6
42
+ step: null
43
+ logging:
44
+ iteration_step_info_interval: 1
45
+ log_level: info
46
+ log_level_replica: info
47
+ model:
48
+ ddp_bucket_cap_mb: 50
49
+ dtype: bfloat16
50
+ init_method:
51
+ std: 0.02
52
+ make_vocab_size_divisible_by: 1
53
+ model_config:
54
+ _attn_implementation: flash_attention_2
55
+ _fused_rms_norm: true
56
+ _fused_rotary_emb: true
57
+ _use_doc_masking: false
58
+ _use_qkv_packed: true
59
+ attention_bias: false
60
+ bos_token_id: 128000
61
+ eos_token_id: 128001
62
+ flex_attention_mask: null
63
+ hidden_act: silu
64
+ hidden_size: 2048
65
+ initializer_range: 0.02
66
+ intermediate_size: 8192
67
+ is_qwen2_config: true
68
+ max_position_embeddings: 4096
69
+ moe_config: null
70
+ num_attention_heads: 32
71
+ num_hidden_layers: 16
72
+ num_key_value_heads: 8
73
+ pad_token_id: null
74
+ pretraining_tp: 1
75
+ rms_norm_eps: 1.0e-05
76
+ rope_interleaved: false
77
+ rope_scaling: null
78
+ rope_theta: 50000.0
79
+ sliding_window_size: null
80
+ tie_word_embeddings: true
81
+ use_cache: true
82
+ vocab_size: 128256
83
+ # z_loss_coefficient: 1.0e-05
84
+ # z_loss_enabled: false
85
+ no_rope_layer: null
86
+ optimizer:
87
+ accumulate_grad_in_fp32: true
88
+ clip_grad: 1.0
89
+ learning_rate_scheduler:
90
+ learning_rate: 0.0005
91
+ lr_decay_starting_step: 24000
92
+ lr_decay_steps: 6000 # 20% decay
93
+ lr_decay_style: linear
94
+ lr_warmup_steps: 2000
95
+ lr_warmup_style: linear
96
+ min_decay_lr: 0
97
+ optimizer_factory:
98
+ adam_beta1: 0.9
99
+ adam_beta2: 0.95
100
+ adam_eps: 1.0e-08
101
+ name: adamW
102
+ torch_adam_is_fused: true
103
+ weight_decay: 0.1
104
+ weight_decay_exclude_named_params: null
105
+ zero_stage: 0
106
+ parallelism:
107
+ context_parallel_size: 1
108
+ dp: 8
109
+ expert_parallel_size: 1
110
+ moe_layer_recompute: false
111
+ pp: 1
112
+ pp_engine: 1f1b
113
+ recompute_layer: false
114
+ tp: 1
115
+ tp_linear_async_communication: true
116
+ tp_mode: REDUCE_SCATTER
117
+ tp_recompute_allgather: true
118
+ profiler: null
119
+ s3_upload:
120
+ remove_after_upload: true
121
+ s5cmd_concurrency: 5
122
+ s5cmd_numworkers: 16
123
+ s5cmd_path: /fsx/loubna/.venv-2-6-cu124/bin/s5cmd
124
+ upload_s3_path: s3://smollm3/blogpost-ablations/baseline-wsd-20p
125
+ tokenizer:
126
+ tokenizer_max_length: 4096
127
+ tokenizer_name_or_path: HuggingFaceTB/SmolLM3-3B
128
+ tokenizer_revision: null
129
+ metrics_logging:
130
+ log_level: 1
131
+ log_detail_interval: 100
132
+ tokens:
133
+ batch_accumulation_per_replica: 16
134
+ limit_test_batches: 0
135
+ limit_val_batches: 0
136
+ micro_batch_size: 3 # 1.5M tokens
137
+ sequence_length: 4096
138
+ train_steps: 30000 # 30B tokens
139
+ val_check_interval: 100
140
+ lighteval:
141
+ slurm_script_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/launch-config" # Default path for launch scripts
142
+ logs_path: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/logs" # Default path for evaluation logs
143
+ local_checkpoint_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/evals-ckpt" # Default path for temporary checkpoint storage. Will store under {local_checkpoint_dir}/{run_name}/{step}
144
+ nanotron_path: "/fsx/loubna/projects_v2/smollm3/nanotron"
145
+ output_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/results"
146
+ s3_save_path: "s3://smollm3/blogpost-evals"
147
+ upload_to_wandb: true
148
+ wandb_project: smollm3-blog-evals
149
+ wandb_entity: huggingface
150
+ parallelism:
151
+ dp: 8
152
+ pp: 1
153
+ tp: 1
154
+ tp_linear_async_communication: true
155
+ batch_size: 1 # Optional batch size for evaluation
156
+ eval_config_override: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_configs/ablations_blog.yaml" # The evaluation config file to use
157
+ eval_interval: 1000
158
+ eval_interval_file: null
159
+ slurm:
160
+ gpus_per_node: 8
161
+ partition: "hopper-prod"
162
+ hf_cache: "/fsx/loubna/.cache/huggingface"
163
+ cpus_per_task: 88
164
+ qos: "normal"
165
+ time: "01:59:00"
166
+ reservation: null
nope/nope.yaml ADDED
@@ -0,0 +1,164 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ checkpoints:
2
+ checkpoint_interval: 1000
3
+ checkpoints_path: /scratch/loubna/checkpoints
4
+ checkpoints_path_is_shared_file_system: false
5
+ load_lr_scheduler: true
6
+ load_optimizer: true
7
+ resume_checkpoint_path: null
8
+ save_final_state: true
9
+ save_initial_state: false
10
+ data_stages:
11
+ - data:
12
+ dataset:
13
+ dataset_read_path:
14
+ - /fsx/loubna/projects_v2/data/blog/fineweb-edu
15
+ - /fsx/loubna/projects_v2/data/blog/finemath-3plus
16
+ - /fsx/loubna/projects_v2/data/blog/stack-edu-python
17
+ dataset_folder:
18
+ - s3://smollm3/datasets/llama_tokenized-global-chunks/fineweb-edu/fineweb-edu/
19
+ - s3://smollm3/datasets/llama_tokenized-individual-chunks/finemath/
20
+ - s3://smollm3/datasets/llama_tokenized-individual-chunks/stack-edu-Python/
21
+ dataset_weights:
22
+ - 0.7
23
+ - 0.1
24
+ - 0.2
25
+ pad_samples_to_global_batch_size: false
26
+ return_positions: true
27
+ token_size_in_bytes: 4
28
+ tokenizer_name: HuggingFaceTB/SmolLM3-3B
29
+ use_old_brrr_dataloader: false
30
+ vocab_size: 128256
31
+ num_loading_workers: 0
32
+ seed: 6
33
+ name: stable
34
+ start_training_step: 1
35
+ general:
36
+ benchmark_csv_path: null
37
+ consumed_train_samples: null
38
+ ignore_sanity_checks: true
39
+ project: smollm3-blog
40
+ run: baseline-nope
41
+ seed: 6
42
+ step: null
43
+ logging:
44
+ iteration_step_info_interval: 1
45
+ log_level: info
46
+ log_level_replica: info
47
+ model:
48
+ ddp_bucket_cap_mb: 50
49
+ dtype: bfloat16
50
+ init_method:
51
+ std: 0.02
52
+ make_vocab_size_divisible_by: 1
53
+ model_config:
54
+ _attn_implementation: flash_attention_2
55
+ _fused_rms_norm: true
56
+ _fused_rotary_emb: true
57
+ _use_doc_masking: false
58
+ _use_qkv_packed: true
59
+ attention_bias: false
60
+ bos_token_id: 128000
61
+ eos_token_id: 128001
62
+ flex_attention_mask: null
63
+ hidden_act: silu
64
+ hidden_size: 2048
65
+ initializer_range: 0.02
66
+ intermediate_size: 8192
67
+ is_qwen2_config: true
68
+ max_position_embeddings: 4096
69
+ moe_config: null
70
+ num_attention_heads: 32
71
+ num_hidden_layers: 16
72
+ num_key_value_heads: 8
73
+ pad_token_id: null
74
+ pretraining_tp: 1
75
+ rms_norm_eps: 1.0e-05
76
+ rope_interleaved: false
77
+ rope_scaling: null
78
+ rope_theta: 50000.0
79
+ sliding_window_size: null
80
+ tie_word_embeddings: true
81
+ use_cache: true
82
+ vocab_size: 128256
83
+ no_rope_layer: 4
84
+ optimizer:
85
+ accumulate_grad_in_fp32: true
86
+ clip_grad: 1.0
87
+ learning_rate_scheduler:
88
+ learning_rate: 0.0005
89
+ lr_decay_starting_step: 2000
90
+ lr_decay_steps: 28000
91
+ lr_decay_style: cosine
92
+ lr_warmup_steps: 2000
93
+ lr_warmup_style: linear
94
+ min_decay_lr: 5.0e-05
95
+ optimizer_factory:
96
+ adam_beta1: 0.9
97
+ adam_beta2: 0.95
98
+ adam_eps: 1.0e-08
99
+ name: adamW
100
+ torch_adam_is_fused: true
101
+ weight_decay: 0.1
102
+ weight_decay_exclude_named_params: null
103
+ zero_stage: 0
104
+ parallelism:
105
+ context_parallel_size: 1
106
+ dp: 16
107
+ expert_parallel_size: 1
108
+ moe_layer_recompute: false
109
+ pp: 1
110
+ pp_engine: 1f1b
111
+ recompute_layer: false
112
+ tp: 1
113
+ tp_linear_async_communication: true
114
+ tp_mode: REDUCE_SCATTER
115
+ tp_recompute_allgather: true
116
+ profiler: null
117
+ s3_upload:
118
+ remove_after_upload: true
119
+ s5cmd_concurrency: 5
120
+ s5cmd_numworkers: 16
121
+ s5cmd_path: /fsx/loubna/.venv-2-6-cu124/bin/s5cmd
122
+ upload_s3_path: s3://smollm3/blogpost-ablations/baseline-nope
123
+ tokenizer:
124
+ tokenizer_max_length: 4096
125
+ tokenizer_name_or_path: HuggingFaceTB/SmolLM3-3B
126
+ tokenizer_revision: null
127
+ metrics_logging:
128
+ log_level: 1
129
+ log_detail_interval: 100
130
+ tokens:
131
+ batch_accumulation_per_replica: 8
132
+ limit_test_batches: 0
133
+ limit_val_batches: 0
134
+ micro_batch_size: 3 # 1.5M tokens
135
+ sequence_length: 4096
136
+ train_steps: 30000 # 30B tokens
137
+ val_check_interval: 100
138
+ lighteval:
139
+ slurm_script_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/launch-config" # Default path for launch scripts
140
+ logs_path: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/logs" # Default path for evaluation logs
141
+ local_checkpoint_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/evals-ckpt" # Default path for temporary checkpoint storage. Will store under {local_checkpoint_dir}/{run_name}/{step}
142
+ nanotron_path: "/fsx/loubna/projects_v2/smollm3/nanotron"
143
+ output_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/results"
144
+ s3_save_path: "s3://smollm3/blogpost-evals"
145
+ upload_to_wandb: true
146
+ wandb_project: smollm3-blog-evals
147
+ wandb_entity: loubnabnl
148
+ parallelism:
149
+ dp: 8
150
+ pp: 1
151
+ tp: 1
152
+ tp_linear_async_communication: true
153
+ batch_size: 1 # Optional batch size for evaluation
154
+ eval_config_override: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_configs/ablations_blog.yaml" # The evaluation config file to use
155
+ eval_interval: 1000
156
+ eval_interval_file: null
157
+ slurm:
158
+ gpus_per_node: 8
159
+ partition: "hopper-prod"
160
+ hf_cache: "/fsx/loubna/.cache/huggingface"
161
+ cpus_per_task: 88
162
+ qos: "normal"
163
+ time: "01:59:00"
164
+ reservation: null
nope/nope_doc_mask.yaml ADDED
@@ -0,0 +1,164 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ checkpoints:
2
+ checkpoint_interval: 1000
3
+ checkpoints_path: /scratch/loubna/checkpoints
4
+ checkpoints_path_is_shared_file_system: false
5
+ load_lr_scheduler: true
6
+ load_optimizer: true
7
+ resume_checkpoint_path: null
8
+ save_final_state: true
9
+ save_initial_state: false
10
+ data_stages:
11
+ - data:
12
+ dataset:
13
+ dataset_read_path:
14
+ - /fsx/loubna/projects_v2/data/blog/fineweb-edu
15
+ - /fsx/loubna/projects_v2/data/blog/finemath-3plus
16
+ - /fsx/loubna/projects_v2/data/blog/stack-edu-python
17
+ dataset_folder:
18
+ - s3://smollm3/datasets/llama_tokenized-global-chunks/fineweb-edu/fineweb-edu/
19
+ - s3://smollm3/datasets/llama_tokenized-individual-chunks/finemath/
20
+ - s3://smollm3/datasets/llama_tokenized-individual-chunks/stack-edu-Python/
21
+ dataset_weights:
22
+ - 0.7
23
+ - 0.1
24
+ - 0.2
25
+ pad_samples_to_global_batch_size: false
26
+ return_positions: true
27
+ token_size_in_bytes: 4
28
+ tokenizer_name: HuggingFaceTB/SmolLM3-3B
29
+ use_old_brrr_dataloader: false
30
+ vocab_size: 128256
31
+ num_loading_workers: 0
32
+ seed: 6
33
+ name: stable
34
+ start_training_step: 1
35
+ general:
36
+ benchmark_csv_path: null
37
+ consumed_train_samples: null
38
+ ignore_sanity_checks: true
39
+ project: smollm3-blog
40
+ run: baseline-nope-doc-mask
41
+ seed: 6
42
+ step: null
43
+ logging:
44
+ iteration_step_info_interval: 1
45
+ log_level: info
46
+ log_level_replica: info
47
+ model:
48
+ ddp_bucket_cap_mb: 50
49
+ dtype: bfloat16
50
+ init_method:
51
+ std: 0.02
52
+ make_vocab_size_divisible_by: 1
53
+ model_config:
54
+ _attn_implementation: flash_attention_2
55
+ _fused_rms_norm: true
56
+ _fused_rotary_emb: true
57
+ _use_doc_masking: true
58
+ _use_qkv_packed: true
59
+ attention_bias: false
60
+ bos_token_id: 128000
61
+ eos_token_id: 128001
62
+ flex_attention_mask: null
63
+ hidden_act: silu
64
+ hidden_size: 2048
65
+ initializer_range: 0.02
66
+ intermediate_size: 8192
67
+ is_qwen2_config: true
68
+ max_position_embeddings: 4096
69
+ moe_config: null
70
+ num_attention_heads: 32
71
+ num_hidden_layers: 16
72
+ num_key_value_heads: 8
73
+ pad_token_id: null
74
+ pretraining_tp: 1
75
+ rms_norm_eps: 1.0e-05
76
+ rope_interleaved: false
77
+ rope_scaling: null
78
+ rope_theta: 50000.0
79
+ sliding_window_size: null
80
+ tie_word_embeddings: true
81
+ use_cache: true
82
+ vocab_size: 128256
83
+ no_rope_layer: 4
84
+ optimizer:
85
+ accumulate_grad_in_fp32: true
86
+ clip_grad: 1.0
87
+ learning_rate_scheduler:
88
+ learning_rate: 0.0005
89
+ lr_decay_starting_step: 2000
90
+ lr_decay_steps: 28000
91
+ lr_decay_style: cosine
92
+ lr_warmup_steps: 2000
93
+ lr_warmup_style: linear
94
+ min_decay_lr: 5.0e-05
95
+ optimizer_factory:
96
+ adam_beta1: 0.9
97
+ adam_beta2: 0.95
98
+ adam_eps: 1.0e-08
99
+ name: adamW
100
+ torch_adam_is_fused: true
101
+ weight_decay: 0.1
102
+ weight_decay_exclude_named_params: null
103
+ zero_stage: 0
104
+ parallelism:
105
+ context_parallel_size: 1
106
+ dp: 16
107
+ expert_parallel_size: 1
108
+ moe_layer_recompute: false
109
+ pp: 1
110
+ pp_engine: 1f1b
111
+ recompute_layer: false
112
+ tp: 1
113
+ tp_linear_async_communication: true
114
+ tp_mode: REDUCE_SCATTER
115
+ tp_recompute_allgather: true
116
+ profiler: null
117
+ s3_upload:
118
+ remove_after_upload: true
119
+ s5cmd_concurrency: 5
120
+ s5cmd_numworkers: 16
121
+ s5cmd_path: /fsx/loubna/.venv-2-6-cu124/bin/s5cmd
122
+ upload_s3_path: s3://smollm3/blogpost-ablations/baseline-nope-doc-mask
123
+ tokenizer:
124
+ tokenizer_max_length: 4096
125
+ tokenizer_name_or_path: HuggingFaceTB/SmolLM3-3B
126
+ tokenizer_revision: null
127
+ metrics_logging:
128
+ log_level: 1
129
+ log_detail_interval: 100
130
+ tokens:
131
+ batch_accumulation_per_replica: 8
132
+ limit_test_batches: 0
133
+ limit_val_batches: 0
134
+ micro_batch_size: 3 # 1.5M tokens
135
+ sequence_length: 4096
136
+ train_steps: 30000 # 30B tokens
137
+ val_check_interval: 100
138
+ lighteval:
139
+ slurm_script_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/launch-config" # Default path for launch scripts
140
+ logs_path: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/logs" # Default path for evaluation logs
141
+ local_checkpoint_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/evals-ckpt" # Default path for temporary checkpoint storage. Will store under {local_checkpoint_dir}/{run_name}/{step}
142
+ nanotron_path: "/fsx/loubna/projects_v2/smollm3/nanotron"
143
+ output_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/results"
144
+ s3_save_path: "s3://smollm3/blogpost-evals"
145
+ upload_to_wandb: true
146
+ wandb_project: smollm3-blog-evals
147
+ wandb_entity: loubnabnl
148
+ parallelism:
149
+ dp: 8
150
+ pp: 1
151
+ tp: 1
152
+ tp_linear_async_communication: true
153
+ batch_size: 1 # Optional batch size for evaluation
154
+ eval_config_override: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_configs/ablations_blog.yaml" # The evaluation config file to use
155
+ eval_interval: 1000
156
+ eval_interval_file: null
157
+ slurm:
158
+ gpus_per_node: 8
159
+ partition: "hopper-prod"
160
+ hf_cache: "/fsx/loubna/.cache/huggingface"
161
+ cpus_per_task: 88
162
+ qos: "normal"
163
+ time: "01:59:00"
164
+ reservation: null
requirements.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ git+https://github.com/huggingface/nanotron.git@smollm3
2
+ git+https://github.com/huggingface/datatrove.git@nouamane/avoid-s3
tie_embed/baseline.yaml ADDED
@@ -0,0 +1,164 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ checkpoints:
2
+ checkpoint_interval: 1000
3
+ checkpoints_path: /scratch/loubna/checkpoints
4
+ checkpoints_path_is_shared_file_system: false
5
+ load_lr_scheduler: true
6
+ load_optimizer: true
7
+ resume_checkpoint_path: null
8
+ save_final_state: true
9
+ save_initial_state: false
10
+ data_stages:
11
+ - data:
12
+ dataset:
13
+ dataset_read_path:
14
+ - /fsx/loubna/projects_v2/data/blog/fineweb-edu
15
+ - /fsx/loubna/projects_v2/data/blog/finemath-3plus
16
+ - /fsx/loubna/projects_v2/data/blog/stack-edu-python
17
+ dataset_folder:
18
+ - s3://smollm3/datasets/llama_tokenized-global-chunks/fineweb-edu/fineweb-edu/
19
+ - s3://smollm3/datasets/llama_tokenized-individual-chunks/finemath/
20
+ - s3://smollm3/datasets/llama_tokenized-individual-chunks/stack-edu-Python/
21
+ dataset_weights:
22
+ - 0.7
23
+ - 0.1
24
+ - 0.2
25
+ pad_samples_to_global_batch_size: false
26
+ return_positions: true
27
+ token_size_in_bytes: 4
28
+ tokenizer_name: HuggingFaceTB/SmolLM3-3B
29
+ use_old_brrr_dataloader: false
30
+ vocab_size: 128256
31
+ num_loading_workers: 0
32
+ seed: 6
33
+ name: stable
34
+ start_training_step: 1
35
+ general:
36
+ benchmark_csv_path: null
37
+ consumed_train_samples: null
38
+ ignore_sanity_checks: true
39
+ project: smollm3-blog
40
+ run: baseline
41
+ seed: 6
42
+ step: null
43
+ logging:
44
+ iteration_step_info_interval: 1
45
+ log_level: info
46
+ log_level_replica: info
47
+ model:
48
+ ddp_bucket_cap_mb: 50
49
+ dtype: bfloat16
50
+ init_method:
51
+ std: 0.02
52
+ make_vocab_size_divisible_by: 1
53
+ model_config:
54
+ _attn_implementation: flash_attention_2
55
+ _fused_rms_norm: true
56
+ _fused_rotary_emb: true
57
+ _use_doc_masking: false
58
+ _use_qkv_packed: true
59
+ attention_bias: false
60
+ bos_token_id: 128000
61
+ eos_token_id: 128001
62
+ flex_attention_mask: null
63
+ hidden_act: silu
64
+ hidden_size: 2048
65
+ initializer_range: 0.02
66
+ intermediate_size: 8192
67
+ is_qwen2_config: true
68
+ max_position_embeddings: 4096
69
+ moe_config: null
70
+ num_attention_heads: 32
71
+ num_hidden_layers: 16
72
+ num_key_value_heads: 8
73
+ pad_token_id: null
74
+ pretraining_tp: 1
75
+ rms_norm_eps: 1.0e-05
76
+ rope_interleaved: false
77
+ rope_scaling: null
78
+ rope_theta: 50000.0
79
+ sliding_window_size: null
80
+ tie_word_embeddings: true
81
+ use_cache: true
82
+ vocab_size: 128256
83
+ no_rope_layer: null
84
+ optimizer:
85
+ accumulate_grad_in_fp32: true
86
+ clip_grad: 1.0
87
+ learning_rate_scheduler:
88
+ learning_rate: 0.0005
89
+ lr_decay_starting_step: 2000
90
+ lr_decay_steps: 28000
91
+ lr_decay_style: cosine
92
+ lr_warmup_steps: 2000
93
+ lr_warmup_style: linear
94
+ min_decay_lr: 5.0e-05
95
+ optimizer_factory:
96
+ adam_beta1: 0.9
97
+ adam_beta2: 0.95
98
+ adam_eps: 1.0e-08
99
+ name: adamW
100
+ torch_adam_is_fused: true
101
+ weight_decay: 0.1
102
+ weight_decay_exclude_named_params: null
103
+ zero_stage: 0
104
+ parallelism:
105
+ context_parallel_size: 1
106
+ dp: 8
107
+ expert_parallel_size: 1
108
+ moe_layer_recompute: false
109
+ pp: 1
110
+ pp_engine: 1f1b
111
+ recompute_layer: false
112
+ tp: 1
113
+ tp_linear_async_communication: true
114
+ tp_mode: REDUCE_SCATTER
115
+ tp_recompute_allgather: true
116
+ profiler: null
117
+ s3_upload:
118
+ remove_after_upload: true
119
+ s5cmd_concurrency: 5
120
+ s5cmd_numworkers: 16
121
+ s5cmd_path: /fsx/loubna/.venv-2-6-cu124/bin/s5cmd
122
+ upload_s3_path: s3://smollm3/blogpost-ablations/baseline
123
+ tokenizer:
124
+ tokenizer_max_length: 4096
125
+ tokenizer_name_or_path: HuggingFaceTB/SmolLM3-3B
126
+ tokenizer_revision: null
127
+ metrics_logging:
128
+ log_level: 1
129
+ log_detail_interval: 100
130
+ tokens:
131
+ batch_accumulation_per_replica: 16
132
+ limit_test_batches: 0
133
+ limit_val_batches: 0
134
+ micro_batch_size: 3 # 1.5M tokens
135
+ sequence_length: 4096
136
+ train_steps: 30000 # 30B tokens
137
+ val_check_interval: 100
138
+ lighteval:
139
+ slurm_script_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/launch-config" # Default path for launch scripts
140
+ logs_path: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/logs" # Default path for evaluation logs
141
+ local_checkpoint_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/evals-ckpt" # Default path for temporary checkpoint storage. Will store under {local_checkpoint_dir}/{run_name}/{step}
142
+ nanotron_path: "/fsx/loubna/projects_v2/smollm3/nanotron"
143
+ output_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/results"
144
+ s3_save_path: "s3://smollm3/blogpost-evals"
145
+ upload_to_wandb: true
146
+ wandb_project: smollm3-blog-evals
147
+ wandb_entity: huggingface
148
+ parallelism:
149
+ dp: 8
150
+ pp: 1
151
+ tp: 1
152
+ tp_linear_async_communication: true
153
+ batch_size: 1 # Optional batch size for evaluation
154
+ eval_config_override: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_configs/ablations_blog.yaml" # The evaluation config file to use
155
+ eval_interval: 1000
156
+ eval_interval_file: null
157
+ slurm:
158
+ gpus_per_node: 8
159
+ partition: "hopper-prod"
160
+ hf_cache: "/fsx/loubna/.cache/huggingface"
161
+ cpus_per_task: 88
162
+ qos: "normal"
163
+ time: "01:59:00"
164
+ reservation: null
tie_embed/no_tie_embeddings.yaml ADDED
@@ -0,0 +1,164 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ checkpoints:
2
+ checkpoint_interval: 1000
3
+ checkpoints_path: /scratch/loubna/checkpoints
4
+ checkpoints_path_is_shared_file_system: false
5
+ load_lr_scheduler: true
6
+ load_optimizer: true
7
+ resume_checkpoint_path: null
8
+ save_final_state: true
9
+ save_initial_state: false
10
+ data_stages:
11
+ - data:
12
+ dataset:
13
+ dataset_read_path:
14
+ - /fsx/loubna/projects_v2/data/blog/fineweb-edu
15
+ - /fsx/loubna/projects_v2/data/blog/finemath-3plus
16
+ - /fsx/loubna/projects_v2/data/blog/stack-edu-python
17
+ dataset_folder:
18
+ - s3://smollm3/datasets/llama_tokenized-global-chunks/fineweb-edu/fineweb-edu/
19
+ - s3://smollm3/datasets/llama_tokenized-individual-chunks/finemath/
20
+ - s3://smollm3/datasets/llama_tokenized-individual-chunks/stack-edu-Python/
21
+ dataset_weights:
22
+ - 0.7
23
+ - 0.1
24
+ - 0.2
25
+ pad_samples_to_global_batch_size: false
26
+ return_positions: true
27
+ token_size_in_bytes: 4
28
+ tokenizer_name: HuggingFaceTB/SmolLM3-3B
29
+ use_old_brrr_dataloader: false
30
+ vocab_size: 128256
31
+ num_loading_workers: 0
32
+ seed: 5
33
+ name: stable
34
+ start_training_step: 1
35
+ general:
36
+ benchmark_csv_path: null
37
+ consumed_train_samples: null
38
+ ignore_sanity_checks: true
39
+ project: smollm3-blog
40
+ run: baseline-no-tie-16l-seed5
41
+ seed: 5
42
+ step: null
43
+ logging:
44
+ iteration_step_info_interval: 1
45
+ log_level: info
46
+ log_level_replica: info
47
+ model:
48
+ ddp_bucket_cap_mb: 50
49
+ dtype: bfloat16
50
+ init_method:
51
+ std: 0.02
52
+ make_vocab_size_divisible_by: 1
53
+ model_config:
54
+ _attn_implementation: flash_attention_2
55
+ _fused_rms_norm: true
56
+ _fused_rotary_emb: true
57
+ _use_doc_masking: false
58
+ _use_qkv_packed: true
59
+ attention_bias: false
60
+ bos_token_id: 128000
61
+ eos_token_id: 128001
62
+ flex_attention_mask: null
63
+ hidden_act: silu
64
+ hidden_size: 2048
65
+ initializer_range: 0.02
66
+ intermediate_size: 8192
67
+ is_qwen2_config: true
68
+ max_position_embeddings: 4096
69
+ moe_config: null
70
+ num_attention_heads: 32
71
+ num_hidden_layers: 16
72
+ num_key_value_heads: 8
73
+ pad_token_id: null
74
+ pretraining_tp: 1
75
+ rms_norm_eps: 1.0e-05
76
+ rope_interleaved: false
77
+ rope_scaling: null
78
+ rope_theta: 50000.0
79
+ sliding_window_size: null
80
+ tie_word_embeddings: false
81
+ use_cache: true
82
+ vocab_size: 128256
83
+ no_rope_layer: null
84
+ optimizer:
85
+ accumulate_grad_in_fp32: true
86
+ clip_grad: 1.0
87
+ learning_rate_scheduler:
88
+ learning_rate: 0.0005
89
+ lr_decay_starting_step: 2000
90
+ lr_decay_steps: 28000
91
+ lr_decay_style: cosine
92
+ lr_warmup_steps: 2000
93
+ lr_warmup_style: linear
94
+ min_decay_lr: 5.0e-05
95
+ optimizer_factory:
96
+ adam_beta1: 0.9
97
+ adam_beta2: 0.95
98
+ adam_eps: 1.0e-08
99
+ name: adamW
100
+ torch_adam_is_fused: true
101
+ weight_decay: 0.1
102
+ weight_decay_exclude_named_params: null
103
+ zero_stage: 0
104
+ parallelism:
105
+ context_parallel_size: 1
106
+ dp: 16
107
+ expert_parallel_size: 1
108
+ moe_layer_recompute: false
109
+ pp: 1
110
+ pp_engine: 1f1b
111
+ recompute_layer: false
112
+ tp: 1
113
+ tp_linear_async_communication: true
114
+ tp_mode: REDUCE_SCATTER
115
+ tp_recompute_allgather: true
116
+ profiler: null
117
+ s3_upload:
118
+ remove_after_upload: true
119
+ s5cmd_concurrency: 5
120
+ s5cmd_numworkers: 16
121
+ s5cmd_path: /fsx/loubna/.venv-2-6-cu124/bin/s5cmd
122
+ upload_s3_path: s3://smollm3/blogpost-ablations/baseline-no-tie-16l-seed5
123
+ tokenizer:
124
+ tokenizer_max_length: 4096
125
+ tokenizer_name_or_path: HuggingFaceTB/SmolLM3-3B
126
+ tokenizer_revision: null
127
+ metrics_logging:
128
+ log_level: 1
129
+ log_detail_interval: 100
130
+ tokens:
131
+ batch_accumulation_per_replica: 8
132
+ limit_test_batches: 0
133
+ limit_val_batches: 0
134
+ micro_batch_size: 3 # 1.5M tokens
135
+ sequence_length: 4096
136
+ train_steps: 30000 # 30B tokens
137
+ val_check_interval: 100
138
+ lighteval:
139
+ slurm_script_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/launch-config" # Default path for launch scripts
140
+ logs_path: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/logs" # Default path for evaluation logs
141
+ local_checkpoint_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/evals-ckpt" # Default path for temporary checkpoint storage. Will store under {local_checkpoint_dir}/{run_name}/{step}
142
+ nanotron_path: "/fsx/loubna/projects_v2/smollm3/nanotron"
143
+ output_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/results"
144
+ s3_save_path: "s3://smollm3/blogpost-evals"
145
+ upload_to_wandb: true
146
+ wandb_project: smollm3-blog-evals
147
+ wandb_entity: loubnabnl
148
+ parallelism:
149
+ dp: 8
150
+ pp: 1
151
+ tp: 1
152
+ tp_linear_async_communication: true
153
+ batch_size: 1 # Optional batch size for evaluation
154
+ eval_config_override: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_configs/ablations_blog.yaml" # The evaluation config file to use
155
+ eval_interval: 1000
156
+ eval_interval_file: null
157
+ slurm:
158
+ gpus_per_node: 8
159
+ partition: "hopper-prod"
160
+ hf_cache: "/fsx/loubna/.cache/huggingface"
161
+ cpus_per_task: 88
162
+ qos: "normal"
163
+ time: "01:59:00"
164
+ reservation: null
tie_embed/notie_same_size_as_baseline.yaml ADDED
@@ -0,0 +1,164 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ checkpoints:
2
+ checkpoint_interval: 1000
3
+ checkpoints_path: /scratch/loubna/checkpoints
4
+ checkpoints_path_is_shared_file_system: false
5
+ load_lr_scheduler: true
6
+ load_optimizer: true
7
+ resume_checkpoint_path: null
8
+ save_final_state: true
9
+ save_initial_state: false
10
+ data_stages:
11
+ - data:
12
+ dataset:
13
+ dataset_read_path:
14
+ - /fsx/loubna/projects_v2/data/blog/fineweb-edu
15
+ - /fsx/loubna/projects_v2/data/blog/finemath-3plus
16
+ - /fsx/loubna/projects_v2/data/blog/stack-edu-python
17
+ dataset_folder:
18
+ - s3://smollm3/datasets/llama_tokenized-global-chunks/fineweb-edu/fineweb-edu/
19
+ - s3://smollm3/datasets/llama_tokenized-individual-chunks/finemath/
20
+ - s3://smollm3/datasets/llama_tokenized-individual-chunks/stack-edu-Python/
21
+ dataset_weights:
22
+ - 0.7
23
+ - 0.1
24
+ - 0.2
25
+ pad_samples_to_global_batch_size: false
26
+ return_positions: true
27
+ token_size_in_bytes: 4
28
+ tokenizer_name: HuggingFaceTB/SmolLM3-3B
29
+ use_old_brrr_dataloader: false
30
+ vocab_size: 128256
31
+ num_loading_workers: 0
32
+ seed: 6
33
+ name: stable
34
+ start_training_step: 1
35
+ general:
36
+ benchmark_csv_path: null
37
+ consumed_train_samples: null
38
+ ignore_sanity_checks: true
39
+ project: smollm3-blog
40
+ run: baseline-no-tie-12layers
41
+ seed: 6
42
+ step: null
43
+ logging:
44
+ iteration_step_info_interval: 1
45
+ log_level: info
46
+ log_level_replica: info
47
+ model:
48
+ ddp_bucket_cap_mb: 50
49
+ dtype: bfloat16
50
+ init_method:
51
+ std: 0.02
52
+ make_vocab_size_divisible_by: 1
53
+ model_config:
54
+ _attn_implementation: flash_attention_2
55
+ _fused_rms_norm: true
56
+ _fused_rotary_emb: true
57
+ _use_doc_masking: false
58
+ _use_qkv_packed: true
59
+ attention_bias: false
60
+ bos_token_id: 128000
61
+ eos_token_id: 128001
62
+ flex_attention_mask: null
63
+ hidden_act: silu
64
+ hidden_size: 2048
65
+ initializer_range: 0.02
66
+ intermediate_size: 8192
67
+ is_qwen2_config: true
68
+ max_position_embeddings: 4096
69
+ moe_config: null
70
+ num_attention_heads: 32
71
+ num_hidden_layers: 12
72
+ num_key_value_heads: 8
73
+ pad_token_id: null
74
+ pretraining_tp: 1
75
+ rms_norm_eps: 1.0e-05
76
+ rope_interleaved: false
77
+ rope_scaling: null
78
+ rope_theta: 50000.0
79
+ sliding_window_size: null
80
+ tie_word_embeddings: false
81
+ use_cache: true
82
+ vocab_size: 128256
83
+ no_rope_layer: null
84
+ optimizer:
85
+ accumulate_grad_in_fp32: true
86
+ clip_grad: 1.0
87
+ learning_rate_scheduler:
88
+ learning_rate: 0.0005
89
+ lr_decay_starting_step: 2000
90
+ lr_decay_steps: 28000
91
+ lr_decay_style: cosine
92
+ lr_warmup_steps: 2000
93
+ lr_warmup_style: linear
94
+ min_decay_lr: 5.0e-05
95
+ optimizer_factory:
96
+ adam_beta1: 0.9
97
+ adam_beta2: 0.95
98
+ adam_eps: 1.0e-08
99
+ name: adamW
100
+ torch_adam_is_fused: true
101
+ weight_decay: 0.1
102
+ weight_decay_exclude_named_params: null
103
+ zero_stage: 0
104
+ parallelism:
105
+ context_parallel_size: 1
106
+ dp: 8
107
+ expert_parallel_size: 1
108
+ moe_layer_recompute: false
109
+ pp: 1
110
+ pp_engine: 1f1b
111
+ recompute_layer: false
112
+ tp: 1
113
+ tp_linear_async_communication: true
114
+ tp_mode: REDUCE_SCATTER
115
+ tp_recompute_allgather: true
116
+ profiler: null
117
+ s3_upload:
118
+ remove_after_upload: true
119
+ s5cmd_concurrency: 5
120
+ s5cmd_numworkers: 16
121
+ s5cmd_path: /fsx/loubna/.venv-2-6-cu124/bin/s5cmd
122
+ upload_s3_path: s3://smollm3/blogpost-ablations/baseline-no-tie-12layers
123
+ tokenizer:
124
+ tokenizer_max_length: 4096
125
+ tokenizer_name_or_path: HuggingFaceTB/SmolLM3-3B
126
+ tokenizer_revision: null
127
+ metrics_logging:
128
+ log_level: 1
129
+ log_detail_interval: 100
130
+ tokens:
131
+ batch_accumulation_per_replica: 16
132
+ limit_test_batches: 0
133
+ limit_val_batches: 0
134
+ micro_batch_size: 3 # 1.5M tokens
135
+ sequence_length: 4096
136
+ train_steps: 30000 # 30B tokens
137
+ val_check_interval: 100
138
+ lighteval:
139
+ slurm_script_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/launch-config" # Default path for launch scripts
140
+ logs_path: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/logs" # Default path for evaluation logs
141
+ local_checkpoint_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/evals-ckpt" # Default path for temporary checkpoint storage. Will store under {local_checkpoint_dir}/{run_name}/{step}
142
+ nanotron_path: "/fsx/loubna/projects_v2/smollm3/nanotron"
143
+ output_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/results"
144
+ s3_save_path: "s3://smollm3/blogpost-evals"
145
+ upload_to_wandb: true
146
+ wandb_project: smollm3-blog-evals
147
+ wandb_entity: loubnabnl
148
+ parallelism:
149
+ dp: 8
150
+ pp: 1
151
+ tp: 1
152
+ tp_linear_async_communication: true
153
+ batch_size: 1 # Optional batch size for evaluation
154
+ eval_config_override: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_configs/ablations_blog.yaml" # The evaluation config file to use
155
+ eval_interval: 1000
156
+ eval_interval_file: null
157
+ slurm:
158
+ gpus_per_node: 8
159
+ partition: "hopper-prod"
160
+ hf_cache: "/fsx/loubna/.cache/huggingface"
161
+ cpus_per_task: 88
162
+ qos: "normal"
163
+ time: "01:59:00"
164
+ reservation: null
wd_on_embeddings/no_wd.yaml ADDED
@@ -0,0 +1,165 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ checkpoints:
2
+ checkpoint_interval: 1000
3
+ checkpoints_path: /scratch/loubna/checkpoints
4
+ checkpoints_path_is_shared_file_system: false
5
+ load_lr_scheduler: true
6
+ load_optimizer: true
7
+ resume_checkpoint_path: null
8
+ save_final_state: true
9
+ save_initial_state: false
10
+ data_stages:
11
+ - data:
12
+ dataset:
13
+ dataset_read_path:
14
+ - /fsx/loubna/projects_v2/data/blog/fineweb-edu
15
+ - /fsx/loubna/projects_v2/data/blog/finemath-3plus
16
+ - /fsx/loubna/projects_v2/data/blog/stack-edu-python
17
+ dataset_folder:
18
+ - s3://smollm3/datasets/llama_tokenized-global-chunks/fineweb-edu/fineweb-edu/
19
+ - s3://smollm3/datasets/llama_tokenized-individual-chunks/finemath/
20
+ - s3://smollm3/datasets/llama_tokenized-individual-chunks/stack-edu-Python/
21
+ dataset_weights:
22
+ - 0.7
23
+ - 0.1
24
+ - 0.2
25
+ pad_samples_to_global_batch_size: false
26
+ return_positions: true
27
+ token_size_in_bytes: 4
28
+ tokenizer_name: HuggingFaceTB/SmolLM3-3B
29
+ use_old_brrr_dataloader: false
30
+ vocab_size: 128256
31
+ num_loading_workers: 0
32
+ seed: 6
33
+ name: stable
34
+ start_training_step: 1
35
+ general:
36
+ benchmark_csv_path: null
37
+ consumed_train_samples: null
38
+ ignore_sanity_checks: true
39
+ project: smollm3-blog
40
+ run: baseline-no-wd
41
+ seed: 6
42
+ step: null
43
+ logging:
44
+ iteration_step_info_interval: 1
45
+ log_level: info
46
+ log_level_replica: info
47
+ model:
48
+ ddp_bucket_cap_mb: 50
49
+ dtype: bfloat16
50
+ init_method:
51
+ std: 0.02
52
+ make_vocab_size_divisible_by: 1
53
+ model_config:
54
+ _attn_implementation: flash_attention_2
55
+ _fused_rms_norm: true
56
+ _fused_rotary_emb: true
57
+ _use_doc_masking: false
58
+ _use_qkv_packed: true
59
+ attention_bias: false
60
+ bos_token_id: 128000
61
+ eos_token_id: 128001
62
+ flex_attention_mask: null
63
+ hidden_act: silu
64
+ hidden_size: 2048
65
+ initializer_range: 0.02
66
+ intermediate_size: 8192
67
+ is_qwen2_config: true
68
+ max_position_embeddings: 4096
69
+ moe_config: null
70
+ num_attention_heads: 32
71
+ num_hidden_layers: 16
72
+ num_key_value_heads: 8
73
+ pad_token_id: null
74
+ pretraining_tp: 1
75
+ rms_norm_eps: 1.0e-05
76
+ rope_interleaved: false
77
+ rope_scaling: null
78
+ rope_theta: 50000.0
79
+ sliding_window_size: null
80
+ tie_word_embeddings: true
81
+ use_cache: true
82
+ vocab_size: 128256
83
+ no_rope_layer: null
84
+ optimizer:
85
+ accumulate_grad_in_fp32: true
86
+ clip_grad: 1.0
87
+ learning_rate_scheduler:
88
+ learning_rate: 0.0005
89
+ lr_decay_starting_step: 2000
90
+ lr_decay_steps: 28000
91
+ lr_decay_style: cosine
92
+ lr_warmup_steps: 2000
93
+ lr_warmup_style: linear
94
+ min_decay_lr: 5.0e-05
95
+ optimizer_factory:
96
+ adam_beta1: 0.9
97
+ adam_beta2: 0.95
98
+ adam_eps: 1.0e-08
99
+ name: adamW
100
+ torch_adam_is_fused: true
101
+ weight_decay: 0.1
102
+ weight_decay_exclude_named_params:
103
+ - .*token_embedding.*
104
+ zero_stage: 0
105
+ parallelism:
106
+ context_parallel_size: 1
107
+ dp: 8
108
+ expert_parallel_size: 1
109
+ moe_layer_recompute: false
110
+ pp: 1
111
+ pp_engine: 1f1b
112
+ recompute_layer: false
113
+ tp: 1
114
+ tp_linear_async_communication: true
115
+ tp_mode: REDUCE_SCATTER
116
+ tp_recompute_allgather: true
117
+ profiler: null
118
+ s3_upload:
119
+ remove_after_upload: true
120
+ s5cmd_concurrency: 5
121
+ s5cmd_numworkers: 16
122
+ s5cmd_path: /fsx/loubna/.venv-2-6-cu124/bin/s5cmd
123
+ upload_s3_path: s3://smollm3/blogpost-ablations/baseline-no-wd
124
+ tokenizer:
125
+ tokenizer_max_length: 4096
126
+ tokenizer_name_or_path: HuggingFaceTB/SmolLM3-3B
127
+ tokenizer_revision: null
128
+ metrics_logging:
129
+ log_level: 1
130
+ log_detail_interval: 100
131
+ tokens:
132
+ batch_accumulation_per_replica: 16
133
+ limit_test_batches: 0
134
+ limit_val_batches: 0
135
+ micro_batch_size: 3 # 1.5M tokens
136
+ sequence_length: 4096
137
+ train_steps: 30000 # 30B tokens
138
+ val_check_interval: 100
139
+ lighteval:
140
+ slurm_script_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/launch-config" # Default path for launch scripts
141
+ logs_path: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/logs" # Default path for evaluation logs
142
+ local_checkpoint_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/evals-ckpt" # Default path for temporary checkpoint storage. Will store under {local_checkpoint_dir}/{run_name}/{step}
143
+ nanotron_path: "/fsx/loubna/projects_v2/smollm3/nanotron"
144
+ output_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/results"
145
+ s3_save_path: "s3://smollm3/blogpost-evals"
146
+ upload_to_wandb: true
147
+ wandb_project: smollm3-blog-evals
148
+ wandb_entity: huggingface
149
+ parallelism:
150
+ dp: 8
151
+ pp: 1
152
+ tp: 1
153
+ tp_linear_async_communication: true
154
+ batch_size: 1 # Optional batch size for evaluation
155
+ eval_config_override: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_configs/ablations_blog.yaml" # The evaluation config file to use
156
+ eval_interval: 1000
157
+ eval_interval_file: null
158
+ slurm:
159
+ gpus_per_node: 8
160
+ partition: "hopper-prod"
161
+ hf_cache: "/fsx/loubna/.cache/huggingface"
162
+ cpus_per_task: 88
163
+ qos: "normal"
164
+ time: "01:59:00"
165
+ reservation: null
wd_on_embeddings/no_wd_nope_docmask.yaml ADDED
@@ -0,0 +1,165 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ checkpoints:
2
+ checkpoint_interval: 1000
3
+ checkpoints_path: /scratch/loubna/checkpoints
4
+ checkpoints_path_is_shared_file_system: false
5
+ load_lr_scheduler: true
6
+ load_optimizer: true
7
+ resume_checkpoint_path: null
8
+ save_final_state: true
9
+ save_initial_state: false
10
+ data_stages:
11
+ - data:
12
+ dataset:
13
+ dataset_read_path:
14
+ - /fsx/loubna/projects_v2/data/blog/fineweb-edu
15
+ - /fsx/loubna/projects_v2/data/blog/finemath-3plus
16
+ - /fsx/loubna/projects_v2/data/blog/stack-edu-python
17
+ dataset_folder:
18
+ - s3://smollm3/datasets/llama_tokenized-global-chunks/fineweb-edu/fineweb-edu/
19
+ - s3://smollm3/datasets/llama_tokenized-individual-chunks/finemath/
20
+ - s3://smollm3/datasets/llama_tokenized-individual-chunks/stack-edu-Python/
21
+ dataset_weights:
22
+ - 0.7
23
+ - 0.1
24
+ - 0.2
25
+ pad_samples_to_global_batch_size: false
26
+ return_positions: true
27
+ token_size_in_bytes: 4
28
+ tokenizer_name: HuggingFaceTB/SmolLM3-3B
29
+ use_old_brrr_dataloader: false
30
+ vocab_size: 128256
31
+ num_loading_workers: 0
32
+ seed: 6
33
+ name: stable
34
+ start_training_step: 1
35
+ general:
36
+ benchmark_csv_path: null
37
+ consumed_train_samples: null
38
+ ignore_sanity_checks: true
39
+ project: smollm3-blog
40
+ run: baseline-no-wd-nope-docmask
41
+ seed: 6
42
+ step: null
43
+ logging:
44
+ iteration_step_info_interval: 1
45
+ log_level: info
46
+ log_level_replica: info
47
+ model:
48
+ ddp_bucket_cap_mb: 50
49
+ dtype: bfloat16
50
+ init_method:
51
+ std: 0.02
52
+ make_vocab_size_divisible_by: 1
53
+ model_config:
54
+ _attn_implementation: flash_attention_2
55
+ _fused_rms_norm: true
56
+ _fused_rotary_emb: true
57
+ _use_doc_masking: true
58
+ _use_qkv_packed: true
59
+ attention_bias: false
60
+ bos_token_id: 128000
61
+ eos_token_id: 128001
62
+ flex_attention_mask: null
63
+ hidden_act: silu
64
+ hidden_size: 2048
65
+ initializer_range: 0.02
66
+ intermediate_size: 8192
67
+ is_qwen2_config: true
68
+ max_position_embeddings: 4096
69
+ moe_config: null
70
+ num_attention_heads: 32
71
+ num_hidden_layers: 16
72
+ num_key_value_heads: 8
73
+ pad_token_id: null
74
+ pretraining_tp: 1
75
+ rms_norm_eps: 1.0e-05
76
+ rope_interleaved: false
77
+ rope_scaling: null
78
+ rope_theta: 50000.0
79
+ sliding_window_size: null
80
+ tie_word_embeddings: true
81
+ use_cache: true
82
+ vocab_size: 128256
83
+ no_rope_layer: 4
84
+ optimizer:
85
+ accumulate_grad_in_fp32: true
86
+ clip_grad: 1.0
87
+ learning_rate_scheduler:
88
+ learning_rate: 0.0005
89
+ lr_decay_starting_step: 2000
90
+ lr_decay_steps: 28000
91
+ lr_decay_style: cosine
92
+ lr_warmup_steps: 2000
93
+ lr_warmup_style: linear
94
+ min_decay_lr: 5.0e-05
95
+ optimizer_factory:
96
+ adam_beta1: 0.9
97
+ adam_beta2: 0.95
98
+ adam_eps: 1.0e-08
99
+ name: adamW
100
+ torch_adam_is_fused: true
101
+ weight_decay: 0.1
102
+ weight_decay_exclude_named_params:
103
+ - .*token_embedding.*
104
+ zero_stage: 0
105
+ parallelism:
106
+ context_parallel_size: 1
107
+ dp: 8
108
+ expert_parallel_size: 1
109
+ moe_layer_recompute: false
110
+ pp: 1
111
+ pp_engine: 1f1b
112
+ recompute_layer: false
113
+ tp: 1
114
+ tp_linear_async_communication: true
115
+ tp_mode: REDUCE_SCATTER
116
+ tp_recompute_allgather: true
117
+ profiler: null
118
+ s3_upload:
119
+ remove_after_upload: true
120
+ s5cmd_concurrency: 5
121
+ s5cmd_numworkers: 16
122
+ s5cmd_path: /fsx/loubna/.venv-2-6-cu124/bin/s5cmd
123
+ upload_s3_path: s3://smollm3/blogpost-ablations/baseline-no-wd-nope-docmask
124
+ tokenizer:
125
+ tokenizer_max_length: 4096
126
+ tokenizer_name_or_path: HuggingFaceTB/SmolLM3-3B
127
+ tokenizer_revision: null
128
+ metrics_logging:
129
+ log_level: 1
130
+ log_detail_interval: 100
131
+ tokens:
132
+ batch_accumulation_per_replica: 16
133
+ limit_test_batches: 0
134
+ limit_val_batches: 0
135
+ micro_batch_size: 3 # 1.5M tokens
136
+ sequence_length: 4096
137
+ train_steps: 30000 # 30B tokens
138
+ val_check_interval: 100
139
+ lighteval:
140
+ slurm_script_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/launch-config" # Default path for launch scripts
141
+ logs_path: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/logs" # Default path for evaluation logs
142
+ local_checkpoint_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/evals-ckpt" # Default path for temporary checkpoint storage. Will store under {local_checkpoint_dir}/{run_name}/{step}
143
+ nanotron_path: "/fsx/loubna/projects_v2/smollm3/nanotron"
144
+ output_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/results"
145
+ s3_save_path: "s3://smollm3/blogpost-evals"
146
+ upload_to_wandb: true
147
+ wandb_project: smollm3-blog-evals
148
+ wandb_entity: huggingface
149
+ parallelism:
150
+ dp: 8
151
+ pp: 1
152
+ tp: 1
153
+ tp_linear_async_communication: true
154
+ batch_size: 1 # Optional batch size for evaluation
155
+ eval_config_override: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_configs/ablations_blog.yaml" # The evaluation config file to use
156
+ eval_interval: 1000
157
+ eval_interval_file: null
158
+ slurm:
159
+ gpus_per_node: 8
160
+ partition: "hopper-prod"
161
+ hf_cache: "/fsx/loubna/.cache/huggingface"
162
+ cpus_per_task: 88
163
+ qos: "normal"
164
+ time: "01:59:00"
165
+ reservation: null
wd_on_embeddings/zloss.yaml ADDED
@@ -0,0 +1,166 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ checkpoints:
2
+ checkpoint_interval: 1000
3
+ checkpoints_path: /scratch/loubna/checkpoints
4
+ checkpoints_path_is_shared_file_system: false
5
+ load_lr_scheduler: true
6
+ load_optimizer: true
7
+ resume_checkpoint_path: null
8
+ save_final_state: true
9
+ save_initial_state: false
10
+ data_stages:
11
+ - data:
12
+ dataset:
13
+ dataset_read_path:
14
+ - /fsx/loubna/projects_v2/data/blog/fineweb-edu
15
+ - /fsx/loubna/projects_v2/data/blog/finemath-3plus
16
+ - /fsx/loubna/projects_v2/data/blog/stack-edu-python
17
+ dataset_folder:
18
+ - s3://smollm3/datasets/llama_tokenized-global-chunks/fineweb-edu/fineweb-edu/
19
+ - s3://smollm3/datasets/llama_tokenized-individual-chunks/finemath/
20
+ - s3://smollm3/datasets/llama_tokenized-individual-chunks/stack-edu-Python/
21
+ dataset_weights:
22
+ - 0.7
23
+ - 0.1
24
+ - 0.2
25
+ pad_samples_to_global_batch_size: false
26
+ return_positions: true
27
+ token_size_in_bytes: 4
28
+ tokenizer_name: HuggingFaceTB/SmolLM3-3B
29
+ use_old_brrr_dataloader: false
30
+ vocab_size: 128256
31
+ num_loading_workers: 0
32
+ seed: 6
33
+ name: stable
34
+ start_training_step: 1
35
+ general:
36
+ benchmark_csv_path: null
37
+ consumed_train_samples: null
38
+ ignore_sanity_checks: true
39
+ project: smollm3-blog
40
+ run: baseline-zloss
41
+ seed: 6
42
+ step: null
43
+ logging:
44
+ iteration_step_info_interval: 1
45
+ log_level: info
46
+ log_level_replica: info
47
+ model:
48
+ ddp_bucket_cap_mb: 50
49
+ dtype: bfloat16
50
+ init_method:
51
+ std: 0.02
52
+ make_vocab_size_divisible_by: 1
53
+ model_config:
54
+ _attn_implementation: flash_attention_2
55
+ _fused_rms_norm: true
56
+ _fused_rotary_emb: true
57
+ _use_doc_masking: false
58
+ _use_qkv_packed: true
59
+ attention_bias: false
60
+ bos_token_id: 128000
61
+ eos_token_id: 128001
62
+ flex_attention_mask: null
63
+ hidden_act: silu
64
+ hidden_size: 2048
65
+ initializer_range: 0.02
66
+ intermediate_size: 8192
67
+ is_qwen2_config: true
68
+ max_position_embeddings: 4096
69
+ moe_config: null
70
+ num_attention_heads: 32
71
+ num_hidden_layers: 16
72
+ num_key_value_heads: 8
73
+ pad_token_id: null
74
+ pretraining_tp: 1
75
+ rms_norm_eps: 1.0e-05
76
+ rope_interleaved: false
77
+ rope_scaling: null
78
+ rope_theta: 50000.0
79
+ sliding_window_size: null
80
+ tie_word_embeddings: true
81
+ use_cache: true
82
+ vocab_size: 128256
83
+ z_loss_coefficient: 1.0e-05
84
+ z_loss_enabled: true
85
+ no_rope_layer: null
86
+ optimizer:
87
+ accumulate_grad_in_fp32: true
88
+ clip_grad: 1.0
89
+ learning_rate_scheduler:
90
+ learning_rate: 0.0005
91
+ lr_decay_starting_step: 2000
92
+ lr_decay_steps: 28000
93
+ lr_decay_style: cosine
94
+ lr_warmup_steps: 2000
95
+ lr_warmup_style: linear
96
+ min_decay_lr: 5.0e-05
97
+ optimizer_factory:
98
+ adam_beta1: 0.9
99
+ adam_beta2: 0.95
100
+ adam_eps: 1.0e-08
101
+ name: adamW
102
+ torch_adam_is_fused: true
103
+ weight_decay: 0.1
104
+ weight_decay_exclude_named_params: null
105
+ zero_stage: 0
106
+ parallelism:
107
+ context_parallel_size: 1
108
+ dp: 16
109
+ expert_parallel_size: 1
110
+ moe_layer_recompute: false
111
+ pp: 1
112
+ pp_engine: 1f1b
113
+ recompute_layer: false
114
+ tp: 1
115
+ tp_linear_async_communication: true
116
+ tp_mode: REDUCE_SCATTER
117
+ tp_recompute_allgather: true
118
+ profiler: null
119
+ s3_upload:
120
+ remove_after_upload: true
121
+ s5cmd_concurrency: 5
122
+ s5cmd_numworkers: 16
123
+ s5cmd_path: /fsx/loubna/.venv-2-6-cu124/bin/s5cmd
124
+ upload_s3_path: s3://smollm3/blogpost-ablations/baseline-zloss
125
+ tokenizer:
126
+ tokenizer_max_length: 4096
127
+ tokenizer_name_or_path: HuggingFaceTB/SmolLM3-3B
128
+ tokenizer_revision: null
129
+ metrics_logging:
130
+ log_level: 1
131
+ log_detail_interval: 100
132
+ tokens:
133
+ batch_accumulation_per_replica: 12
134
+ limit_test_batches: 0
135
+ limit_val_batches: 0
136
+ micro_batch_size: 2 # 1.5M tokens
137
+ sequence_length: 4096
138
+ train_steps: 30000 # 30B tokens
139
+ val_check_interval: 100
140
+ lighteval:
141
+ slurm_script_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/launch-config" # Default path for launch scripts
142
+ logs_path: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/logs" # Default path for evaluation logs
143
+ local_checkpoint_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/evals-ckpt" # Default path for temporary checkpoint storage. Will store under {local_checkpoint_dir}/{run_name}/{step}
144
+ nanotron_path: "/fsx/loubna/projects_v2/smollm3/nanotron"
145
+ output_dir: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_results/results"
146
+ s3_save_path: "s3://smollm3/blogpost-evals"
147
+ upload_to_wandb: true
148
+ wandb_project: smollm3-blog-evals
149
+ wandb_entity: loubnabnl
150
+ parallelism:
151
+ dp: 8
152
+ pp: 1
153
+ tp: 1
154
+ tp_linear_async_communication: true
155
+ batch_size: 1 # Optional batch size for evaluation
156
+ eval_config_override: "/fsx/loubna/projects_v2/smollm3/nanotron/ablations/eval_configs/ablations_blog.yaml" # The evaluation config file to use
157
+ eval_interval: 1000
158
+ eval_interval_file: null
159
+ slurm:
160
+ gpus_per_node: 8
161
+ partition: "hopper-prod"
162
+ hf_cache: "/fsx/loubna/.cache/huggingface"
163
+ cpus_per_task: 88
164
+ qos: "low"
165
+ time: "01:59:00"
166
+ reservation: null