Hu commited on
Commit
7482748
·
verified ·
1 Parent(s): a18b154

Upload pretrain checkpoint 78900 (1.0038B total, 0.7490B active)

Browse files

Standard BF16 inference artifacts in an isolated folder; optimizer and trainer state intentionally excluded.

pretrain/Modujo-1B-A0.75B-checkpoint-78900/args.json ADDED
@@ -0,0 +1,359 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "output_dir": "/mnt/bn/ecom-ai-platform-1/yunhai/ModujoMoe/output/modujo-1b-domain-continue-bs128/v3-20260922-135620",
3
+ "per_device_train_batch_size": 4,
4
+ "num_train_epochs": 1.0,
5
+ "max_steps": -1,
6
+ "learning_rate": 0.0003,
7
+ "lr_scheduler_type": "cosine_with_min_lr",
8
+ "lr_scheduler_kwargs": "{\"min_lr_rate\": 0.1}",
9
+ "warmup_steps": 0,
10
+ "optim": "adamw_torch_fused",
11
+ "optim_args": null,
12
+ "weight_decay": 0.1,
13
+ "adam_beta1": 0.9,
14
+ "adam_beta2": 0.95,
15
+ "adam_epsilon": 1e-08,
16
+ "optim_target_modules": null,
17
+ "gradient_accumulation_steps": 8,
18
+ "average_tokens_across_devices": true,
19
+ "max_grad_norm": 1.0,
20
+ "label_smoothing_factor": 0.0,
21
+ "bf16": true,
22
+ "fp16": false,
23
+ "bf16_full_eval": false,
24
+ "fp16_full_eval": false,
25
+ "tf32": true,
26
+ "gradient_checkpointing": true,
27
+ "gradient_checkpointing_kwargs": null,
28
+ "torch_compile": false,
29
+ "torch_compile_backend": null,
30
+ "torch_compile_mode": null,
31
+ "use_liger_kernel": false,
32
+ "liger_kernel_config": null,
33
+ "use_cache": false,
34
+ "neftune_noise_alpha": null,
35
+ "torch_empty_cache_steps": null,
36
+ "auto_find_batch_size": false,
37
+ "logging_strategy": "steps",
38
+ "logging_steps": 10,
39
+ "logging_first_step": true,
40
+ "log_on_each_node": true,
41
+ "logging_nan_inf_filter": true,
42
+ "include_num_input_tokens_seen": false,
43
+ "log_level": "passive",
44
+ "log_level_replica": "warning",
45
+ "disable_tqdm": null,
46
+ "report_to": [
47
+ "wandb"
48
+ ],
49
+ "run_name": "/mnt/bn/ecom-ai-platform-1/yunhai/ModujoMoe/output/modujo-1b-domain-continue-bs128/v3-20260922-135620",
50
+ "project": "huggingface",
51
+ "trackio_space_id": null,
52
+ "trackio_bucket_id": null,
53
+ "trackio_static_space_id": null,
54
+ "eval_strategy": "no",
55
+ "eval_steps": 100.0,
56
+ "eval_delay": 0,
57
+ "per_device_eval_batch_size": 1,
58
+ "prediction_loss_only": false,
59
+ "eval_on_start": false,
60
+ "eval_do_concat_batches": true,
61
+ "eval_use_gather_object": false,
62
+ "eval_accumulation_steps": null,
63
+ "include_for_metrics": [],
64
+ "batch_eval_metrics": false,
65
+ "save_only_model": false,
66
+ "save_strategy": "steps",
67
+ "save_steps": 100.0,
68
+ "save_on_each_node": false,
69
+ "save_total_limit": 2,
70
+ "enable_jit_checkpoint": false,
71
+ "push_to_hub": false,
72
+ "hub_token": null,
73
+ "hub_private_repo": null,
74
+ "hub_model_id": null,
75
+ "hub_strategy": "every_save",
76
+ "hub_always_push": false,
77
+ "hub_revision": null,
78
+ "load_best_model_at_end": false,
79
+ "metric_for_best_model": "loss",
80
+ "greater_is_better": false,
81
+ "ignore_data_skip": false,
82
+ "restore_callback_states_from_checkpoint": false,
83
+ "full_determinism": false,
84
+ "seed": 42,
85
+ "data_seed": 42,
86
+ "use_cpu": false,
87
+ "accelerator_config": {
88
+ "dispatch_batches": false
89
+ },
90
+ "parallelism_config": null,
91
+ "dataloader_drop_last": false,
92
+ "dataloader_num_workers": 8,
93
+ "dataloader_pin_memory": true,
94
+ "dataloader_persistent_workers": true,
95
+ "dataloader_prefetch_factor": 4,
96
+ "dataloader_multiprocessing_context": null,
97
+ "dataloader_in_order": true,
98
+ "remove_unused_columns": true,
99
+ "label_names": null,
100
+ "train_sampling_strategy": "random",
101
+ "length_column_name": "length",
102
+ "ddp_find_unused_parameters": true,
103
+ "ddp_bucket_cap_mb": null,
104
+ "ddp_broadcast_buffers": null,
105
+ "ddp_static_graph": null,
106
+ "ddp_backend": null,
107
+ "ddp_timeout": 18000000,
108
+ "fsdp": [],
109
+ "fsdp_config": null,
110
+ "deepspeed": null,
111
+ "debug": null,
112
+ "skip_memory_metrics": true,
113
+ "do_train": false,
114
+ "do_eval": false,
115
+ "do_predict": false,
116
+ "resume_from_checkpoint": "/tmp/modujo-resume-9500-grouped-v2",
117
+ "local_rank": 0,
118
+ "sortish_sampler": false,
119
+ "predict_with_generate": false,
120
+ "generation_max_length": null,
121
+ "generation_num_beams": null,
122
+ "generation_config": null,
123
+ "tuner_backend": "peft",
124
+ "vit_gradient_checkpointing": true,
125
+ "router_aux_loss_coef": 0.001,
126
+ "enable_dft_loss": false,
127
+ "enable_channel_loss": false,
128
+ "safe_serialization": true,
129
+ "max_shard_size": "5GB",
130
+ "check_model": true,
131
+ "acc_strategy": "token",
132
+ "train_dataloader_shuffle": true,
133
+ "group_by_length": false,
134
+ "max_epochs": null,
135
+ "aligner_lr": null,
136
+ "vit_lr": null,
137
+ "use_logits_to_keep": null,
138
+ "ds3_gather_for_generation": true,
139
+ "resume_only_model": false,
140
+ "optimizer": "modujo_muon",
141
+ "loss_type": null,
142
+ "mrl_dims": null,
143
+ "eval_metric": null,
144
+ "callbacks": [],
145
+ "early_stop_interval": null,
146
+ "eval_use_evalscope": false,
147
+ "eval_dataset": [],
148
+ "eval_dataset_args": null,
149
+ "eval_limit": null,
150
+ "eval_generation_config": null,
151
+ "extra_eval_args": null,
152
+ "tuner_type": "full",
153
+ "use_galore": false,
154
+ "galore_target_modules": null,
155
+ "galore_rank": 128,
156
+ "galore_update_proj_gap": 50,
157
+ "galore_scale": 1.0,
158
+ "galore_proj_type": "std",
159
+ "galore_optim_per_parameter": false,
160
+ "galore_with_embedding": false,
161
+ "galore_quantization": false,
162
+ "galore_proj_quant": false,
163
+ "galore_proj_bits": 4,
164
+ "galore_proj_group_size": 256,
165
+ "galore_cos_threshold": 0.4,
166
+ "galore_gamma_proj": 2,
167
+ "galore_queue_size": 5,
168
+ "lisa_activated_layers": 0,
169
+ "lisa_step_interval": 20,
170
+ "use_flash_ckpt": false,
171
+ "logging_dir": "/tmp/modujo-domain-bs128-logging",
172
+ "warmup_ratio": 0.02,
173
+ "use_ray": false,
174
+ "ray_exp_name": null,
175
+ "device_groups": null,
176
+ "model": "/tmp/modujo-resume-9500-grouped-v2",
177
+ "model_type": "modujo_qwen4_exp",
178
+ "model_revision": null,
179
+ "task_type": "causal_lm",
180
+ "torch_dtype": "bfloat16",
181
+ "attn_impl": null,
182
+ "experts_impl": "grouped_mm",
183
+ "new_special_tokens": [],
184
+ "num_labels": null,
185
+ "problem_type": null,
186
+ "rope_scaling": null,
187
+ "device_map": null,
188
+ "max_memory": {},
189
+ "max_model_len": null,
190
+ "local_repo_path": null,
191
+ "init_strategy": null,
192
+ "template": "qwen3",
193
+ "system": null,
194
+ "max_length": 2048,
195
+ "truncation_strategy": "delete",
196
+ "max_pixels": null,
197
+ "agent_template": null,
198
+ "norm_bbox": null,
199
+ "use_chat_template": false,
200
+ "padding_side": "right",
201
+ "padding_free": false,
202
+ "loss_scale": "all+ignore_empty_think",
203
+ "sequence_parallel_size": 1,
204
+ "is_binary_loss_scale": null,
205
+ "template_backend": "swift",
206
+ "response_prefix": null,
207
+ "enable_thinking": null,
208
+ "preserve_thinking": null,
209
+ "add_non_thinking_prefix": true,
210
+ "disable_ignore_empty_think": false,
211
+ "dataset": [
212
+ "/mnt/bn/ecom-ai-platform-1/yunhai/ModujoMoe/datasets/pretrain_standard/minimind_pretrain_t2t.jsonl",
213
+ "/mnt/bn/ecom-ai-platform-1/yunhai/ModujoMoe/datasets/pretrain_standard/amazon_esci_products.jsonl",
214
+ "/mnt/bn/ecom-ai-platform-1/yunhai/ModujoMoe/datasets/pretrain_standard/wayfair_wands_products.jsonl"
215
+ ],
216
+ "val_dataset": [],
217
+ "cached_dataset": [],
218
+ "cached_val_dataset": [],
219
+ "split_dataset_ratio": 0.0,
220
+ "dataset_num_proc": 8,
221
+ "load_from_cache_file": false,
222
+ "dataset_shuffle": true,
223
+ "val_dataset_shuffle": false,
224
+ "streaming": false,
225
+ "interleave_prob": null,
226
+ "stopping_strategy": "first_exhausted",
227
+ "shuffle_buffer_size": 1000,
228
+ "download_mode": "reuse_dataset_if_exists",
229
+ "columns": {},
230
+ "strict": false,
231
+ "disable_auto_column_mapping": false,
232
+ "model_name": null,
233
+ "model_author": null,
234
+ "custom_dataset_info": [],
235
+ "quant_method": null,
236
+ "quant_bits": null,
237
+ "hqq_axis": null,
238
+ "bnb_4bit_compute_dtype": "bfloat16",
239
+ "bnb_4bit_quant_type": "nf4",
240
+ "bnb_4bit_use_double_quant": true,
241
+ "bnb_4bit_quant_storage": null,
242
+ "max_new_tokens": 64,
243
+ "temperature": 0.0,
244
+ "top_k": null,
245
+ "top_p": null,
246
+ "repetition_penalty": null,
247
+ "num_beams": 1,
248
+ "stream": false,
249
+ "stop_words": [],
250
+ "logprobs": false,
251
+ "top_logprobs": null,
252
+ "structured_outputs_regex": null,
253
+ "adapters": [],
254
+ "external_plugins": [
255
+ "/mnt/bn/ecom-ai-platform-1/yunhai/ModujoMoe/common/modujo_swift_plugin.py"
256
+ ],
257
+ "custom_register_path": [],
258
+ "model_kwargs": {
259
+ "output_router_logits": true
260
+ },
261
+ "enable_npu_model_patch": true,
262
+ "load_args": false,
263
+ "load_data_args": false,
264
+ "packing": false,
265
+ "packing_length": null,
266
+ "packing_num_proc": 1,
267
+ "packing_strategy": "binpack",
268
+ "lazy_tokenize": false,
269
+ "use_hf": true,
270
+ "ignore_args_error": false,
271
+ "use_swift_lora": false,
272
+ "freeze_parameters": [],
273
+ "freeze_parameters_regex": null,
274
+ "freeze_parameters_ratio": 0.0,
275
+ "trainable_parameters": [],
276
+ "trainable_parameters_regex": null,
277
+ "freeze_llm": false,
278
+ "freeze_vit": true,
279
+ "freeze_aligner": true,
280
+ "target_modules": [
281
+ "all-linear"
282
+ ],
283
+ "target_regex": null,
284
+ "target_parameters": null,
285
+ "modules_to_save": [],
286
+ "lora_rank": 8,
287
+ "lora_alpha": 32.0,
288
+ "lora_dropout": 0.05,
289
+ "lora_bias": "none",
290
+ "lora_dtype": null,
291
+ "lorap_lr_ratio": null,
292
+ "use_rslora": false,
293
+ "use_dora": false,
294
+ "lora_ga_batch_size": 2,
295
+ "lora_ga_iters": 2,
296
+ "lora_ga_max_length": 1024,
297
+ "lora_ga_direction": "ArB2r",
298
+ "lora_ga_scale": "stable",
299
+ "lora_ga_stable_gamma": 16,
300
+ "init_weights": true,
301
+ "fourier_n_frequency": 2000,
302
+ "fourier_scaling": 300.0,
303
+ "boft_block_size": 4,
304
+ "boft_block_num": 0,
305
+ "boft_n_butterfly_factor": 1,
306
+ "boft_dropout": 0.0,
307
+ "vera_rank": 256,
308
+ "vera_projection_prng_key": 0,
309
+ "vera_dropout": 0.0,
310
+ "vera_d_initial": 0.1,
311
+ "adapter_act": "gelu",
312
+ "adapter_length": 128,
313
+ "adalora_target_r": 8,
314
+ "adalora_init_r": 12,
315
+ "adalora_tinit": 0,
316
+ "adalora_tfinal": 0,
317
+ "adalora_deltaT": 1,
318
+ "adalora_beta1": 0.85,
319
+ "adalora_beta2": 0.85,
320
+ "adalora_orth_reg_weight": 0.5,
321
+ "llamapro_num_new_blocks": 4,
322
+ "llamapro_num_groups": null,
323
+ "reft_layer_key": null,
324
+ "reft_layers": null,
325
+ "reft_rank": 4,
326
+ "reft_intervention_type": "LoreftIntervention",
327
+ "reft_args": null,
328
+ "swanlab_token": null,
329
+ "swanlab_project": "ms-swift",
330
+ "swanlab_workspace": null,
331
+ "swanlab_exp_name": null,
332
+ "swanlab_notification_method": null,
333
+ "swanlab_webhook_url": null,
334
+ "swanlab_secret": null,
335
+ "swanlab_sender_email": null,
336
+ "swanlab_receiver_email": null,
337
+ "swanlab_smtp_server": null,
338
+ "swanlab_smtp_port": null,
339
+ "swanlab_email_language": "zh",
340
+ "swanlab_mode": "cloud",
341
+ "add_version": true,
342
+ "create_checkpoint_symlink": false,
343
+ "zero_hpz_partition_size": null,
344
+ "deepspeed_autotp_size": null,
345
+ "swift_version": "4.5.3",
346
+ "ckpt_dir": "/tmp/modujo-resume-9500-grouped-v2",
347
+ "rank": 0,
348
+ "global_world_size": 4,
349
+ "local_world_size": 4,
350
+ "model_suffix": "modujo-resume-9500-grouped-v2",
351
+ "model_info": "ModelInfo(model_type='modujo_qwen4_exp', model_dir='/tmp/modujo-resume-9500-grouped-v2', torch_dtype=torch.bfloat16, max_model_len=32768, quant_method=None, quant_bits=None, rope_scaling={'partial_rotary_factor': 0.25, 'rope_theta': 10000000, 'rope_type': 'default'}, is_moe_model=True, is_multimodal=False, config=None, task_type='causal_lm', num_labels=None)",
352
+ "model_meta": "ModelMeta(model_type='modujo_qwen4_exp', model_groups=[ModelGroup(models=[Model(ms_model_id=None, hf_model_id='Alexhu1999/Modujo-9B-A1B', model_path=None, ms_revision=None, hf_revision=None)], template=None, ignore_patterns=None, requires=None, tags=[])], loader=<class 'swift.model.register.ModelLoader'>, template='qwen3', model_arch=ModelKeys(arch_name='llama', embedding='model.embed_tokens', module_list='model.layers', lm_head='lm_head', q_proj='model.layers.{}.self_attn.q_proj', k_proj='model.layers.{}.self_attn.k_proj', v_proj='model.layers.{}.self_attn.v_proj', o_proj='model.layers.{}.self_attn.o_proj', attention='model.layers.{}.self_attn', mlp='model.layers.{}.mlp', down_proj='model.layers.{}.mlp.down_proj', qkv_proj=None, qk_proj=None, qa_proj=None, qb_proj=None, kv_proj=None, kva_proj=None, kvb_proj=None), mcore_model_type=None, architectures=['Qwen4ExpForCausalLM'], additional_saved_files=[], torch_dtype=None, is_multimodal=False, is_reward=False, task_type=None, ignore_patterns=None, requires=['transformers>=5.16.0'], tags=['text-generation', 'moe'])",
353
+ "model_dir": "/tmp/modujo-resume-9500-grouped-v2",
354
+ "template_meta": "Qwen3MixedTemplateMeta(template_type='qwen3', prefix=[], prompt=['<|im_start|>user\\n{{QUERY}}<|im_end|>\\n<|im_start|>assistant\\n'], chat_sep=['<|im_end|>\\n'], suffix=['<|im_end|>\\n'], template_cls=<class 'swift.template.base.Template'>, system_prefix=['<|im_start|>system\\n{{SYSTEM}}<|im_end|>\\n'], default_system=None, auto_add_bos=False, stop_words=['<|endoftext|>'], agent_template='hermes', is_thinking=True, thinking_prefix='', non_thinking_prefix='<think>\\n\\n</think>\\n\\n', preserve_thinking=None, history_thinking_prefix='')",
355
+ "_val_dataset_exists": false,
356
+ "hub": "<class 'swift.hub.hub.HFHub'>",
357
+ "evaluation_strategy": "steps",
358
+ "training_args": "Seq2SeqTrainingArguments(output_dir='/mnt/bn/ecom-ai-platform-1/yunhai/ModujoMoe/output/modujo-1b-domain-continue-bs128/v3-20260922-135620', per_device_train_batch_size=4, num_train_epochs=1.0, max_steps=-1, learning_rate=0.0003, lr_scheduler_type=<SchedulerType.COSINE_WITH_MIN_LR: 'cosine_with_min_lr'>, lr_scheduler_kwargs={'min_lr_rate': 0.1}, warmup_steps=0.02, optim=<OptimizerNames.ADAMW_TORCH_FUSED: 'adamw_torch_fused'>, optim_args=None, weight_decay=0.1, adam_beta1=0.9, adam_beta2=0.95, adam_epsilon=1e-08, optim_target_modules=None, gradient_accumulation_steps=8, average_tokens_across_devices=None, max_grad_norm=1.0, label_smoothing_factor=0.0, bf16=True, fp16=False, bf16_full_eval=False, fp16_full_eval=False, tf32=True, gradient_checkpointing=True, gradient_checkpointing_kwargs=None, torch_compile=False, torch_compile_backend=None, torch_compile_mode=None, use_liger_kernel=False, liger_kernel_config=None, use_cache=False, neftune_noise_alpha=None, torch_empty_cache_steps=None, auto_find_batch_size=False, logging_strategy=<IntervalStrategy.STEPS: 'steps'>, logging_steps=10, logging_first_step=True, log_on_each_node=True, logging_nan_inf_filter=True, include_num_input_tokens_seen=None, log_level='passive', log_level_replica='warning', disable_tqdm=False, report_to=['wandb'], run_name='/mnt/bn/ecom-ai-platform-1/yunhai/ModujoMoe/output/modujo-1b-domain-continue-bs128/v3-20260922-135620', project='huggingface', trackio_space_id=None, trackio_bucket_id=None, trackio_static_space_id=None, eval_strategy=<IntervalStrategy.NO: 'no'>, eval_steps=100.0, eval_delay=0, per_device_eval_batch_size=1, prediction_loss_only=False, eval_on_start=False, eval_do_concat_batches=True, eval_use_gather_object=False, eval_accumulation_steps=None, include_for_metrics=[], batch_eval_metrics=False, save_only_model=False, save_strategy=<SaveStrategy.STEPS: 'steps'>, save_steps=100, save_on_each_node=False, save_total_limit=2, enable_jit_checkpoint=False, push_to_hub=False, hub_token=None, hub_private_repo=None, hub_model_id=None, hub_strategy=<HubStrategy.EVERY_SAVE: 'every_save'>, hub_always_push=False, hub_revision=None, load_best_model_at_end=False, metric_for_best_model='loss', greater_is_better=False, ignore_data_skip=False, restore_callback_states_from_checkpoint=False, full_determinism=False, seed=42, data_seed=42, use_cpu=False, accelerator_config=AcceleratorConfig(split_batches=False, dispatch_batches=False, even_batches=True, use_seedable_sampler=True, non_blocking=False, gradient_accumulation_kwargs=None, use_configured_state=False), parallelism_config=None, dataloader_drop_last=False, dataloader_num_workers=8, dataloader_pin_memory=True, dataloader_persistent_workers=True, dataloader_prefetch_factor=4, dataloader_multiprocessing_context=None, dataloader_in_order=True, remove_unused_columns=False, label_names=None, train_sampling_strategy='random', length_column_name='length', ddp_find_unused_parameters=True, ddp_bucket_cap_mb=None, ddp_broadcast_buffers=None, ddp_static_graph=None, ddp_backend=None, ddp_timeout=18000000, fsdp=[], fsdp_config=None, deepspeed=None, debug=[], skip_memory_metrics=True, do_train=False, do_eval=False, do_predict=False, resume_from_checkpoint='/tmp/modujo-resume-9500-grouped-v2', local_rank=0, sortish_sampler=False, predict_with_generate=False, generation_max_length=None, generation_num_beams=None, generation_config=None, tuner_backend='peft', vit_gradient_checkpointing=True, router_aux_loss_coef=0.001, enable_dft_loss=False, enable_channel_loss=False, safe_serialization=True, max_shard_size='5GB', check_model=True, acc_strategy='token', train_dataloader_shuffle=True, group_by_length=False, max_epochs=None, aligner_lr=None, vit_lr=None, use_logits_to_keep=None, ds3_gather_for_generation=True, resume_only_model=False, optimizer='modujo_muon', loss_type=None, mrl_dims=None, eval_metric=None, callbacks=[], early_stop_interval=None, eval_use_evalscope=False, eval_dataset=[], eval_dataset_args=None, eval_limit=None, eval_generation_config=None, extra_eval_args=None, tuner_type='full', use_galore=False, galore_target_modules=None, galore_rank=128, galore_update_proj_gap=50, galore_scale=1.0, galore_proj_type='std', galore_optim_per_parameter=False, galore_with_embedding=False, galore_quantization=False, galore_proj_quant=False, galore_proj_bits=4, galore_proj_group_size=256, galore_cos_threshold=0.4, galore_gamma_proj=2, galore_queue_size=5, lisa_activated_layers=0, lisa_step_interval=20, use_flash_ckpt=False, logging_dir='/tmp/modujo-domain-bs128-logging', warmup_ratio=0.0)"
359
+ }
pretrain/Modujo-1B-A0.75B-checkpoint-78900/chat_template.jinja ADDED
@@ -0,0 +1,170 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {%- set image_count = namespace(value=0) %}
2
+ {%- set video_count = namespace(value=0) %}
3
+ {%- macro render_content(content, do_vision_count, is_system_content=false) %}
4
+ {%- if content is string %}
5
+ {{- content }}
6
+ {%- elif content is iterable and content is not mapping %}
7
+ {%- for item in content %}
8
+ {%- if 'image' in item or 'image_url' in item or item.type == 'image' %}
9
+ {%- if is_system_content %}
10
+ {{- raise_exception('System message cannot contain images.') }}
11
+ {%- endif %}
12
+ {%- if do_vision_count %}
13
+ {%- set image_count.value = image_count.value + 1 %}
14
+ {%- endif %}
15
+ {%- if add_vision_id %}
16
+ {{- 'Picture ' ~ image_count.value ~ ': ' }}
17
+ {%- endif %}
18
+ {{- '<|vision_start|><|image_pad|><|vision_end|>' }}
19
+ {%- elif 'video' in item or item.type == 'video' %}
20
+ {%- if is_system_content %}
21
+ {{- raise_exception('System message cannot contain videos.') }}
22
+ {%- endif %}
23
+ {%- if do_vision_count %}
24
+ {%- set video_count.value = video_count.value + 1 %}
25
+ {%- endif %}
26
+ {%- if add_vision_id %}
27
+ {{- 'Video ' ~ video_count.value ~ ': ' }}
28
+ {%- endif %}
29
+ {{- '<|vision_start|><|video_pad|><|vision_end|>' }}
30
+ {%- elif 'text' in item %}
31
+ {{- item.text }}
32
+ {%- else %}
33
+ {{- raise_exception('Unexpected item type in content.') }}
34
+ {%- endif %}
35
+ {%- endfor %}
36
+ {%- elif content is none or content is undefined %}
37
+ {{- '' }}
38
+ {%- else %}
39
+ {{- raise_exception('Unexpected content type.') }}
40
+ {%- endif %}
41
+ {%- endmacro %}
42
+ {%- if not messages %}
43
+ {{- raise_exception('No messages provided.') }}
44
+ {%- endif %}
45
+ {%- set reasoning_instructions = '' %}
46
+ {%- if enable_thinking is undefined or enable_thinking is true %}
47
+ {%- set resolved_reasoning_effort = reasoning_effort|default('xhigh') %}
48
+ {%- if resolved_reasoning_effort not in ('xhigh', 'medium', 'low') %}
49
+ {{- raise_exception('Unexpected reasoning effort ' ~ reasoning_effort ~ '. Supported types are xhigh (default), medium, and low.') }}
50
+ {%- endif %}
51
+ {%- if resolved_reasoning_effort == 'xhigh' %}
52
+ {%- set reasoning_instructions = 'Reasoning effort is set to xhigh. Please think carefully through the task, validate key assumptions, consider plausible alternatives, and prioritize correctness, consistency, and clarity in the final answer.' %}
53
+ {%- elif resolved_reasoning_effort == 'low' %}
54
+ {%- set reasoning_instructions = 'Reasoning effort is set to low. Keep your thinking brief and focused, moving directly to the conclusion without unnecessary elaboration.' %}
55
+ {%- endif %}
56
+ {%- endif %}
57
+ {%- if tools and tools is iterable and tools is not mapping %}
58
+ {{- '<|im_start|>system\n' }}
59
+ {%- if reasoning_instructions %}
60
+ {{- reasoning_instructions + '\n\n' }}
61
+ {%- endif %}
62
+ {{- "# Tools\n\nYou have access to the following functions:\n\n<tools>" }}
63
+ {%- for tool in tools %}
64
+ {{- "\n" }}
65
+ {{- tool | tojson }}
66
+ {%- endfor %}
67
+ {{- "\n</tools>" }}
68
+ {{- '\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n<tool_call>\n<function=example_function_name>\n<parameter=example_parameter_1>\nvalue_1\n</parameter>\n<parameter=example_parameter_2>\nThis is the value for the second parameter\nthat can span\nmultiple lines\n</parameter>\n</function>\n</tool_call>\n\n<IMPORTANT>\nReminder:\n- Function calls MUST follow the specified format: an inner <function=...></function> block must be nested within <tool_call></tool_call> XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls\n</IMPORTANT>' }}
69
+ {%- if messages[0].role == 'system' %}
70
+ {%- set content = render_content(messages[0].content, false, true)|trim %}
71
+ {%- if content %}
72
+ {{- '\n\n' + content }}
73
+ {%- endif %}
74
+ {%- endif %}
75
+ {{- '<|im_end|>\n' }}
76
+ {%- else %}
77
+ {%- if messages[0].role == 'system' %}
78
+ {%- set content = render_content(messages[0].content, false, true)|trim %}
79
+ {%- if content %}
80
+ {{- '<|im_start|>system\n' + (reasoning_instructions + '\n\n' if reasoning_instructions else '') + content + '<|im_end|>\n' }}
81
+ {%- elif reasoning_instructions %}
82
+ {{- '<|im_start|>system\n' + reasoning_instructions + '<|im_end|>\n' }}
83
+ {%- endif %}
84
+ {%- elif reasoning_instructions %}
85
+ {{- '<|im_start|>system\n' + reasoning_instructions + '<|im_end|>\n' }}
86
+ {%- endif %}
87
+ {%- endif %}
88
+ {%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}
89
+ {%- for message in messages[::-1] %}
90
+ {%- set index = (messages|length - 1) - loop.index0 %}
91
+ {%- if ns.multi_step_tool and message.role == "user" %}
92
+ {%- set content = render_content(message.content, false)|trim %}
93
+ {%- if not(content.startswith('<tool_response>') and content.endswith('</tool_response>')) %}
94
+ {%- set ns.multi_step_tool = false %}
95
+ {%- set ns.last_query_index = index %}
96
+ {%- endif %}
97
+ {%- endif %}
98
+ {%- endfor %}
99
+ {%- if ns.multi_step_tool %}
100
+ {{- raise_exception('No user query found in messages.') }}
101
+ {%- endif %}
102
+ {%- for message in messages %}
103
+ {%- set content = render_content(message.content, true)|trim %}
104
+ {%- if message.role == "system" %}
105
+ {%- if not loop.first %}
106
+ {{- raise_exception('System message must be at the beginning.') }}
107
+ {%- endif %}
108
+ {%- elif message.role == "user" %}
109
+ {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }}
110
+ {%- elif message.role == "assistant" %}
111
+ {%- set reasoning_content = '' %}
112
+ {%- if message.reasoning_content is string %}
113
+ {%- set reasoning_content = message.reasoning_content %}
114
+ {%- endif %}
115
+ {%- set reasoning_content = reasoning_content|trim %}
116
+ {%- if preserve_thinking is undefined or preserve_thinking is true or loop.index0 > ns.last_query_index %}
117
+ {{- '<|im_start|>' + message.role + '\n<think>\n' + reasoning_content + '\n</think>\n\n' + content }}
118
+ {%- else %}
119
+ {{- '<|im_start|>' + message.role + '\n' + content }}
120
+ {%- endif %}
121
+ {%- if message.tool_calls and message.tool_calls is iterable and message.tool_calls is not mapping %}
122
+ {%- for tool_call in message.tool_calls %}
123
+ {%- if tool_call.function is defined %}
124
+ {%- set tool_call = tool_call.function %}
125
+ {%- endif %}
126
+ {%- if loop.first %}
127
+ {%- if content|trim %}
128
+ {{- '\n\n<tool_call>\n<function=' + tool_call.name + '>\n' }}
129
+ {%- else %}
130
+ {{- '<tool_call>\n<function=' + tool_call.name + '>\n' }}
131
+ {%- endif %}
132
+ {%- else %}
133
+ {{- '\n<tool_call>\n<function=' + tool_call.name + '>\n' }}
134
+ {%- endif %}
135
+ {%- if tool_call.arguments is defined and tool_call.arguments != '' %}
136
+ {%- for args_name, args_value in tool_call.arguments|items %}
137
+ {{- '<parameter=' + args_name + '>\n' }}
138
+ {%- set args_value = args_value | string if args_value is string else args_value | tojson | safe %}
139
+ {{- args_value }}
140
+ {{- '\n</parameter>\n' }}
141
+ {%- endfor %}
142
+ {%- endif %}
143
+ {{- '</function>\n</tool_call>' }}
144
+ {%- endfor %}
145
+ {%- endif %}
146
+ {{- '<|im_end|>\n' }}
147
+ {%- elif message.role == "tool" %}
148
+ {%- if loop.previtem and loop.previtem.role != "tool" %}
149
+ {{- '<|im_start|>user' }}
150
+ {%- endif %}
151
+ {{- '\n<tool_response>\n' }}
152
+ {{- content }}
153
+ {{- '\n</tool_response>' }}
154
+ {%- if not loop.last and loop.nextitem.role != "tool" %}
155
+ {{- '<|im_end|>\n' }}
156
+ {%- elif loop.last %}
157
+ {{- '<|im_end|>\n' }}
158
+ {%- endif %}
159
+ {%- else %}
160
+ {{- raise_exception('Unexpected message role.') }}
161
+ {%- endif %}
162
+ {%- endfor %}
163
+ {%- if add_generation_prompt %}
164
+ {{- '<|im_start|>assistant\n' }}
165
+ {%- if enable_thinking is defined and enable_thinking is false %}
166
+ {{- '<think>\n\n</think>\n\n' }}
167
+ {%- else %}
168
+ {{- '<think>\n' }}
169
+ {%- endif %}
170
+ {%- endif %}
pretrain/Modujo-1B-A0.75B-checkpoint-78900/config.json ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "Qwen4ExpForCausalLM"
4
+ ],
5
+ "attention_bias": false,
6
+ "attention_dropout": 0.0,
7
+ "bos_token_id": null,
8
+ "dtype": "bfloat16",
9
+ "eos_token_id": 248046,
10
+ "experts_impl": "grouped_mm",
11
+ "hc_count": 4,
12
+ "hc_lowrank": 96,
13
+ "head_dim": 64,
14
+ "heads_per_ngram": 6,
15
+ "hidden_act": "silu",
16
+ "hidden_size": 768,
17
+ "indexer_budget": null,
18
+ "indexer_compress_ratio": null,
19
+ "indexer_head_dim": null,
20
+ "indexer_kv_heads": null,
21
+ "indexer_n_heads": null,
22
+ "initializer_range": 0.02,
23
+ "layer_types": [
24
+ "linear_attention",
25
+ "linear_attention",
26
+ "linear_attention",
27
+ "qwen_sparse_attention",
28
+ "linear_attention",
29
+ "linear_attention",
30
+ "linear_attention",
31
+ "qwen_sparse_attention",
32
+ "linear_attention",
33
+ "linear_attention",
34
+ "linear_attention",
35
+ "qwen_sparse_attention",
36
+ "linear_attention",
37
+ "linear_attention",
38
+ "linear_attention",
39
+ "qwen_sparse_attention",
40
+ "linear_attention",
41
+ "linear_attention",
42
+ "linear_attention",
43
+ "qwen_sparse_attention",
44
+ "linear_attention",
45
+ "linear_attention",
46
+ "linear_attention",
47
+ "qwen_sparse_attention",
48
+ "linear_attention",
49
+ "linear_attention",
50
+ "linear_attention",
51
+ "qwen_sparse_attention",
52
+ "linear_attention",
53
+ "linear_attention",
54
+ "linear_attention",
55
+ "qwen_sparse_attention",
56
+ "linear_attention",
57
+ "linear_attention",
58
+ "linear_attention",
59
+ "qwen_sparse_attention"
60
+ ],
61
+ "linear_conv_kernel_dim": 4,
62
+ "linear_key_head_dim": 64,
63
+ "linear_num_key_heads": 6,
64
+ "linear_num_value_heads": 12,
65
+ "linear_value_head_dim": 64,
66
+ "make_ngram_vocab_size_divisible_by": 128,
67
+ "max_position_embeddings": 32768,
68
+ "model_type": "qwen4_exp_text",
69
+ "moe_intermediate_size": 512,
70
+ "ngram_size": 3,
71
+ "ngram_vocab_size_base": 144128,
72
+ "norm_topk_prob": true,
73
+ "num_attention_heads": 12,
74
+ "num_experts": 8,
75
+ "num_experts_per_tok": 2,
76
+ "num_hidden_layers": 36,
77
+ "num_key_value_heads": 2,
78
+ "number_of_conv_states": 3,
79
+ "output_gate_type": "sigmoid",
80
+ "output_router_logits": false,
81
+ "pad_token_id": 248044,
82
+ "ple_conv_kernel_size": 4,
83
+ "ple_embed_dim": 768,
84
+ "ple_layer_ids": [
85
+ 2
86
+ ],
87
+ "rms_norm_eps": 1e-06,
88
+ "rope_parameters": {
89
+ "partial_rotary_factor": 0.25,
90
+ "rope_theta": 10000000,
91
+ "rope_type": "default"
92
+ },
93
+ "router_aux_loss_coef": 0.001,
94
+ "seed": 1234,
95
+ "shared_expert_intermediate_size": 512,
96
+ "split_ngram_parts": 128,
97
+ "tie_word_embeddings": false,
98
+ "transformers_version": "5.16.1",
99
+ "use_cache": false,
100
+ "vocab_size": 248320
101
+ }
pretrain/Modujo-1B-A0.75B-checkpoint-78900/generation_config.json ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 248044,
4
+ "eos_token_id": [
5
+ 248044,
6
+ 248046
7
+ ],
8
+ "output_attentions": false,
9
+ "output_hidden_states": false,
10
+ "pad_token_id": 248044,
11
+ "transformers_version": "5.16.1",
12
+ "use_cache": true
13
+ }
pretrain/Modujo-1B-A0.75B-checkpoint-78900/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:36bd33866a419c71baff164414a51ea521f118c1fbc3bcc68d8d97110e0554be
3
+ size 2007748816
pretrain/Modujo-1B-A0.75B-checkpoint-78900/tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:06b9509352d2af50381ab2247e083b80d32d5c0aba91c272ca9ff729b6a0e523
3
+ size 19989325
pretrain/Modujo-1B-A0.75B-checkpoint-78900/tokenizer_config.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "audio_bos_token": "<|audio_start|>",
4
+ "audio_eos_token": "<|audio_end|>",
5
+ "audio_token": "<|audio_pad|>",
6
+ "backend": "tokenizers",
7
+ "bos_token": null,
8
+ "clean_up_tokenization_spaces": false,
9
+ "eos_token": "<|im_end|>",
10
+ "errors": "replace",
11
+ "image_token": "<|image_pad|>",
12
+ "is_local": true,
13
+ "local_files_only": false,
14
+ "model_max_length": 262144,
15
+ "model_specific_special_tokens": {
16
+ "audio_bos_token": "<|audio_start|>",
17
+ "audio_eos_token": "<|audio_end|>",
18
+ "audio_token": "<|audio_pad|>",
19
+ "image_token": "<|image_pad|>",
20
+ "video_token": "<|video_pad|>",
21
+ "vision_bos_token": "<|vision_start|>",
22
+ "vision_eos_token": "<|vision_end|>"
23
+ },
24
+ "pad_token": "<|endoftext|>",
25
+ "pretokenize_regex": "(?i:'s|'t|'re|'ve|'m|'ll|'d)|[^\\r\\n\\p{L}\\p{N}]?[\\p{L}\\p{M}]+|\\p{N}| ?[^\\s\\p{L}\\p{M}\\p{N}]+[\\r\\n]*|\\s*[\\r\\n]+|\\s+(?!\\S)|\\s+",
26
+ "split_special_tokens": false,
27
+ "tokenizer_class": "Qwen2Tokenizer",
28
+ "unk_token": null,
29
+ "video_token": "<|video_pad|>",
30
+ "vision_bos_token": "<|vision_start|>",
31
+ "vision_eos_token": "<|vision_end|>"
32
+ }