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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
{
  "use_ray": false,
  "ray_exp_name": null,
  "device_groups": null,
  "model": "Qwen3-8B-VL-Instruct",
  "model_type": "qwen3_vl",
  "model_revision": null,
  "task_type": "causal_lm",
  "torch_dtype": "bfloat16",
  "attn_impl": null,
  "experts_impl": null,
  "new_special_tokens": [],
  "num_labels": null,
  "problem_type": null,
  "rope_scaling": null,
  "device_map": null,
  "max_memory": {},
  "max_model_len": null,
  "local_repo_path": null,
  "init_strategy": null,
  "template": "qwen3_vl",
  "system": null,
  "max_length": 28672,
  "truncation_strategy": "left",
  "max_pixels": null,
  "agent_template": null,
  "norm_bbox": null,
  "use_chat_template": true,
  "padding_side": "right",
  "padding_free": true,
  "loss_scale": "last_round",
  "sequence_parallel_size": 1,
  "template_backend": "swift",
  "response_prefix": null,
  "enable_thinking": null,
  "add_non_thinking_prefix": true,
  "dataset": [
    "TrainSetData/PreferencePairs/data/video_homels_qwen3vl_instruct_1k_image_list_sampled_filtered.jsonl",
    "TrainSetData/PreferencePairs/data/video_homels_qwen3vl_instruct_2k_image_list_sampled_filtered.jsonl",
    "TrainSetData/PreferencePairs/data/qwen3vl_instruct_pairs_10k_image_list_sampled_filtered.jsonl",
    "TrainSetData/PreferencePairs/data/qwen3vl_thinking_paris_20k_image_list_sampled_filtered.jsonl",
    "TrainSetData/PreferencePairs/data/r1_reward_17k.jsonl",
    "TrainSetData/PreferencePairs/data/llava_critic_r1_35k.jsonl",
    "TrainSetData/PreferencePairs/data/omni_rlaifv.jsonl",
    "TrainSetData/PreferencePairs/data/omni_vlfeedback.jsonl",
    "TrainSetData/PreferencePairs/data/omnialign.jsonl"
  ],
  "val_dataset": [],
  "cached_dataset": [],
  "cached_val_dataset": [],
  "split_dataset_ratio": 0.0,
  "data_seed": 42,
  "dataset_num_proc": 1,
  "load_from_cache_file": false,
  "dataset_shuffle": true,
  "val_dataset_shuffle": false,
  "streaming": false,
  "interleave_prob": null,
  "stopping_strategy": "first_exhausted",
  "shuffle_buffer_size": 1000,
  "download_mode": "reuse_dataset_if_exists",
  "columns": {},
  "strict": false,
  "remove_unused_columns": false,
  "model_name": null,
  "model_author": null,
  "custom_dataset_info": [],
  "quant_method": null,
  "quant_bits": null,
  "hqq_axis": null,
  "bnb_4bit_compute_dtype": "bfloat16",
  "bnb_4bit_quant_type": "nf4",
  "bnb_4bit_use_double_quant": true,
  "bnb_4bit_quant_storage": null,
  "max_new_tokens": null,
  "temperature": 1.0,
  "top_k": 50,
  "top_p": 0.9,
  "repetition_penalty": 1.0,
  "num_beams": 1,
  "stream": false,
  "stop_words": [],
  "logprobs": false,
  "top_logprobs": null,
  "structured_outputs_regex": null,
  "tuner_backend": "peft",
  "tuner_type": "full",
  "train_type": null,
  "adapters": [],
  "external_plugins": [
    "ms-swift/examples/train/grpo/plugin/plugin.py"
  ],
  "custom_register_path": [],
  "seed": 42,
  "model_kwargs": {},
  "load_args": false,
  "load_data_args": false,
  "packing": false,
  "packing_length": null,
  "packing_num_proc": 1,
  "lazy_tokenize": true,
  "use_hf": false,
  "hub_token": null,
  "ddp_timeout": 18000000,
  "ddp_backend": "nccl",
  "ignore_args_error": false,
  "use_swift_lora": false,
  "freeze_llm": false,
  "freeze_vit": true,
  "freeze_aligner": false,
  "freeze_parameters": [
    "visual.visual"
  ],
  "freeze_parameters_regex": null,
  "freeze_parameters_ratio": 0.0,
  "trainable_parameters": [
    "visual.visual.merger",
    "visual.visual.deepstack_merger_list"
  ],
  "trainable_parameters_regex": null,
  "target_modules": [
    "all-linear"
  ],
  "target_regex": null,
  "modules_to_save": [],
  "lora_rank": 8,
  "lora_alpha": 32,
  "lora_dropout": 0.05,
  "lora_bias": "none",
  "lora_dtype": null,
  "use_rslora": false,
  "rlhf_type": "grpo",
  "loss_type": "grpo",
  "mcore_ref_model": null,
  "mcore_ref_adapter": null,
  "beta": 0.001,
  "rpo_alpha": null,
  "reference_free": false,
  "label_smoothing": 0.0,
  "f_divergence_type": "reverse_kl",
  "desirable_weight": 1.0,
  "undesirable_weight": 1.0,
  "calculate_KL": null,
  "center_rewards_coefficient": null,
  "teacher_model": null,
  "teacher_model_type": null,
  "teacher_model_revision": null,
  "teacher_model_server": null,
  "gkd_logits_topk": null,
  "lmbda": 0.5,
  "seq_kd": false,
  "offload_teacher_model": false,
  "sft_alpha": 0.0,
  "generation_batch_size": 512,
  "steps_per_generation": 4,
  "num_generations": 4,
  "num_generations_eval": null,
  "max_completion_length": 4096,
  "importance_sampling_level": "token",
  "tau_pos": 1.0,
  "tau_neg": 1.05,
  "epsilon": 0.2,
  "epsilon_high": 0.2,
  "delta": null,
  "use_vllm": true,
  "vllm_mode": "colocate",
  "vllm_enable_prefix_caching": true,
  "vllm_gpu_memory_utilization": 0.8,
  "vllm_tensor_parallel_size": 8,
  "vllm_max_model_len": 32768,
  "vllm_enforce_eager": false,
  "vllm_limit_mm_per_prompt": null,
  "vllm_disable_cascade_attn": false,
  "vllm_max_num_seqs": null,
  "vllm_mm_processor_cache_gb": null,
  "vllm_engine_kwargs": {},
  "sleep_level": 2,
  "offload_optimizer": true,
  "offload_model": true,
  "offload_bridge": false,
  "vllm_server_base_url": null,
  "vllm_server_host": null,
  "vllm_server_port": [
    8000
  ],
  "vllm_server_timeout": 240.0,
  "vllm_server_group_port": null,
  "reward_funcs": [
    "external_pair_judge_reward"
  ],
  "reward_weights": null,
  "cosine_min_len_value_wrong": -0.5,
  "cosine_max_len_value_wrong": 0.0,
  "cosine_min_len_value_correct": 1.0,
  "cosine_max_len_value_correct": 0.5,
  "cosine_max_len": null,
  "repetition_n_grams": 3,
  "repetition_max_penalty": -1.0,
  "soft_max_length": null,
  "soft_cache_length": null,
  "dynamic_sample": false,
  "max_resample_times": 3,
  "overlong_filter": true,
  "scale_rewards": "group",
  "advantage_estimator": "grpo",
  "kl_in_reward": false,
  "wandb_log_unique_prompts": null,
  "log_completions": true,
  "rollout_importance_sampling_mode": null,
  "rollout_importance_sampling_threshold": 2.0,
  "log_rollout_offpolicy_metrics": false,
  "off_policy_sequence_mask_delta": null,
  "log_entropy": false,
  "top_entropy_quantile": 1.0,
  "reward_model": null,
  "reward_model_plugin": null,
  "sync_ref_model": false,
  "ref_model_sync_steps": 512,
  "ref_model_mixup_alpha": 0.6,
  "async_generate": false,
  "move_model_batches": null,
  "multi_turn_scheduler": null,
  "max_turns": null,
  "completion_length_limit_scope": "per_round",
  "vllm_server_pass_dataset": false,
  "num_iterations": 1,
  "micro_batch_size": 1,
  "global_batch_size": 128,
  "recompute_granularity": "selective",
  "recompute_method": null,
  "recompute_num_layers": null,
  "recompute_modules": [
    "core_attn"
  ],
  "train_iters": null,
  "num_train_epochs": 2,
  "masked_softmax_fusion": true,
  "bias_dropout_fusion": true,
  "bias_activation_fusion": true,
  "apply_rope_fusion": false,
  "gradient_accumulation_fusion": true,
  "cross_entropy_loss_fusion": true,
  "cross_entropy_fusion_impl": "te",
  "calculate_per_token_loss": false,
  "attention_backend": "<AttnBackend.flash: 1>",
  "optimizer": "adam",
  "optimizer_cpu_offload": false,
  "optimizer_offload_fraction": 1.0,
  "use_precision_aware_optimizer": false,
  "main_grads_dtype": "float32",
  "main_params_dtype": "float32",
  "exp_avg_dtype": "float32",
  "exp_avg_sq_dtype": "float32",
  "manual_gc": false,
  "manual_gc_steps": 0,
  "manual_gc_eval": true,
  "train_dataloader_shuffle": true,
  "dataloader_num_workers": 1,
  "dataloader_pin_memory": true,
  "dataloader_persistent_workers": true,
  "dataloader_prefetch_factor": 2,
  "data_sharding": false,
  "group_by_length": false,
  "te_rng_tracker": false,
  "data_parallel_random_init": false,
  "mlp_padding_free": false,
  "lr_warmup_init": 0.0,
  "lr": 1e-06,
  "lr_decay_style": "cosine",
  "lr_decay_iters": null,
  "lr_warmup_iters": 0,
  "lr_warmup_fraction": null,
  "min_lr": 0,
  "lr_wsd_decay_style": "exponential",
  "lr_wsd_decay_iters": null,
  "weight_decay": 0.1,
  "weight_decay_incr_style": "constant",
  "start_weight_decay": 0.1,
  "end_weight_decay": 0.1,
  "clip_grad": 1.0,
  "adam_beta1": 0.9,
  "adam_beta2": 0.95,
  "adam_eps": 1e-08,
  "sgd_momentum": 0.9,
  "output_dir": "./checkpoint",
  "save_steps": 100,
  "no_save_optim": true,
  "no_save_rng": true,
  "mcore_model": null,
  "mcore_adapter": null,
  "no_load_optim": false,
  "no_load_rng": false,
  "finetune": true,
  "perform_initialization": false,
  "use_cpu_initialization": false,
  "async_save": false,
  "save_total_limit": null,
  "metric_for_best_model": "reward",
  "greater_is_better": true,
  "use_persistent_ckpt_worker": false,
  "dist_ckpt_save_pre_mcore_014": false,
  "dist_ckpt_optim_fully_reshardable": false,
  "distrib_optim_fully_reshardable_mem_efficient": false,
  "local_rank": 0,
  "use_distributed_optimizer": true,
  "tensor_model_parallel_size": 8,
  "pipeline_model_parallel_size": 1,
  "decoder_first_pipeline_num_layers": null,
  "decoder_last_pipeline_num_layers": null,
  "account_for_embedding_in_pipeline_split": false,
  "account_for_loss_in_pipeline_split": false,
  "overlap_p2p_comm": false,
  "align_param_gather": false,
  "sequence_parallel": false,
  "context_parallel_size": 1,
  "tp_comm_overlap": false,
  "overlap_grad_reduce": false,
  "overlap_param_gather": false,
  "overlap_param_gather_with_optimizer_step": false,
  "align_grad_reduce": true,
  "virtual_pipeline_model_parallel_size": null,
  "microbatch_group_size_per_vp_stage": null,
  "pipeline_model_parallel_layout": null,
  "expert_model_parallel_size": 1,
  "expert_tensor_parallel_size": 1,
  "report_to": [
    "tensorboard"
  ],
  "logging_steps": 1,
  "tensorboard_dir": "./checkpoint/runs",
  "tensorboard_queue_size": 50,
  "wandb_project": "megatron-swift",
  "wandb_exp_name": null,
  "swanlab_project": "megatron-swift",
  "swanlab_exp_name": null,
  "eval_iters": -1,
  "eval_steps": 100,
  "fp8_format": null,
  "fp8_recipe": "delayed",
  "fp8_amax_history_len": 1024,
  "fp8_amax_compute_algo": "max",
  "fp8_param_gather": false,
  "fp16": false,
  "bf16": true,
  "apply_query_key_layer_scaling": false,
  "attention_softmax_in_fp32": true,
  "accumulate_allreduce_grads_in_fp32": true,
  "moe_router_load_balancing_type": null,
  "moe_router_dtype": "fp32",
  "moe_token_dispatcher_type": null,
  "moe_enable_deepep": false,
  "moe_grouped_gemm": true,
  "moe_permute_fusion": false,
  "moe_aux_loss_coeff": 0.0,
  "moe_z_loss_coeff": null,
  "moe_shared_expert_overlap": false,
  "moe_layer_recompute": false,
  "moe_expert_capacity_factor": null,
  "moe_pad_expert_input_to_capacity": false,
  "moe_token_drop_policy": null,
  "mtp_num_layers": null,
  "mtp_loss_scaling_factor": 0.1,
  "save_safetensors": true,
  "ref_model": null,
  "ref_adapters": [],
  "merge_lora": true,
  "max_shard_size": "5GB",
  "vit_gradient_checkpointing": false,
  "vit_lr": null,
  "aligner_lr": null,
  "gradient_checkpointing_kwargs": null,
  "dsa_indexer_loss_coeff": null,
  "dsa_indexer_use_sparse_loss": false,
  "check_model": true,
  "apply_wd_to_qk_layernorm": false,
  "enable_dft_loss": false,
  "enable_channel_loss": false,
  "save_strategy": "steps",
  "callbacks": [
    "print",
    "default_flow",
    "tensorboard"
  ],
  "add_version": true,
  "create_checkpoint_symlink": false,
  "swift_version": "4.1.0.dev0",
  "ckpt_dir": null,
  "rank": 0,
  "global_world_size": 128,
  "local_world_size": 8,
  "model_suffix": "Qwen3-8B-VL-Instruct",
  "model_info": "ModelInfo(model_type='qwen3_vl', model_dir='Qwen3-8B-VL-Instruct', torch_dtype=torch.bfloat16, max_model_len=262144, quant_method=None, quant_bits=None, rope_scaling={'mrope_interleaved': True, 'mrope_section': [24, 20, 20], 'rope_type': 'default'}, is_moe_model=False, is_multimodal=True, config=None, task_type='causal_lm', num_labels=None)",
  "model_meta": "ModelMeta(model_type='qwen3_vl', model_groups=[ModelGroup(models=[Model(ms_model_id='Qwen/Qwen3-VL-2B-Instruct', hf_model_id='Qwen/Qwen3-VL-2B-Instruct', model_path=None, ms_revision=None, hf_revision=None), Model(ms_model_id='Qwen/Qwen3-VL-2B-Thinking', hf_model_id='Qwen/Qwen3-VL-2B-Thinking', model_path=None, ms_revision=None, hf_revision=None), Model(ms_model_id='Qwen/Qwen3-VL-2B-Instruct-FP8', hf_model_id='Qwen/Qwen3-VL-2B-Instruct-FP8', model_path=None, ms_revision=None, hf_revision=None), Model(ms_model_id='Qwen/Qwen3-VL-2B-Thinking-FP8', hf_model_id='Qwen/Qwen3-VL-2B-Thinking-FP8', model_path=None, ms_revision=None, hf_revision=None), Model(ms_model_id='Qwen/Qwen3-VL-4B-Instruct', hf_model_id='Qwen/Qwen3-VL-4B-Instruct', model_path=None, ms_revision=None, hf_revision=None), Model(ms_model_id='Qwen/Qwen3-VL-4B-Thinking', hf_model_id='Qwen/Qwen3-VL-4B-Thinking', model_path=None, ms_revision=None, hf_revision=None), Model(ms_model_id='Qwen/Qwen3-VL-4B-Instruct-FP8', hf_model_id='Qwen/Qwen3-VL-4B-Instruct-FP8', model_path=None, ms_revision=None, hf_revision=None), Model(ms_model_id='Qwen/Qwen3-VL-4B-Thinking-FP8', hf_model_id='Qwen/Qwen3-VL-4B-Thinking-FP8', model_path=None, ms_revision=None, hf_revision=None), Model(ms_model_id='Qwen/Qwen3-VL-8B-Instruct', hf_model_id='Qwen/Qwen3-VL-8B-Instruct', model_path=None, ms_revision=None, hf_revision=None), Model(ms_model_id='Qwen/Qwen3-VL-8B-Thinking', hf_model_id='Qwen/Qwen3-VL-8B-Thinking', model_path=None, ms_revision=None, hf_revision=None), Model(ms_model_id='Qwen/Qwen3-VL-8B-Instruct-FP8', hf_model_id='Qwen/Qwen3-VL-8B-Instruct-FP8', model_path=None, ms_revision=None, hf_revision=None), Model(ms_model_id='Qwen/Qwen3-VL-8B-Thinking-FP8', hf_model_id='Qwen/Qwen3-VL-8B-Thinking-FP8', model_path=None, ms_revision=None, hf_revision=None), Model(ms_model_id='Qwen/Qwen3-VL-32B-Instruct', hf_model_id='Qwen/Qwen3-VL-32B-Instruct', model_path=None, ms_revision=None, hf_revision=None), Model(ms_model_id='Qwen/Qwen3-VL-32B-Thinking', hf_model_id='Qwen/Qwen3-VL-32B-Thinking', model_path=None, ms_revision=None, hf_revision=None), Model(ms_model_id='Qwen/Qwen3-VL-32B-Instruct-FP8', hf_model_id='Qwen/Qwen3-VL-32B-Instruct-FP8', model_path=None, ms_revision=None, hf_revision=None), Model(ms_model_id='Qwen/Qwen3-VL-32B-Thinking-FP8', hf_model_id='Qwen/Qwen3-VL-32B-Thinking-FP8', model_path=None, ms_revision=None, hf_revision=None)], template='qwen3_vl', ignore_patterns=None, requires=None, tags=[])], loader=<class 'swift.model.models.qwen.Qwen3VLLoader'>, template=None, model_arch=MultiModelKeys(arch_name='qwen3_vl', embedding=None, module_list=None, lm_head=None, q_proj=None, k_proj=None, v_proj=None, o_proj=None, attention=None, mlp=None, down_proj=None, qkv_proj=None, qk_proj=None, qa_proj=None, qb_proj=None, kv_proj=None, kva_proj=None, kvb_proj=None, language_model=['model.language_model', 'lm_head'], aligner=['model.visual.merger', 'model.visual.deepstack_merger_list'], vision_tower=['model.visual'], generator=[]), architectures=['Qwen3VLForConditionalGeneration'], additional_saved_files=[], torch_dtype=None, is_multimodal=True, is_reward=False, task_type=None, ignore_patterns=None, requires=['transformers>=4.57', 'qwen_vl_utils>=0.0.14', 'decord'], tags=['vision', 'video'])",
  "model_dir": "Qwen3-8B-VL-Instruct",
  "template_meta": "QwenTemplateMeta(template_type='qwen3_vl', 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.templates.qwen.Qwen3VLTemplate'>, 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=False, thinking_prefix='<think>\\n', non_thinking_prefix='', history_thinking_prefix='')",
  "_val_dataset_exists": false,
  "hub": "<class 'swift.hub.hub.MSHub'>",
  "seq_length": 28672,
  "per_device_generation_batch_size": 4,
  "is_multimodal": true,
  "megatron_model_meta": "MegatronModelMeta(megatron_model_type='qwen3_vl', model_types=['qwen3_vl', 'qwen3_vl_moe', 'qwen3_vl_emb', 'qwen3_vl_reranker'], bridge_cls=<class 'swift.megatron.model.gpt_bridge.MultimodalGPTBridge'>, visual_cls=<class 'swift.megatron.model.mm_gpts.qwen3_vl.Qwen3VL_Vit'>, is_multimodal=True, loader=<class 'swift.megatron.model.mm_gpts.qwen3_vl.Qwen3VLLoader'>)",
  "fp8": null,
  "params_dtype": "bfloat16",
  "world_size": 128,
  "data_parallel_size": 16,
  "num_microbatches": 8
}