diff --git a/GSM-Hard/PD/Qwen3-1.7B/checkpoint-100/adapter_config.json b/GSM-Hard/PD/Qwen3-1.7B/checkpoint-100/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..72e5bf46c94379147b782eafb3b70915beb9e428 --- /dev/null +++ b/GSM-Hard/PD/Qwen3-1.7B/checkpoint-100/adapter_config.json @@ -0,0 +1,45 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3-1.7B", + "bias": "none", + "corda_config": null, + "ensure_weight_tying": false, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": false, + "inference_mode": true, + "init_lora_weights": true, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 64, + "lora_bias": false, + "lora_dropout": 0.05, + "lora_ga_config": null, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "peft_type": "LORA", + "peft_version": "0.19.1", + "qalora_group_size": 16, + "r": 64, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "q_proj", + "v_proj", + "k_proj", + "o_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_bdlora": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} diff --git a/GSM-Hard/PD/Qwen3-1.7B/checkpoint-100/chat_template.jinja b/GSM-Hard/PD/Qwen3-1.7B/checkpoint-100/chat_template.jinja new file mode 100644 index 0000000000000000000000000000000000000000..01be9b307daa2d425f7c168c9fb145a286e0afb4 --- /dev/null +++ b/GSM-Hard/PD/Qwen3-1.7B/checkpoint-100/chat_template.jinja @@ -0,0 +1,89 @@ +{%- if tools %} + {{- '<|im_start|>system\n' }} + {%- if messages[0].role == 'system' %} + {{- messages[0].content + '\n\n' }} + {%- endif %} + {{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within XML tags:\n" }} + {%- for tool in tools %} + {{- "\n" }} + {{- tool | tojson }} + {%- endfor %} + {{- "\n\n\nFor each function call, return a json object with function name and arguments within XML tags:\n\n{\"name\": , \"arguments\": }\n<|im_end|>\n" }} +{%- else %} + {%- if messages[0].role == 'system' %} + {{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }} + {%- endif %} +{%- endif %} +{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %} +{%- for message in messages[::-1] %} + {%- set index = (messages|length - 1) - loop.index0 %} + {%- if ns.multi_step_tool and message.role == "user" and message.content is string and not(message.content.startswith('') and message.content.endswith('')) %} + {%- set ns.multi_step_tool = false %} + {%- set ns.last_query_index = index %} + {%- endif %} +{%- endfor %} +{%- for message in messages %} + {%- if message.content is string %} + {%- set content = message.content %} + {%- else %} + {%- set content = '' %} + {%- endif %} + {%- if (message.role == "user") or (message.role == "system" and not loop.first) %} + {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }} + {%- elif message.role == "assistant" %} + {%- set reasoning_content = '' %} + {%- if message.reasoning_content is string %} + {%- set reasoning_content = message.reasoning_content %} + {%- else %} + {%- if '' in content %} + {%- set reasoning_content = content.split('')[0].rstrip('\n').split('')[-1].lstrip('\n') %} + {%- set content = content.split('')[-1].lstrip('\n') %} + {%- endif %} + {%- endif %} + {%- if loop.index0 > ns.last_query_index %} + {%- if loop.last or (not loop.last and reasoning_content) %} + {{- '<|im_start|>' + message.role + '\n\n' + reasoning_content.strip('\n') + '\n\n\n' + content.lstrip('\n') }} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- if message.tool_calls %} + {%- for tool_call in message.tool_calls %} + {%- if (loop.first and content) or (not loop.first) %} + {{- '\n' }} + {%- endif %} + {%- if tool_call.function %} + {%- set tool_call = tool_call.function %} + {%- endif %} + {{- '\n{"name": "' }} + {{- tool_call.name }} + {{- '", "arguments": ' }} + {%- if tool_call.arguments is string %} + {{- tool_call.arguments }} + {%- else %} + {{- tool_call.arguments | tojson }} + {%- endif %} + {{- '}\n' }} + {%- endfor %} + {%- endif %} + {{- '<|im_end|>\n' }} + {%- elif message.role == "tool" %} + {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %} + {{- '<|im_start|>user' }} + {%- endif %} + {{- '\n\n' }} + {{- content }} + {{- '\n' }} + {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %} + {{- '<|im_end|>\n' }} + {%- endif %} + {%- endif %} +{%- endfor %} +{%- if add_generation_prompt %} + {{- '<|im_start|>assistant\n' }} + {%- if enable_thinking is defined and enable_thinking is false %} + {{- '\n\n\n\n' }} + {%- endif %} +{%- endif %} \ No newline at end of file diff --git a/GSM-Hard/PD/Qwen3-1.7B/checkpoint-100/tokenizer_config.json b/GSM-Hard/PD/Qwen3-1.7B/checkpoint-100/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..5668a4a01433b0648bb972458de616f22f3e728e --- /dev/null +++ b/GSM-Hard/PD/Qwen3-1.7B/checkpoint-100/tokenizer_config.json @@ -0,0 +1,30 @@ +{ + "add_prefix_space": false, + "backend": "tokenizers", + "bos_token": null, + "clean_up_tokenization_spaces": false, + "eos_token": "<|im_end|>", + "errors": "replace", + "extra_special_tokens": [ + "<|im_start|>", + "<|im_end|>", + "<|object_ref_start|>", + "<|object_ref_end|>", + "<|box_start|>", + "<|box_end|>", + "<|quad_start|>", + "<|quad_end|>", + "<|vision_start|>", + "<|vision_end|>", + "<|vision_pad|>", + "<|image_pad|>", + "<|video_pad|>" + ], + "is_local": true, + "local_files_only": false, + "model_max_length": 131072, + "pad_token": "<|endoftext|>", + "split_special_tokens": false, + "tokenizer_class": "Qwen2Tokenizer", + "unk_token": null +} diff --git a/GSM-Hard/PD/Qwen3-1.7B/checkpoint-100/trainer_state.json b/GSM-Hard/PD/Qwen3-1.7B/checkpoint-100/trainer_state.json new file mode 100644 index 0000000000000000000000000000000000000000..b9bf201f0e8af688f0f767a30d4dcf321fb399ba --- /dev/null +++ b/GSM-Hard/PD/Qwen3-1.7B/checkpoint-100/trainer_state.json @@ -0,0 +1,129 @@ +{ + "best_global_step": 100, + "best_metric": 0.19244883954524994, + "best_model_checkpoint": "jca/sft_runs/gsm_fixed_a1_corr30_20260723_v3/A1/checkpoint-100", + "epoch": 1.5190839694656488, + "eval_steps": 50, + "global_step": 100, + "is_hyper_param_search": false, + "is_local_process_zero": true, + "is_world_process_zero": true, + "log_history": [ + { + "epoch": 0.15267175572519084, + "grad_norm": 3.92383074760437, + "learning_rate": 9e-06, + "loss": 1.005949115753174, + "step": 10 + }, + { + "epoch": 0.3053435114503817, + "grad_norm": 1.7584881782531738, + "learning_rate": 9.943559569286731e-06, + "loss": 0.7453500747680664, + "step": 20 + }, + { + "epoch": 0.4580152671755725, + "grad_norm": 0.460394948720932, + "learning_rate": 9.75009217427352e-06, + "loss": 0.4468539714813232, + "step": 30 + }, + { + "epoch": 0.6106870229007634, + "grad_norm": 0.6909489631652832, + "learning_rate": 9.424289624237143e-06, + "loss": 0.372265100479126, + "step": 40 + }, + { + "epoch": 0.7633587786259542, + "grad_norm": 0.45923224091529846, + "learning_rate": 8.975228612720415e-06, + "loss": 0.32600500583648684, + "step": 50 + }, + { + "epoch": 0.7633587786259542, + "eval_loss": 0.3334939479827881, + "eval_runtime": 24.3983, + "eval_samples_per_second": 4.509, + "eval_steps_per_second": 0.574, + "step": 50 + }, + { + "epoch": 0.916030534351145, + "grad_norm": 0.3928168714046478, + "learning_rate": 8.415419751390155e-06, + "loss": 0.2812504768371582, + "step": 60 + }, + { + "epoch": 1.0610687022900764, + "grad_norm": 0.3847449719905853, + "learning_rate": 7.760459030751285e-06, + "loss": 0.23557162284851074, + "step": 70 + }, + { + "epoch": 1.213740458015267, + "grad_norm": 0.3150196671485901, + "learning_rate": 7.028593323773819e-06, + "loss": 0.20195598602294923, + "step": 80 + }, + { + "epoch": 1.366412213740458, + "grad_norm": 0.23515599966049194, + "learning_rate": 6.240212037280967e-06, + "loss": 0.17259205579757692, + "step": 90 + }, + { + "epoch": 1.5190839694656488, + "grad_norm": 0.21412938833236694, + "learning_rate": 5.41727907343245e-06, + "loss": 0.17539703845977783, + "step": 100 + }, + { + "epoch": 1.5190839694656488, + "eval_loss": 0.19244883954524994, + "eval_runtime": 27.6371, + "eval_samples_per_second": 3.98, + "eval_steps_per_second": 0.507, + "step": 100 + } + ], + "logging_steps": 10, + "max_steps": 198, + "num_input_tokens_seen": 0, + "num_train_epochs": 3, + "save_steps": 50, + "stateful_callbacks": { + "EarlyStoppingCallback": { + "args": { + "early_stopping_patience": 3, + "early_stopping_threshold": 0.0 + }, + "attributes": { + "early_stopping_patience_counter": 0 + } + }, + "TrainerControl": { + "args": { + "should_epoch_stop": false, + "should_evaluate": false, + "should_log": false, + "should_save": true, + "should_training_stop": false + }, + "attributes": {} + } + }, + "total_flos": 2.450893022691328e+16, + "train_batch_size": 1, + "trial_name": null, + "trial_params": null +} diff --git a/GSM-Hard/PD/Qwen3-1.7B/checkpoint-150/adapter_config.json b/GSM-Hard/PD/Qwen3-1.7B/checkpoint-150/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..72e5bf46c94379147b782eafb3b70915beb9e428 --- /dev/null +++ b/GSM-Hard/PD/Qwen3-1.7B/checkpoint-150/adapter_config.json @@ -0,0 +1,45 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3-1.7B", + "bias": "none", + "corda_config": null, + "ensure_weight_tying": false, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": false, + "inference_mode": true, + "init_lora_weights": true, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 64, + "lora_bias": false, + "lora_dropout": 0.05, + "lora_ga_config": null, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "peft_type": "LORA", + "peft_version": "0.19.1", + "qalora_group_size": 16, + "r": 64, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "q_proj", + "v_proj", + "k_proj", + "o_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_bdlora": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} diff --git a/GSM-Hard/PD/Qwen3-1.7B/checkpoint-150/tokenizer_config.json b/GSM-Hard/PD/Qwen3-1.7B/checkpoint-150/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..5668a4a01433b0648bb972458de616f22f3e728e --- /dev/null +++ b/GSM-Hard/PD/Qwen3-1.7B/checkpoint-150/tokenizer_config.json @@ -0,0 +1,30 @@ +{ + "add_prefix_space": false, + "backend": "tokenizers", + "bos_token": null, + "clean_up_tokenization_spaces": false, + "eos_token": "<|im_end|>", + "errors": "replace", + "extra_special_tokens": [ + "<|im_start|>", + "<|im_end|>", + "<|object_ref_start|>", + "<|object_ref_end|>", + "<|box_start|>", + "<|box_end|>", + "<|quad_start|>", + "<|quad_end|>", + "<|vision_start|>", + "<|vision_end|>", + "<|vision_pad|>", + "<|image_pad|>", + "<|video_pad|>" + ], + "is_local": true, + "local_files_only": false, + "model_max_length": 131072, + "pad_token": "<|endoftext|>", + "split_special_tokens": false, + "tokenizer_class": "Qwen2Tokenizer", + "unk_token": null +} diff --git a/GSM-Hard/PD/Qwen3-1.7B/checkpoint-150/trainer_state.json b/GSM-Hard/PD/Qwen3-1.7B/checkpoint-150/trainer_state.json new file mode 100644 index 0000000000000000000000000000000000000000..310b7f000ac0a515f939770c8d5a48c675cd13dc --- /dev/null +++ b/GSM-Hard/PD/Qwen3-1.7B/checkpoint-150/trainer_state.json @@ -0,0 +1,172 @@ +{ + "best_global_step": 150, + "best_metric": 0.18400055170059204, + "best_model_checkpoint": "jca/sft_runs/gsm_fixed_a1_corr30_20260723_v3/A1/checkpoint-150", + "epoch": 2.2748091603053435, + "eval_steps": 50, + "global_step": 150, + "is_hyper_param_search": false, + "is_local_process_zero": true, + "is_world_process_zero": true, + "log_history": [ + { + "epoch": 0.15267175572519084, + "grad_norm": 3.92383074760437, + "learning_rate": 9e-06, + "loss": 1.005949115753174, + "step": 10 + }, + { + "epoch": 0.3053435114503817, + "grad_norm": 1.7584881782531738, + "learning_rate": 9.943559569286731e-06, + "loss": 0.7453500747680664, + "step": 20 + }, + { + "epoch": 0.4580152671755725, + "grad_norm": 0.460394948720932, + "learning_rate": 9.75009217427352e-06, + "loss": 0.4468539714813232, + "step": 30 + }, + { + "epoch": 0.6106870229007634, + "grad_norm": 0.6909489631652832, + "learning_rate": 9.424289624237143e-06, + "loss": 0.372265100479126, + "step": 40 + }, + { + "epoch": 0.7633587786259542, + "grad_norm": 0.45923224091529846, + "learning_rate": 8.975228612720415e-06, + "loss": 0.32600500583648684, + "step": 50 + }, + { + "epoch": 0.7633587786259542, + "eval_loss": 0.3334939479827881, + "eval_runtime": 24.3983, + "eval_samples_per_second": 4.509, + "eval_steps_per_second": 0.574, + "step": 50 + }, + { + "epoch": 0.916030534351145, + "grad_norm": 0.3928168714046478, + "learning_rate": 8.415419751390155e-06, + "loss": 0.2812504768371582, + "step": 60 + }, + { + "epoch": 1.0610687022900764, + "grad_norm": 0.3847449719905853, + "learning_rate": 7.760459030751285e-06, + "loss": 0.23557162284851074, + "step": 70 + }, + { + "epoch": 1.213740458015267, + "grad_norm": 0.3150196671485901, + "learning_rate": 7.028593323773819e-06, + "loss": 0.20195598602294923, + "step": 80 + }, + { + "epoch": 1.366412213740458, + "grad_norm": 0.23515599966049194, + "learning_rate": 6.240212037280967e-06, + "loss": 0.17259205579757692, + "step": 90 + }, + { + "epoch": 1.5190839694656488, + "grad_norm": 0.21412938833236694, + "learning_rate": 5.41727907343245e-06, + "loss": 0.17539703845977783, + "step": 100 + }, + { + "epoch": 1.5190839694656488, + "eval_loss": 0.19244883954524994, + "eval_runtime": 27.6371, + "eval_samples_per_second": 3.98, + "eval_steps_per_second": 0.507, + "step": 100 + }, + { + "epoch": 1.6717557251908397, + "grad_norm": 0.2110864818096161, + "learning_rate": 4.582720926567552e-06, + "loss": 0.167664098739624, + "step": 110 + }, + { + "epoch": 1.8244274809160306, + "grad_norm": 0.21078349649906158, + "learning_rate": 3.7597879627190337e-06, + "loss": 0.155253803730011, + "step": 120 + }, + { + "epoch": 1.9770992366412212, + "grad_norm": 0.20377536118030548, + "learning_rate": 2.9714066762261825e-06, + "loss": 0.1621570587158203, + "step": 130 + }, + { + "epoch": 2.122137404580153, + "grad_norm": 0.20074774324893951, + "learning_rate": 2.2395409692487174e-06, + "loss": 0.16617317199707032, + "step": 140 + }, + { + "epoch": 2.2748091603053435, + "grad_norm": 0.21171730756759644, + "learning_rate": 1.5845802486098461e-06, + "loss": 0.16301510334014893, + "step": 150 + }, + { + "epoch": 2.2748091603053435, + "eval_loss": 0.18400055170059204, + "eval_runtime": 25.5839, + "eval_samples_per_second": 4.3, + "eval_steps_per_second": 0.547, + "step": 150 + } + ], + "logging_steps": 10, + "max_steps": 198, + "num_input_tokens_seen": 0, + "num_train_epochs": 3, + "save_steps": 50, + "stateful_callbacks": { + "EarlyStoppingCallback": { + "args": { + "early_stopping_patience": 3, + "early_stopping_threshold": 0.0 + }, + "attributes": { + "early_stopping_patience_counter": 0 + } + }, + "TrainerControl": { + "args": { + "should_epoch_stop": false, + "should_evaluate": false, + "should_log": false, + "should_save": true, + "should_training_stop": false + }, + "attributes": {} + } + }, + "total_flos": 3.66872391277609e+16, + "train_batch_size": 1, + "trial_name": null, + "trial_params": null +} diff --git a/GSM-Hard/PD/Qwen3-1.7B/checkpoint-198/adapter_config.json b/GSM-Hard/PD/Qwen3-1.7B/checkpoint-198/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..72e5bf46c94379147b782eafb3b70915beb9e428 --- /dev/null +++ b/GSM-Hard/PD/Qwen3-1.7B/checkpoint-198/adapter_config.json @@ -0,0 +1,45 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3-1.7B", + "bias": "none", + "corda_config": null, + "ensure_weight_tying": false, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": false, + "inference_mode": true, + "init_lora_weights": true, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 64, + "lora_bias": false, + "lora_dropout": 0.05, + "lora_ga_config": null, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "peft_type": "LORA", + "peft_version": "0.19.1", + "qalora_group_size": 16, + "r": 64, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "q_proj", + "v_proj", + "k_proj", + "o_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_bdlora": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} diff --git a/GSM-Hard/PD/Qwen3-1.7B/checkpoint-198/chat_template.jinja b/GSM-Hard/PD/Qwen3-1.7B/checkpoint-198/chat_template.jinja new file mode 100644 index 0000000000000000000000000000000000000000..01be9b307daa2d425f7c168c9fb145a286e0afb4 --- /dev/null +++ b/GSM-Hard/PD/Qwen3-1.7B/checkpoint-198/chat_template.jinja @@ -0,0 +1,89 @@ +{%- if tools %} + {{- '<|im_start|>system\n' }} + {%- if messages[0].role == 'system' %} + {{- messages[0].content + '\n\n' }} + {%- endif %} + {{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within XML tags:\n" }} + {%- for tool in tools %} + {{- "\n" }} + {{- tool | tojson }} + {%- endfor %} + {{- "\n\n\nFor each function call, return a json object with function name and arguments within XML tags:\n\n{\"name\": , \"arguments\": }\n<|im_end|>\n" }} +{%- else %} + {%- if messages[0].role == 'system' %} + {{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }} + {%- endif %} +{%- endif %} +{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %} +{%- for message in messages[::-1] %} + {%- set index = (messages|length - 1) - loop.index0 %} + {%- if ns.multi_step_tool and message.role == "user" and message.content is string and not(message.content.startswith('') and message.content.endswith('')) %} + {%- set ns.multi_step_tool = false %} + {%- set ns.last_query_index = index %} + {%- endif %} +{%- endfor %} +{%- for message in messages %} + {%- if message.content is string %} + {%- set content = message.content %} + {%- else %} + {%- set content = '' %} + {%- endif %} + {%- if (message.role == "user") or (message.role == "system" and not loop.first) %} + {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }} + {%- elif message.role == "assistant" %} + {%- set reasoning_content = '' %} + {%- if message.reasoning_content is string %} + {%- set reasoning_content = message.reasoning_content %} + {%- else %} + {%- if '' in content %} + {%- set reasoning_content = content.split('')[0].rstrip('\n').split('')[-1].lstrip('\n') %} + {%- set content = content.split('')[-1].lstrip('\n') %} + {%- endif %} + {%- endif %} + {%- if loop.index0 > ns.last_query_index %} + {%- if loop.last or (not loop.last and reasoning_content) %} + {{- '<|im_start|>' + message.role + '\n\n' + reasoning_content.strip('\n') + '\n\n\n' + content.lstrip('\n') }} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- if message.tool_calls %} + {%- for tool_call in message.tool_calls %} + {%- if (loop.first and content) or (not loop.first) %} + {{- '\n' }} + {%- endif %} + {%- if tool_call.function %} + {%- set tool_call = tool_call.function %} + {%- endif %} + {{- '\n{"name": "' }} + {{- tool_call.name }} + {{- '", "arguments": ' }} + {%- if tool_call.arguments is string %} + {{- tool_call.arguments }} + {%- else %} + {{- tool_call.arguments | tojson }} + {%- endif %} + {{- '}\n' }} + {%- endfor %} + {%- endif %} + {{- '<|im_end|>\n' }} + {%- elif message.role == "tool" %} + {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %} + {{- '<|im_start|>user' }} + {%- endif %} + {{- '\n\n' }} + {{- content }} + {{- '\n' }} + {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %} + {{- '<|im_end|>\n' }} + {%- endif %} + {%- endif %} +{%- endfor %} +{%- if add_generation_prompt %} + {{- '<|im_start|>assistant\n' }} + {%- if enable_thinking is defined and enable_thinking is false %} + {{- '\n\n\n\n' }} + {%- endif %} +{%- endif %} \ No newline at end of file diff --git a/GSM-Hard/PD/Qwen3-1.7B/checkpoint-198/tokenizer_config.json b/GSM-Hard/PD/Qwen3-1.7B/checkpoint-198/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..5668a4a01433b0648bb972458de616f22f3e728e --- /dev/null +++ b/GSM-Hard/PD/Qwen3-1.7B/checkpoint-198/tokenizer_config.json @@ -0,0 +1,30 @@ +{ + "add_prefix_space": false, + "backend": "tokenizers", + "bos_token": null, + "clean_up_tokenization_spaces": false, + "eos_token": "<|im_end|>", + "errors": "replace", + "extra_special_tokens": [ + "<|im_start|>", + "<|im_end|>", + "<|object_ref_start|>", + "<|object_ref_end|>", + "<|box_start|>", + "<|box_end|>", + "<|quad_start|>", + "<|quad_end|>", + "<|vision_start|>", + "<|vision_end|>", + "<|vision_pad|>", + "<|image_pad|>", + "<|video_pad|>" + ], + "is_local": true, + "local_files_only": false, + "model_max_length": 131072, + "pad_token": "<|endoftext|>", + "split_special_tokens": false, + "tokenizer_class": "Qwen2Tokenizer", + "unk_token": null +} diff --git a/GSM-Hard/PD/Qwen3-1.7B/checkpoint-198/trainer_state.json b/GSM-Hard/PD/Qwen3-1.7B/checkpoint-198/trainer_state.json new file mode 100644 index 0000000000000000000000000000000000000000..fd79ae90ca02e55bb129416c6c606ae9e336bab8 --- /dev/null +++ b/GSM-Hard/PD/Qwen3-1.7B/checkpoint-198/trainer_state.json @@ -0,0 +1,208 @@ +{ + "best_global_step": 198, + "best_metric": 0.1833035945892334, + "best_model_checkpoint": "jca/sft_runs/gsm_fixed_a1_corr30_20260723_v3/A1/checkpoint-198", + "epoch": 3.0, + "eval_steps": 50, + "global_step": 198, + "is_hyper_param_search": false, + "is_local_process_zero": true, + "is_world_process_zero": true, + "log_history": [ + { + "epoch": 0.15267175572519084, + "grad_norm": 3.92383074760437, + "learning_rate": 9e-06, + "loss": 1.005949115753174, + "step": 10 + }, + { + "epoch": 0.3053435114503817, + "grad_norm": 1.7584881782531738, + "learning_rate": 9.943559569286731e-06, + "loss": 0.7453500747680664, + "step": 20 + }, + { + "epoch": 0.4580152671755725, + "grad_norm": 0.460394948720932, + "learning_rate": 9.75009217427352e-06, + "loss": 0.4468539714813232, + "step": 30 + }, + { + "epoch": 0.6106870229007634, + "grad_norm": 0.6909489631652832, + "learning_rate": 9.424289624237143e-06, + "loss": 0.372265100479126, + "step": 40 + }, + { + "epoch": 0.7633587786259542, + "grad_norm": 0.45923224091529846, + "learning_rate": 8.975228612720415e-06, + "loss": 0.32600500583648684, + "step": 50 + }, + { + "epoch": 0.7633587786259542, + "eval_loss": 0.3334939479827881, + "eval_runtime": 24.3983, + "eval_samples_per_second": 4.509, + "eval_steps_per_second": 0.574, + "step": 50 + }, + { + "epoch": 0.916030534351145, + "grad_norm": 0.3928168714046478, + "learning_rate": 8.415419751390155e-06, + "loss": 0.2812504768371582, + "step": 60 + }, + { + "epoch": 1.0610687022900764, + "grad_norm": 0.3847449719905853, + "learning_rate": 7.760459030751285e-06, + "loss": 0.23557162284851074, + "step": 70 + }, + { + "epoch": 1.213740458015267, + "grad_norm": 0.3150196671485901, + "learning_rate": 7.028593323773819e-06, + "loss": 0.20195598602294923, + "step": 80 + }, + { + "epoch": 1.366412213740458, + "grad_norm": 0.23515599966049194, + "learning_rate": 6.240212037280967e-06, + "loss": 0.17259205579757692, + "step": 90 + }, + { + "epoch": 1.5190839694656488, + "grad_norm": 0.21412938833236694, + "learning_rate": 5.41727907343245e-06, + "loss": 0.17539703845977783, + "step": 100 + }, + { + "epoch": 1.5190839694656488, + "eval_loss": 0.19244883954524994, + "eval_runtime": 27.6371, + "eval_samples_per_second": 3.98, + "eval_steps_per_second": 0.507, + "step": 100 + }, + { + "epoch": 1.6717557251908397, + "grad_norm": 0.2110864818096161, + "learning_rate": 4.582720926567552e-06, + "loss": 0.167664098739624, + "step": 110 + }, + { + "epoch": 1.8244274809160306, + "grad_norm": 0.21078349649906158, + "learning_rate": 3.7597879627190337e-06, + "loss": 0.155253803730011, + "step": 120 + }, + { + "epoch": 1.9770992366412212, + "grad_norm": 0.20377536118030548, + "learning_rate": 2.9714066762261825e-06, + "loss": 0.1621570587158203, + "step": 130 + }, + { + "epoch": 2.122137404580153, + "grad_norm": 0.20074774324893951, + "learning_rate": 2.2395409692487174e-06, + "loss": 0.16617317199707032, + "step": 140 + }, + { + "epoch": 2.2748091603053435, + "grad_norm": 0.21171730756759644, + "learning_rate": 1.5845802486098461e-06, + "loss": 0.16301510334014893, + "step": 150 + }, + { + "epoch": 2.2748091603053435, + "eval_loss": 0.18400055170059204, + "eval_runtime": 25.5839, + "eval_samples_per_second": 4.3, + "eval_steps_per_second": 0.547, + "step": 150 + }, + { + "epoch": 2.427480916030534, + "grad_norm": 0.27525633573532104, + "learning_rate": 1.024771387279585e-06, + "loss": 0.15839390754699706, + "step": 160 + }, + { + "epoch": 2.5801526717557253, + "grad_norm": 0.17598454654216766, + "learning_rate": 5.757103757628573e-07, + "loss": 0.15573265552520751, + "step": 170 + }, + { + "epoch": 2.732824427480916, + "grad_norm": 0.2115989625453949, + "learning_rate": 2.4990782572647977e-07, + "loss": 0.1558178186416626, + "step": 180 + }, + { + "epoch": 2.885496183206107, + "grad_norm": 0.21294352412223816, + "learning_rate": 5.6440430713269325e-08, + "loss": 0.15377213954925537, + "step": 190 + }, + { + "epoch": 3.0, + "eval_loss": 0.1833035945892334, + "eval_runtime": 26.6748, + "eval_samples_per_second": 4.124, + "eval_steps_per_second": 0.525, + "step": 198 + } + ], + "logging_steps": 10, + "max_steps": 198, + "num_input_tokens_seen": 0, + "num_train_epochs": 3, + "save_steps": 50, + "stateful_callbacks": { + "EarlyStoppingCallback": { + "args": { + "early_stopping_patience": 3, + "early_stopping_threshold": 0.0 + }, + "attributes": { + "early_stopping_patience_counter": 0 + } + }, + "TrainerControl": { + "args": { + "should_epoch_stop": false, + "should_evaluate": false, + "should_log": false, + "should_save": true, + "should_training_stop": true + }, + "attributes": {} + } + }, + "total_flos": 4.837444214063104e+16, + "train_batch_size": 1, + "trial_name": null, + "trial_params": null +} diff --git a/GSM-Hard/PD/Qwen3-1.7B/final/adapter_config.json b/GSM-Hard/PD/Qwen3-1.7B/final/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..72e5bf46c94379147b782eafb3b70915beb9e428 --- /dev/null +++ b/GSM-Hard/PD/Qwen3-1.7B/final/adapter_config.json @@ -0,0 +1,45 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3-1.7B", + "bias": "none", + "corda_config": null, + "ensure_weight_tying": false, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": false, + "inference_mode": true, + "init_lora_weights": true, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 64, + "lora_bias": false, + "lora_dropout": 0.05, + "lora_ga_config": null, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "peft_type": "LORA", + "peft_version": "0.19.1", + "qalora_group_size": 16, + "r": 64, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "q_proj", + "v_proj", + "k_proj", + "o_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_bdlora": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} diff --git a/GSM-Hard/PD/Qwen3-1.7B/final/chat_template.jinja b/GSM-Hard/PD/Qwen3-1.7B/final/chat_template.jinja new file mode 100644 index 0000000000000000000000000000000000000000..01be9b307daa2d425f7c168c9fb145a286e0afb4 --- /dev/null +++ b/GSM-Hard/PD/Qwen3-1.7B/final/chat_template.jinja @@ -0,0 +1,89 @@ +{%- if tools %} + {{- '<|im_start|>system\n' }} + {%- if messages[0].role == 'system' %} + {{- messages[0].content + '\n\n' }} + {%- endif %} + {{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within XML tags:\n" }} + {%- for tool in tools %} + {{- "\n" }} + {{- tool | tojson }} + {%- endfor %} + {{- "\n\n\nFor each function call, return a json object with function name and arguments within XML tags:\n\n{\"name\": , \"arguments\": }\n<|im_end|>\n" }} +{%- else %} + {%- if messages[0].role == 'system' %} + {{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }} + {%- endif %} +{%- endif %} +{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %} +{%- for message in messages[::-1] %} + {%- set index = (messages|length - 1) - loop.index0 %} + {%- if ns.multi_step_tool and message.role == "user" and message.content is string and not(message.content.startswith('') and message.content.endswith('')) %} + {%- set ns.multi_step_tool = false %} + {%- set ns.last_query_index = index %} + {%- endif %} +{%- endfor %} +{%- for message in messages %} + {%- if message.content is string %} + {%- set content = message.content %} + {%- else %} + {%- set content = '' %} + {%- endif %} + {%- if (message.role == "user") or (message.role == "system" and not loop.first) %} + {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }} + {%- elif message.role == "assistant" %} + {%- set reasoning_content = '' %} + {%- if message.reasoning_content is string %} + {%- set reasoning_content = message.reasoning_content %} + {%- else %} + {%- if '' in content %} + {%- set reasoning_content = content.split('')[0].rstrip('\n').split('')[-1].lstrip('\n') %} + {%- set content = content.split('')[-1].lstrip('\n') %} + {%- endif %} + {%- endif %} + {%- if loop.index0 > ns.last_query_index %} + {%- if loop.last or (not loop.last and reasoning_content) %} + {{- '<|im_start|>' + message.role + '\n\n' + reasoning_content.strip('\n') + '\n\n\n' + content.lstrip('\n') }} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- if message.tool_calls %} + {%- for tool_call in message.tool_calls %} + {%- if (loop.first and content) or (not loop.first) %} + {{- '\n' }} + {%- endif %} + {%- if tool_call.function %} + {%- set tool_call = tool_call.function %} + {%- endif %} + {{- '\n{"name": "' }} + {{- tool_call.name }} + {{- '", "arguments": ' }} + {%- if tool_call.arguments is string %} + {{- tool_call.arguments }} + {%- else %} + {{- tool_call.arguments | tojson }} + {%- endif %} + {{- '}\n' }} + {%- endfor %} + {%- endif %} + {{- '<|im_end|>\n' }} + {%- elif message.role == "tool" %} + {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %} + {{- '<|im_start|>user' }} + {%- endif %} + {{- '\n\n' }} + {{- content }} + {{- '\n' }} + {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %} + {{- '<|im_end|>\n' }} + {%- endif %} + {%- endif %} +{%- endfor %} +{%- if add_generation_prompt %} + {{- '<|im_start|>assistant\n' }} + {%- if enable_thinking is defined and enable_thinking is false %} + {{- '\n\n\n\n' }} + {%- endif %} +{%- endif %} \ No newline at end of file diff --git a/GSM-Hard/PD/Qwen3-1.7B/final/final_eval_metrics.json b/GSM-Hard/PD/Qwen3-1.7B/final/final_eval_metrics.json new file mode 100644 index 0000000000000000000000000000000000000000..22b1c1963c0d8ee10a10ea36d3ee268b33982883 --- /dev/null +++ b/GSM-Hard/PD/Qwen3-1.7B/final/final_eval_metrics.json @@ -0,0 +1,7 @@ +{ + "eval_loss": 0.1833035945892334, + "eval_runtime": 25.9643, + "eval_samples_per_second": 4.237, + "eval_steps_per_second": 0.539, + "epoch": 3.0 +} diff --git a/GSM-Hard/PD/Qwen3-1.7B/final/tokenizer_config.json b/GSM-Hard/PD/Qwen3-1.7B/final/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..5668a4a01433b0648bb972458de616f22f3e728e --- /dev/null +++ b/GSM-Hard/PD/Qwen3-1.7B/final/tokenizer_config.json @@ -0,0 +1,30 @@ +{ + "add_prefix_space": false, + "backend": "tokenizers", + "bos_token": null, + "clean_up_tokenization_spaces": false, + "eos_token": "<|im_end|>", + "errors": "replace", + "extra_special_tokens": [ + "<|im_start|>", + "<|im_end|>", + "<|object_ref_start|>", + "<|object_ref_end|>", + "<|box_start|>", + "<|box_end|>", + "<|quad_start|>", + "<|quad_end|>", + "<|vision_start|>", + "<|vision_end|>", + "<|vision_pad|>", + "<|image_pad|>", + "<|video_pad|>" + ], + "is_local": true, + "local_files_only": false, + "model_max_length": 131072, + "pad_token": "<|endoftext|>", + "split_special_tokens": false, + "tokenizer_class": "Qwen2Tokenizer", + "unk_token": null +} diff --git a/GSM-Hard/PD/Qwen3-1.7B/final/train_summary.json b/GSM-Hard/PD/Qwen3-1.7B/final/train_summary.json new file mode 100644 index 0000000000000000000000000000000000000000..62e42ed2645005628728b28727e40b87cbc0317e --- /dev/null +++ b/GSM-Hard/PD/Qwen3-1.7B/final/train_summary.json @@ -0,0 +1,12 @@ +{ + "global_step": 198, + "training_loss": 0.27878306429795546, + "metrics": { + "train_runtime": 309.9596, + "train_samples_per_second": 20.228, + "train_steps_per_second": 0.639, + "total_flos": 4.837444214063104e+16, + "train_loss": 0.27878306429795546, + "epoch": 3.0 + } +} diff --git a/GSM-Hard/SLS/Qwen3-1.7B/checkpoint-100/adapter_config.json b/GSM-Hard/SLS/Qwen3-1.7B/checkpoint-100/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..f6962ec15c8a00d212e9fc982c24f7444e619751 --- /dev/null +++ b/GSM-Hard/SLS/Qwen3-1.7B/checkpoint-100/adapter_config.json @@ -0,0 +1,45 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3-1.7B", + "bias": "none", + "corda_config": null, + "ensure_weight_tying": false, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": false, + "inference_mode": true, + "init_lora_weights": true, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 64, + "lora_bias": false, + "lora_dropout": 0.05, + "lora_ga_config": null, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "peft_type": "LORA", + "peft_version": "0.19.1", + "qalora_group_size": 16, + "r": 64, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "k_proj", + "v_proj", + "q_proj", + "o_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_bdlora": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} diff --git a/GSM-Hard/SLS/Qwen3-1.7B/checkpoint-100/chat_template.jinja b/GSM-Hard/SLS/Qwen3-1.7B/checkpoint-100/chat_template.jinja new file mode 100644 index 0000000000000000000000000000000000000000..01be9b307daa2d425f7c168c9fb145a286e0afb4 --- /dev/null +++ b/GSM-Hard/SLS/Qwen3-1.7B/checkpoint-100/chat_template.jinja @@ -0,0 +1,89 @@ +{%- if tools %} + {{- '<|im_start|>system\n' }} + {%- if messages[0].role == 'system' %} + {{- messages[0].content + '\n\n' }} + {%- endif %} + {{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within XML tags:\n" }} + {%- for tool in tools %} + {{- "\n" }} + {{- tool | tojson }} + {%- endfor %} + {{- "\n\n\nFor each function call, return a json object with function name and arguments within XML tags:\n\n{\"name\": , \"arguments\": }\n<|im_end|>\n" }} +{%- else %} + {%- if messages[0].role == 'system' %} + {{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }} + {%- endif %} +{%- endif %} +{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %} +{%- for message in messages[::-1] %} + {%- set index = (messages|length - 1) - loop.index0 %} + {%- if ns.multi_step_tool and message.role == "user" and message.content is string and not(message.content.startswith('') and message.content.endswith('')) %} + {%- set ns.multi_step_tool = false %} + {%- set ns.last_query_index = index %} + {%- endif %} +{%- endfor %} +{%- for message in messages %} + {%- if message.content is string %} + {%- set content = message.content %} + {%- else %} + {%- set content = '' %} + {%- endif %} + {%- if (message.role == "user") or (message.role == "system" and not loop.first) %} + {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }} + {%- elif message.role == "assistant" %} + {%- set reasoning_content = '' %} + {%- if message.reasoning_content is string %} + {%- set reasoning_content = message.reasoning_content %} + {%- else %} + {%- if '' in content %} + {%- set reasoning_content = content.split('')[0].rstrip('\n').split('')[-1].lstrip('\n') %} + {%- set content = content.split('')[-1].lstrip('\n') %} + {%- endif %} + {%- endif %} + {%- if loop.index0 > ns.last_query_index %} + {%- if loop.last or (not loop.last and reasoning_content) %} + {{- '<|im_start|>' + message.role + '\n\n' + reasoning_content.strip('\n') + '\n\n\n' + content.lstrip('\n') }} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- if message.tool_calls %} + {%- for tool_call in message.tool_calls %} + {%- if (loop.first and content) or (not loop.first) %} + {{- '\n' }} + {%- endif %} + {%- if tool_call.function %} + {%- set tool_call = tool_call.function %} + {%- endif %} + {{- '\n{"name": "' }} + {{- tool_call.name }} + {{- '", "arguments": ' }} + {%- if tool_call.arguments is string %} + {{- tool_call.arguments }} + {%- else %} + {{- tool_call.arguments | tojson }} + {%- endif %} + {{- '}\n' }} + {%- endfor %} + {%- endif %} + {{- '<|im_end|>\n' }} + {%- elif message.role == "tool" %} + {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %} + {{- '<|im_start|>user' }} + {%- endif %} + {{- '\n\n' }} + {{- content }} + {{- '\n' }} + {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %} + {{- '<|im_end|>\n' }} + {%- endif %} + {%- endif %} +{%- endfor %} +{%- if add_generation_prompt %} + {{- '<|im_start|>assistant\n' }} + {%- if enable_thinking is defined and enable_thinking is false %} + {{- '\n\n\n\n' }} + {%- endif %} +{%- endif %} \ No newline at end of file diff --git a/GSM-Hard/SLS/Qwen3-1.7B/checkpoint-100/tokenizer_config.json b/GSM-Hard/SLS/Qwen3-1.7B/checkpoint-100/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..5668a4a01433b0648bb972458de616f22f3e728e --- /dev/null +++ b/GSM-Hard/SLS/Qwen3-1.7B/checkpoint-100/tokenizer_config.json @@ -0,0 +1,30 @@ +{ + "add_prefix_space": false, + "backend": "tokenizers", + "bos_token": null, + "clean_up_tokenization_spaces": false, + "eos_token": "<|im_end|>", + "errors": "replace", + "extra_special_tokens": [ + "<|im_start|>", + "<|im_end|>", + "<|object_ref_start|>", + "<|object_ref_end|>", + "<|box_start|>", + "<|box_end|>", + "<|quad_start|>", + "<|quad_end|>", + "<|vision_start|>", + "<|vision_end|>", + "<|vision_pad|>", + "<|image_pad|>", + "<|video_pad|>" + ], + "is_local": true, + "local_files_only": false, + "model_max_length": 131072, + "pad_token": "<|endoftext|>", + "split_special_tokens": false, + "tokenizer_class": "Qwen2Tokenizer", + "unk_token": null +} diff --git a/GSM-Hard/SLS/Qwen3-1.7B/checkpoint-200/adapter_config.json b/GSM-Hard/SLS/Qwen3-1.7B/checkpoint-200/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..f6962ec15c8a00d212e9fc982c24f7444e619751 --- /dev/null +++ b/GSM-Hard/SLS/Qwen3-1.7B/checkpoint-200/adapter_config.json @@ -0,0 +1,45 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3-1.7B", + "bias": "none", + "corda_config": null, + "ensure_weight_tying": false, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": false, + "inference_mode": true, + "init_lora_weights": true, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 64, + "lora_bias": false, + "lora_dropout": 0.05, + "lora_ga_config": null, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "peft_type": "LORA", + "peft_version": "0.19.1", + "qalora_group_size": 16, + "r": 64, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "k_proj", + "v_proj", + "q_proj", + "o_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_bdlora": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} diff --git a/GSM-Hard/SLS/Qwen3-1.7B/checkpoint-200/chat_template.jinja b/GSM-Hard/SLS/Qwen3-1.7B/checkpoint-200/chat_template.jinja new file mode 100644 index 0000000000000000000000000000000000000000..01be9b307daa2d425f7c168c9fb145a286e0afb4 --- /dev/null +++ b/GSM-Hard/SLS/Qwen3-1.7B/checkpoint-200/chat_template.jinja @@ -0,0 +1,89 @@ +{%- if tools %} + {{- '<|im_start|>system\n' }} + {%- if messages[0].role == 'system' %} + {{- messages[0].content + '\n\n' }} + {%- endif %} + {{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within XML tags:\n" }} + {%- for tool in tools %} + {{- "\n" }} + {{- tool | tojson }} + {%- endfor %} + {{- "\n\n\nFor each function call, return a json object with function name and arguments within XML tags:\n\n{\"name\": , \"arguments\": }\n<|im_end|>\n" }} +{%- else %} + {%- if messages[0].role == 'system' %} + {{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }} + {%- endif %} +{%- endif %} +{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %} +{%- for message in messages[::-1] %} + {%- set index = (messages|length - 1) - loop.index0 %} + {%- if ns.multi_step_tool and message.role == "user" and message.content is string and not(message.content.startswith('') and message.content.endswith('')) %} + {%- set ns.multi_step_tool = false %} + {%- set ns.last_query_index = index %} + {%- endif %} +{%- endfor %} +{%- for message in messages %} + {%- if message.content is string %} + {%- set content = message.content %} + {%- else %} + {%- set content = '' %} + {%- endif %} + {%- if (message.role == "user") or (message.role == "system" and not loop.first) %} + {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }} + {%- elif message.role == "assistant" %} + {%- set reasoning_content = '' %} + {%- if message.reasoning_content is string %} + {%- set reasoning_content = message.reasoning_content %} + {%- else %} + {%- if '' in content %} + {%- set reasoning_content = content.split('')[0].rstrip('\n').split('')[-1].lstrip('\n') %} + {%- set content = content.split('')[-1].lstrip('\n') %} + {%- endif %} + {%- endif %} + {%- if loop.index0 > ns.last_query_index %} + {%- if loop.last or (not loop.last and reasoning_content) %} + {{- '<|im_start|>' + message.role + '\n\n' + reasoning_content.strip('\n') + '\n\n\n' + content.lstrip('\n') }} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- if message.tool_calls %} + {%- for tool_call in message.tool_calls %} + {%- if (loop.first and content) or (not loop.first) %} + {{- '\n' }} + {%- endif %} + {%- if tool_call.function %} + {%- set tool_call = tool_call.function %} + {%- endif %} + {{- '\n{"name": "' }} + {{- tool_call.name }} + {{- '", "arguments": ' }} + {%- if tool_call.arguments is string %} + {{- tool_call.arguments }} + {%- else %} + {{- tool_call.arguments | tojson }} + {%- endif %} + {{- '}\n' }} + {%- endfor %} + {%- endif %} + {{- '<|im_end|>\n' }} + {%- elif message.role == "tool" %} + {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %} + {{- '<|im_start|>user' }} + {%- endif %} + {{- '\n\n' }} + {{- content }} + {{- '\n' }} + {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %} + {{- '<|im_end|>\n' }} + {%- endif %} + {%- endif %} +{%- endfor %} +{%- if add_generation_prompt %} + {{- '<|im_start|>assistant\n' }} + {%- if enable_thinking is defined and enable_thinking is false %} + {{- '\n\n\n\n' }} + {%- endif %} +{%- endif %} \ No newline at end of file diff --git a/GSM-Hard/SLS/Qwen3-1.7B/checkpoint-200/tokenizer_config.json b/GSM-Hard/SLS/Qwen3-1.7B/checkpoint-200/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..5668a4a01433b0648bb972458de616f22f3e728e --- /dev/null +++ b/GSM-Hard/SLS/Qwen3-1.7B/checkpoint-200/tokenizer_config.json @@ -0,0 +1,30 @@ +{ + "add_prefix_space": false, + "backend": "tokenizers", + "bos_token": null, + "clean_up_tokenization_spaces": false, + "eos_token": "<|im_end|>", + "errors": "replace", + "extra_special_tokens": [ + "<|im_start|>", + "<|im_end|>", + "<|object_ref_start|>", + "<|object_ref_end|>", + "<|box_start|>", + "<|box_end|>", + "<|quad_start|>", + "<|quad_end|>", + "<|vision_start|>", + "<|vision_end|>", + "<|vision_pad|>", + "<|image_pad|>", + "<|video_pad|>" + ], + "is_local": true, + "local_files_only": false, + "model_max_length": 131072, + "pad_token": "<|endoftext|>", + "split_special_tokens": false, + "tokenizer_class": "Qwen2Tokenizer", + "unk_token": null +} diff --git a/GSM-Hard/SLS/Qwen3-1.7B/final/adapter_config.json b/GSM-Hard/SLS/Qwen3-1.7B/final/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..f6962ec15c8a00d212e9fc982c24f7444e619751 --- /dev/null +++ b/GSM-Hard/SLS/Qwen3-1.7B/final/adapter_config.json @@ -0,0 +1,45 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3-1.7B", + "bias": "none", + "corda_config": null, + "ensure_weight_tying": false, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": false, + "inference_mode": true, + "init_lora_weights": true, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 64, + "lora_bias": false, + "lora_dropout": 0.05, + "lora_ga_config": null, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "peft_type": "LORA", + "peft_version": "0.19.1", + "qalora_group_size": 16, + "r": 64, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "k_proj", + "v_proj", + "q_proj", + "o_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_bdlora": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} diff --git a/GSM-Hard/SLS/Qwen3-1.7B/final/chat_template.jinja b/GSM-Hard/SLS/Qwen3-1.7B/final/chat_template.jinja new file mode 100644 index 0000000000000000000000000000000000000000..01be9b307daa2d425f7c168c9fb145a286e0afb4 --- /dev/null +++ b/GSM-Hard/SLS/Qwen3-1.7B/final/chat_template.jinja @@ -0,0 +1,89 @@ +{%- if tools %} + {{- '<|im_start|>system\n' }} + {%- if messages[0].role == 'system' %} + {{- messages[0].content + '\n\n' }} + {%- endif %} + {{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within XML tags:\n" }} + {%- for tool in tools %} + {{- "\n" }} + {{- tool | tojson }} + {%- endfor %} + {{- "\n\n\nFor each function call, return a json object with function name and arguments within XML tags:\n\n{\"name\": , \"arguments\": }\n<|im_end|>\n" }} +{%- else %} + {%- if messages[0].role == 'system' %} + {{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }} + {%- endif %} +{%- endif %} +{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %} +{%- for message in messages[::-1] %} + {%- set index = (messages|length - 1) - loop.index0 %} + {%- if ns.multi_step_tool and message.role == "user" and message.content is string and not(message.content.startswith('') and message.content.endswith('')) %} + {%- set ns.multi_step_tool = false %} + {%- set ns.last_query_index = index %} + {%- endif %} +{%- endfor %} +{%- for message in messages %} + {%- if message.content is string %} + {%- set content = message.content %} + {%- else %} + {%- set content = '' %} + {%- endif %} + {%- if (message.role == "user") or (message.role == "system" and not loop.first) %} + {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }} + {%- elif message.role == "assistant" %} + {%- set reasoning_content = '' %} + {%- if message.reasoning_content is string %} + {%- set reasoning_content = message.reasoning_content %} + {%- else %} + {%- if '' in content %} + {%- set reasoning_content = content.split('')[0].rstrip('\n').split('')[-1].lstrip('\n') %} + {%- set content = content.split('')[-1].lstrip('\n') %} + {%- endif %} + {%- endif %} + {%- if loop.index0 > ns.last_query_index %} + {%- if loop.last or (not loop.last and reasoning_content) %} + {{- '<|im_start|>' + message.role + '\n\n' + reasoning_content.strip('\n') + '\n\n\n' + content.lstrip('\n') }} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- if message.tool_calls %} + {%- for tool_call in message.tool_calls %} + {%- if (loop.first and content) or (not loop.first) %} + {{- '\n' }} + {%- endif %} + {%- if tool_call.function %} + {%- set tool_call = tool_call.function %} + {%- endif %} + {{- '\n{"name": "' }} + {{- tool_call.name }} + {{- '", "arguments": ' }} + {%- if tool_call.arguments is string %} + {{- tool_call.arguments }} + {%- else %} + {{- tool_call.arguments | tojson }} + {%- endif %} + {{- '}\n' }} + {%- endfor %} + {%- endif %} + {{- '<|im_end|>\n' }} + {%- elif message.role == "tool" %} + {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %} + {{- '<|im_start|>user' }} + {%- endif %} + {{- '\n\n' }} + {{- content }} + {{- '\n' }} + {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %} + {{- '<|im_end|>\n' }} + {%- endif %} + {%- endif %} +{%- endfor %} +{%- if add_generation_prompt %} + {{- '<|im_start|>assistant\n' }} + {%- if enable_thinking is defined and enable_thinking is false %} + {{- '\n\n\n\n' }} + {%- endif %} +{%- endif %} \ No newline at end of file diff --git a/GSM-Hard/SLS/Qwen3-1.7B/final/rl_train_summary.json b/GSM-Hard/SLS/Qwen3-1.7B/final/rl_train_summary.json new file mode 100644 index 0000000000000000000000000000000000000000..929b586b439d2ccb1a0c9ff12440fd363d786f74 --- /dev/null +++ b/GSM-Hard/SLS/Qwen3-1.7B/final/rl_train_summary.json @@ -0,0 +1,8 @@ +{ + "agent": "A1", + "global_step": 233, + "total_records": 3714, + "algorithm": "rwr", + "kl_coef": 0.1, + "world_size": 8 +} diff --git a/GSM-Hard/SLS/Qwen3-1.7B/final/tokenizer_config.json b/GSM-Hard/SLS/Qwen3-1.7B/final/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..5668a4a01433b0648bb972458de616f22f3e728e --- /dev/null +++ b/GSM-Hard/SLS/Qwen3-1.7B/final/tokenizer_config.json @@ -0,0 +1,30 @@ +{ + "add_prefix_space": false, + "backend": "tokenizers", + "bos_token": null, + "clean_up_tokenization_spaces": false, + "eos_token": "<|im_end|>", + "errors": "replace", + "extra_special_tokens": [ + "<|im_start|>", + "<|im_end|>", + "<|object_ref_start|>", + "<|object_ref_end|>", + "<|box_start|>", + "<|box_end|>", + "<|quad_start|>", + "<|quad_end|>", + "<|vision_start|>", + "<|vision_end|>", + "<|vision_pad|>", + "<|image_pad|>", + "<|video_pad|>" + ], + "is_local": true, + "local_files_only": false, + "model_max_length": 131072, + "pad_token": "<|endoftext|>", + "split_special_tokens": false, + "tokenizer_class": "Qwen2Tokenizer", + "unk_token": null +} diff --git a/GSM-Hard/SLS/Qwen3-4B/checkpoint-100/adapter_config.json b/GSM-Hard/SLS/Qwen3-4B/checkpoint-100/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..4e7a41187ce4b881835631e96d56e0b6305acace --- /dev/null +++ b/GSM-Hard/SLS/Qwen3-4B/checkpoint-100/adapter_config.json @@ -0,0 +1,45 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3-4B", + "bias": "none", + "corda_config": null, + "ensure_weight_tying": false, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": false, + "inference_mode": true, + "init_lora_weights": true, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 64, + "lora_bias": false, + "lora_dropout": 0.05, + "lora_ga_config": null, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "peft_type": "LORA", + "peft_version": "0.19.1", + "qalora_group_size": 16, + "r": 64, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "k_proj", + "q_proj", + "o_proj", + "v_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_bdlora": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} diff --git a/GSM-Hard/SLS/Qwen3-4B/checkpoint-100/chat_template.jinja b/GSM-Hard/SLS/Qwen3-4B/checkpoint-100/chat_template.jinja new file mode 100644 index 0000000000000000000000000000000000000000..01be9b307daa2d425f7c168c9fb145a286e0afb4 --- /dev/null +++ b/GSM-Hard/SLS/Qwen3-4B/checkpoint-100/chat_template.jinja @@ -0,0 +1,89 @@ +{%- if tools %} + {{- '<|im_start|>system\n' }} + {%- if messages[0].role == 'system' %} + {{- messages[0].content + '\n\n' }} + {%- endif %} + {{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within XML tags:\n" }} + {%- for tool in tools %} + {{- "\n" }} + {{- tool | tojson }} + {%- endfor %} + {{- "\n\n\nFor each function call, return a json object with function name and arguments within XML tags:\n\n{\"name\": , \"arguments\": }\n<|im_end|>\n" }} +{%- else %} + {%- if messages[0].role == 'system' %} + {{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }} + {%- endif %} +{%- endif %} +{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %} +{%- for message in messages[::-1] %} + {%- set index = (messages|length - 1) - loop.index0 %} + {%- if ns.multi_step_tool and message.role == "user" and message.content is string and not(message.content.startswith('') and message.content.endswith('')) %} + {%- set ns.multi_step_tool = false %} + {%- set ns.last_query_index = index %} + {%- endif %} +{%- endfor %} +{%- for message in messages %} + {%- if message.content is string %} + {%- set content = message.content %} + {%- else %} + {%- set content = '' %} + {%- endif %} + {%- if (message.role == "user") or (message.role == "system" and not loop.first) %} + {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }} + {%- elif message.role == "assistant" %} + {%- set reasoning_content = '' %} + {%- if message.reasoning_content is string %} + {%- set reasoning_content = message.reasoning_content %} + {%- else %} + {%- if '' in content %} + {%- set reasoning_content = content.split('')[0].rstrip('\n').split('')[-1].lstrip('\n') %} + {%- set content = content.split('')[-1].lstrip('\n') %} + {%- endif %} + {%- endif %} + {%- if loop.index0 > ns.last_query_index %} + {%- if loop.last or (not loop.last and reasoning_content) %} + {{- '<|im_start|>' + message.role + '\n\n' + reasoning_content.strip('\n') + '\n\n\n' + content.lstrip('\n') }} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- if message.tool_calls %} + {%- for tool_call in message.tool_calls %} + {%- if (loop.first and content) or (not loop.first) %} + {{- '\n' }} + {%- endif %} + {%- if tool_call.function %} + {%- set tool_call = tool_call.function %} + {%- endif %} + {{- '\n{"name": "' }} + {{- tool_call.name }} + {{- '", "arguments": ' }} + {%- if tool_call.arguments is string %} + {{- tool_call.arguments }} + {%- else %} + {{- tool_call.arguments | tojson }} + {%- endif %} + {{- '}\n' }} + {%- endfor %} + {%- endif %} + {{- '<|im_end|>\n' }} + {%- elif message.role == "tool" %} + {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %} + {{- '<|im_start|>user' }} + {%- endif %} + {{- '\n\n' }} + {{- content }} + {{- '\n' }} + {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %} + {{- '<|im_end|>\n' }} + {%- endif %} + {%- endif %} +{%- endfor %} +{%- if add_generation_prompt %} + {{- '<|im_start|>assistant\n' }} + {%- if enable_thinking is defined and enable_thinking is false %} + {{- '\n\n\n\n' }} + {%- endif %} +{%- endif %} \ No newline at end of file diff --git a/GSM-Hard/SLS/Qwen3-4B/checkpoint-100/tokenizer_config.json b/GSM-Hard/SLS/Qwen3-4B/checkpoint-100/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..5668a4a01433b0648bb972458de616f22f3e728e --- /dev/null +++ b/GSM-Hard/SLS/Qwen3-4B/checkpoint-100/tokenizer_config.json @@ -0,0 +1,30 @@ +{ + "add_prefix_space": false, + "backend": "tokenizers", + "bos_token": null, + "clean_up_tokenization_spaces": false, + "eos_token": "<|im_end|>", + "errors": "replace", + "extra_special_tokens": [ + "<|im_start|>", + "<|im_end|>", + "<|object_ref_start|>", + "<|object_ref_end|>", + "<|box_start|>", + "<|box_end|>", + "<|quad_start|>", + "<|quad_end|>", + "<|vision_start|>", + "<|vision_end|>", + "<|vision_pad|>", + "<|image_pad|>", + "<|video_pad|>" + ], + "is_local": true, + "local_files_only": false, + "model_max_length": 131072, + "pad_token": "<|endoftext|>", + "split_special_tokens": false, + "tokenizer_class": "Qwen2Tokenizer", + "unk_token": null +} diff --git a/GSM-Hard/SLS/Qwen3-4B/checkpoint-200/adapter_config.json b/GSM-Hard/SLS/Qwen3-4B/checkpoint-200/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..4e7a41187ce4b881835631e96d56e0b6305acace --- /dev/null +++ b/GSM-Hard/SLS/Qwen3-4B/checkpoint-200/adapter_config.json @@ -0,0 +1,45 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3-4B", + "bias": "none", + "corda_config": null, + "ensure_weight_tying": false, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": false, + "inference_mode": true, + "init_lora_weights": true, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 64, + "lora_bias": false, + "lora_dropout": 0.05, + "lora_ga_config": null, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "peft_type": "LORA", + "peft_version": "0.19.1", + "qalora_group_size": 16, + "r": 64, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "k_proj", + "q_proj", + "o_proj", + "v_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_bdlora": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} diff --git a/GSM-Hard/SLS/Qwen3-4B/checkpoint-200/chat_template.jinja b/GSM-Hard/SLS/Qwen3-4B/checkpoint-200/chat_template.jinja new file mode 100644 index 0000000000000000000000000000000000000000..01be9b307daa2d425f7c168c9fb145a286e0afb4 --- /dev/null +++ b/GSM-Hard/SLS/Qwen3-4B/checkpoint-200/chat_template.jinja @@ -0,0 +1,89 @@ +{%- if tools %} + {{- '<|im_start|>system\n' }} + {%- if messages[0].role == 'system' %} + {{- messages[0].content + '\n\n' }} + {%- endif %} + {{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within XML tags:\n" }} + {%- for tool in tools %} + {{- "\n" }} + {{- tool | tojson }} + {%- endfor %} + {{- "\n\n\nFor each function call, return a json object with function name and arguments within XML tags:\n\n{\"name\": , \"arguments\": }\n<|im_end|>\n" }} +{%- else %} + {%- if messages[0].role == 'system' %} + {{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }} + {%- endif %} +{%- endif %} +{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %} +{%- for message in messages[::-1] %} + {%- set index = (messages|length - 1) - loop.index0 %} + {%- if ns.multi_step_tool and message.role == "user" and message.content is string and not(message.content.startswith('') and message.content.endswith('')) %} + {%- set ns.multi_step_tool = false %} + {%- set ns.last_query_index = index %} + {%- endif %} +{%- endfor %} +{%- for message in messages %} + {%- if message.content is string %} + {%- set content = message.content %} + {%- else %} + {%- set content = '' %} + {%- endif %} + {%- if (message.role == "user") or (message.role == "system" and not loop.first) %} + {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }} + {%- elif message.role == "assistant" %} + {%- set reasoning_content = '' %} + {%- if message.reasoning_content is string %} + {%- set reasoning_content = message.reasoning_content %} + {%- else %} + {%- if '' in content %} + {%- set reasoning_content = content.split('')[0].rstrip('\n').split('')[-1].lstrip('\n') %} + {%- set content = content.split('')[-1].lstrip('\n') %} + {%- endif %} + {%- endif %} + {%- if loop.index0 > ns.last_query_index %} + {%- if loop.last or (not loop.last and reasoning_content) %} + {{- '<|im_start|>' + message.role + '\n\n' + reasoning_content.strip('\n') + '\n\n\n' + content.lstrip('\n') }} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- if message.tool_calls %} + {%- for tool_call in message.tool_calls %} + {%- if (loop.first and content) or (not loop.first) %} + {{- '\n' }} + {%- endif %} + {%- if tool_call.function %} + {%- set tool_call = tool_call.function %} + {%- endif %} + {{- '\n{"name": "' }} + {{- tool_call.name }} + {{- '", "arguments": ' }} + {%- if tool_call.arguments is string %} + {{- tool_call.arguments }} + {%- else %} + {{- tool_call.arguments | tojson }} + {%- endif %} + {{- '}\n' }} + {%- endfor %} + {%- endif %} + {{- '<|im_end|>\n' }} + {%- elif message.role == "tool" %} + {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %} + {{- '<|im_start|>user' }} + {%- endif %} + {{- '\n\n' }} + {{- content }} + {{- '\n' }} + {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %} + {{- '<|im_end|>\n' }} + {%- endif %} + {%- endif %} +{%- endfor %} +{%- if add_generation_prompt %} + {{- '<|im_start|>assistant\n' }} + {%- if enable_thinking is defined and enable_thinking is false %} + {{- '\n\n\n\n' }} + {%- endif %} +{%- endif %} \ No newline at end of file diff --git a/GSM-Hard/SLS/Qwen3-4B/checkpoint-200/tokenizer_config.json b/GSM-Hard/SLS/Qwen3-4B/checkpoint-200/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..5668a4a01433b0648bb972458de616f22f3e728e --- /dev/null +++ b/GSM-Hard/SLS/Qwen3-4B/checkpoint-200/tokenizer_config.json @@ -0,0 +1,30 @@ +{ + "add_prefix_space": false, + "backend": "tokenizers", + "bos_token": null, + "clean_up_tokenization_spaces": false, + "eos_token": "<|im_end|>", + "errors": "replace", + "extra_special_tokens": [ + "<|im_start|>", + "<|im_end|>", + "<|object_ref_start|>", + "<|object_ref_end|>", + "<|box_start|>", + "<|box_end|>", + "<|quad_start|>", + "<|quad_end|>", + "<|vision_start|>", + "<|vision_end|>", + "<|vision_pad|>", + "<|image_pad|>", + "<|video_pad|>" + ], + "is_local": true, + "local_files_only": false, + "model_max_length": 131072, + "pad_token": "<|endoftext|>", + "split_special_tokens": false, + "tokenizer_class": "Qwen2Tokenizer", + "unk_token": null +} diff --git a/GSM-Hard/SLS/Qwen3-4B/final/adapter_config.json b/GSM-Hard/SLS/Qwen3-4B/final/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..4e7a41187ce4b881835631e96d56e0b6305acace --- /dev/null +++ b/GSM-Hard/SLS/Qwen3-4B/final/adapter_config.json @@ -0,0 +1,45 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3-4B", + "bias": "none", + "corda_config": null, + "ensure_weight_tying": false, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": false, + "inference_mode": true, + "init_lora_weights": true, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 64, + "lora_bias": false, + "lora_dropout": 0.05, + "lora_ga_config": null, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "peft_type": "LORA", + "peft_version": "0.19.1", + "qalora_group_size": 16, + "r": 64, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "k_proj", + "q_proj", + "o_proj", + "v_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_bdlora": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} diff --git a/GSM-Hard/SLS/Qwen3-4B/final/chat_template.jinja b/GSM-Hard/SLS/Qwen3-4B/final/chat_template.jinja new file mode 100644 index 0000000000000000000000000000000000000000..01be9b307daa2d425f7c168c9fb145a286e0afb4 --- /dev/null +++ b/GSM-Hard/SLS/Qwen3-4B/final/chat_template.jinja @@ -0,0 +1,89 @@ +{%- if tools %} + {{- '<|im_start|>system\n' }} + {%- if messages[0].role == 'system' %} + {{- messages[0].content + '\n\n' }} + {%- endif %} + {{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within XML tags:\n" }} + {%- for tool in tools %} + {{- "\n" }} + {{- tool | tojson }} + {%- endfor %} + {{- "\n\n\nFor each function call, return a json object with function name and arguments within XML tags:\n\n{\"name\": , \"arguments\": }\n<|im_end|>\n" }} +{%- else %} + {%- if messages[0].role == 'system' %} + {{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }} + {%- endif %} +{%- endif %} +{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %} +{%- for message in messages[::-1] %} + {%- set index = (messages|length - 1) - loop.index0 %} + {%- if ns.multi_step_tool and message.role == "user" and message.content is string and not(message.content.startswith('') and message.content.endswith('')) %} + {%- set ns.multi_step_tool = false %} + {%- set ns.last_query_index = index %} + {%- endif %} +{%- endfor %} +{%- for message in messages %} + {%- if message.content is string %} + {%- set content = message.content %} + {%- else %} + {%- set content = '' %} + {%- endif %} + {%- if (message.role == "user") or (message.role == "system" and not loop.first) %} + {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }} + {%- elif message.role == "assistant" %} + {%- set reasoning_content = '' %} + {%- if message.reasoning_content is string %} + {%- set reasoning_content = message.reasoning_content %} + {%- else %} + {%- if '' in content %} + {%- set reasoning_content = content.split('')[0].rstrip('\n').split('')[-1].lstrip('\n') %} + {%- set content = content.split('')[-1].lstrip('\n') %} + {%- endif %} + {%- endif %} + {%- if loop.index0 > ns.last_query_index %} + {%- if loop.last or (not loop.last and reasoning_content) %} + {{- '<|im_start|>' + message.role + '\n\n' + reasoning_content.strip('\n') + '\n\n\n' + content.lstrip('\n') }} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- if message.tool_calls %} + {%- for tool_call in message.tool_calls %} + {%- if (loop.first and content) or (not loop.first) %} + {{- '\n' }} + {%- endif %} + {%- if tool_call.function %} + {%- set tool_call = tool_call.function %} + {%- endif %} + {{- '\n{"name": "' }} + {{- tool_call.name }} + {{- '", "arguments": ' }} + {%- if tool_call.arguments is string %} + {{- tool_call.arguments }} + {%- else %} + {{- tool_call.arguments | tojson }} + {%- endif %} + {{- '}\n' }} + {%- endfor %} + {%- endif %} + {{- '<|im_end|>\n' }} + {%- elif message.role == "tool" %} + {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %} + {{- '<|im_start|>user' }} + {%- endif %} + {{- '\n\n' }} + {{- content }} + {{- '\n' }} + {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %} + {{- '<|im_end|>\n' }} + {%- endif %} + {%- endif %} +{%- endfor %} +{%- if add_generation_prompt %} + {{- '<|im_start|>assistant\n' }} + {%- if enable_thinking is defined and enable_thinking is false %} + {{- '\n\n\n\n' }} + {%- endif %} +{%- endif %} \ No newline at end of file diff --git a/GSM-Hard/SLS/Qwen3-4B/final/rl_train_summary.json b/GSM-Hard/SLS/Qwen3-4B/final/rl_train_summary.json new file mode 100644 index 0000000000000000000000000000000000000000..0b445b19b3b8ed8822b24a6ac3c11e7727f4227f --- /dev/null +++ b/GSM-Hard/SLS/Qwen3-4B/final/rl_train_summary.json @@ -0,0 +1,8 @@ +{ + "agent": "A2", + "global_step": 220, + "total_records": 3516, + "algorithm": "rwr", + "kl_coef": 0.1, + "world_size": 8 +} diff --git a/GSM-Hard/SLS/Qwen3-4B/final/tokenizer_config.json b/GSM-Hard/SLS/Qwen3-4B/final/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..5668a4a01433b0648bb972458de616f22f3e728e --- /dev/null +++ b/GSM-Hard/SLS/Qwen3-4B/final/tokenizer_config.json @@ -0,0 +1,30 @@ +{ + "add_prefix_space": false, + "backend": "tokenizers", + "bos_token": null, + "clean_up_tokenization_spaces": false, + "eos_token": "<|im_end|>", + "errors": "replace", + "extra_special_tokens": [ + "<|im_start|>", + "<|im_end|>", + "<|object_ref_start|>", + "<|object_ref_end|>", + "<|box_start|>", + "<|box_end|>", + "<|quad_start|>", + "<|quad_end|>", + "<|vision_start|>", + "<|vision_end|>", + "<|vision_pad|>", + "<|image_pad|>", + "<|video_pad|>" + ], + "is_local": true, + "local_files_only": false, + "model_max_length": 131072, + "pad_token": "<|endoftext|>", + "split_special_tokens": false, + "tokenizer_class": "Qwen2Tokenizer", + "unk_token": null +} diff --git a/GSM-Hard/SLS/Qwen3-8B/checkpoint-100/adapter_config.json b/GSM-Hard/SLS/Qwen3-8B/checkpoint-100/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..271998dc20ade7abfbb98cc5810324672688e50d --- /dev/null +++ b/GSM-Hard/SLS/Qwen3-8B/checkpoint-100/adapter_config.json @@ -0,0 +1,45 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3-8B", + "bias": "none", + "corda_config": null, + "ensure_weight_tying": false, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": false, + "inference_mode": true, + "init_lora_weights": true, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 64, + "lora_bias": false, + "lora_dropout": 0.05, + "lora_ga_config": null, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "peft_type": "LORA", + "peft_version": "0.19.1", + "qalora_group_size": 16, + "r": 64, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "k_proj", + "q_proj", + "o_proj", + "v_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_bdlora": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} diff --git a/GSM-Hard/SLS/Qwen3-8B/checkpoint-100/chat_template.jinja b/GSM-Hard/SLS/Qwen3-8B/checkpoint-100/chat_template.jinja new file mode 100644 index 0000000000000000000000000000000000000000..01be9b307daa2d425f7c168c9fb145a286e0afb4 --- /dev/null +++ b/GSM-Hard/SLS/Qwen3-8B/checkpoint-100/chat_template.jinja @@ -0,0 +1,89 @@ +{%- if tools %} + {{- '<|im_start|>system\n' }} + {%- if messages[0].role == 'system' %} + {{- messages[0].content + '\n\n' }} + {%- endif %} + {{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within XML tags:\n" }} + {%- for tool in tools %} + {{- "\n" }} + {{- tool | tojson }} + {%- endfor %} + {{- "\n\n\nFor each function call, return a json object with function name and arguments within XML tags:\n\n{\"name\": , \"arguments\": }\n<|im_end|>\n" }} +{%- else %} + {%- if messages[0].role == 'system' %} + {{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }} + {%- endif %} +{%- endif %} +{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %} +{%- for message in messages[::-1] %} + {%- set index = (messages|length - 1) - loop.index0 %} + {%- if ns.multi_step_tool and message.role == "user" and message.content is string and not(message.content.startswith('') and message.content.endswith('')) %} + {%- set ns.multi_step_tool = false %} + {%- set ns.last_query_index = index %} + {%- endif %} +{%- endfor %} +{%- for message in messages %} + {%- if message.content is string %} + {%- set content = message.content %} + {%- else %} + {%- set content = '' %} + {%- endif %} + {%- if (message.role == "user") or (message.role == "system" and not loop.first) %} + {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }} + {%- elif message.role == "assistant" %} + {%- set reasoning_content = '' %} + {%- if message.reasoning_content is string %} + {%- set reasoning_content = message.reasoning_content %} + {%- else %} + {%- if '' in content %} + {%- set reasoning_content = content.split('')[0].rstrip('\n').split('')[-1].lstrip('\n') %} + {%- set content = content.split('')[-1].lstrip('\n') %} + {%- endif %} + {%- endif %} + {%- if loop.index0 > ns.last_query_index %} + {%- if loop.last or (not loop.last and reasoning_content) %} + {{- '<|im_start|>' + message.role + '\n\n' + reasoning_content.strip('\n') + '\n\n\n' + content.lstrip('\n') }} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- if message.tool_calls %} + {%- for tool_call in message.tool_calls %} + {%- if (loop.first and content) or (not loop.first) %} + {{- '\n' }} + {%- endif %} + {%- if tool_call.function %} + {%- set tool_call = tool_call.function %} + {%- endif %} + {{- '\n{"name": "' }} + {{- tool_call.name }} + {{- '", "arguments": ' }} + {%- if tool_call.arguments is string %} + {{- tool_call.arguments }} + {%- else %} + {{- tool_call.arguments | tojson }} + {%- endif %} + {{- '}\n' }} + {%- endfor %} + {%- endif %} + {{- '<|im_end|>\n' }} + {%- elif message.role == "tool" %} + {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %} + {{- '<|im_start|>user' }} + {%- endif %} + {{- '\n\n' }} + {{- content }} + {{- '\n' }} + {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %} + {{- '<|im_end|>\n' }} + {%- endif %} + {%- endif %} +{%- endfor %} +{%- if add_generation_prompt %} + {{- '<|im_start|>assistant\n' }} + {%- if enable_thinking is defined and enable_thinking is false %} + {{- '\n\n\n\n' }} + {%- endif %} +{%- endif %} \ No newline at end of file diff --git a/GSM-Hard/SLS/Qwen3-8B/checkpoint-100/tokenizer_config.json b/GSM-Hard/SLS/Qwen3-8B/checkpoint-100/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..5668a4a01433b0648bb972458de616f22f3e728e --- /dev/null +++ b/GSM-Hard/SLS/Qwen3-8B/checkpoint-100/tokenizer_config.json @@ -0,0 +1,30 @@ +{ + "add_prefix_space": false, + "backend": "tokenizers", + "bos_token": null, + "clean_up_tokenization_spaces": false, + "eos_token": "<|im_end|>", + "errors": "replace", + "extra_special_tokens": [ + "<|im_start|>", + "<|im_end|>", + "<|object_ref_start|>", + "<|object_ref_end|>", + "<|box_start|>", + "<|box_end|>", + "<|quad_start|>", + "<|quad_end|>", + "<|vision_start|>", + "<|vision_end|>", + "<|vision_pad|>", + "<|image_pad|>", + "<|video_pad|>" + ], + "is_local": true, + "local_files_only": false, + "model_max_length": 131072, + "pad_token": "<|endoftext|>", + "split_special_tokens": false, + "tokenizer_class": "Qwen2Tokenizer", + "unk_token": null +} diff --git a/GSM-Hard/SLS/Qwen3-8B/final/adapter_config.json b/GSM-Hard/SLS/Qwen3-8B/final/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..271998dc20ade7abfbb98cc5810324672688e50d --- /dev/null +++ b/GSM-Hard/SLS/Qwen3-8B/final/adapter_config.json @@ -0,0 +1,45 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3-8B", + "bias": "none", + "corda_config": null, + "ensure_weight_tying": false, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": false, + "inference_mode": true, + "init_lora_weights": true, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 64, + "lora_bias": false, + "lora_dropout": 0.05, + "lora_ga_config": null, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "peft_type": "LORA", + "peft_version": "0.19.1", + "qalora_group_size": 16, + "r": 64, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "k_proj", + "q_proj", + "o_proj", + "v_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_bdlora": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} diff --git a/GSM-Hard/SLS/Qwen3-8B/final/chat_template.jinja b/GSM-Hard/SLS/Qwen3-8B/final/chat_template.jinja new file mode 100644 index 0000000000000000000000000000000000000000..01be9b307daa2d425f7c168c9fb145a286e0afb4 --- /dev/null +++ b/GSM-Hard/SLS/Qwen3-8B/final/chat_template.jinja @@ -0,0 +1,89 @@ +{%- if tools %} + {{- '<|im_start|>system\n' }} + {%- if messages[0].role == 'system' %} + {{- messages[0].content + '\n\n' }} + {%- endif %} + {{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within XML tags:\n" }} + {%- for tool in tools %} + {{- "\n" }} + {{- tool | tojson }} + {%- endfor %} + {{- "\n\n\nFor each function call, return a json object with function name and arguments within XML tags:\n\n{\"name\": , \"arguments\": }\n<|im_end|>\n" }} +{%- else %} + {%- if messages[0].role == 'system' %} + {{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }} + {%- endif %} +{%- endif %} +{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %} +{%- for message in messages[::-1] %} + {%- set index = (messages|length - 1) - loop.index0 %} + {%- if ns.multi_step_tool and message.role == "user" and message.content is string and not(message.content.startswith('') and message.content.endswith('')) %} + {%- set ns.multi_step_tool = false %} + {%- set ns.last_query_index = index %} + {%- endif %} +{%- endfor %} +{%- for message in messages %} + {%- if message.content is string %} + {%- set content = message.content %} + {%- else %} + {%- set content = '' %} + {%- endif %} + {%- if (message.role == "user") or (message.role == "system" and not loop.first) %} + {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }} + {%- elif message.role == "assistant" %} + {%- set reasoning_content = '' %} + {%- if message.reasoning_content is string %} + {%- set reasoning_content = message.reasoning_content %} + {%- else %} + {%- if '' in content %} + {%- set reasoning_content = content.split('')[0].rstrip('\n').split('')[-1].lstrip('\n') %} + {%- set content = content.split('')[-1].lstrip('\n') %} + {%- endif %} + {%- endif %} + {%- if loop.index0 > ns.last_query_index %} + {%- if loop.last or (not loop.last and reasoning_content) %} + {{- '<|im_start|>' + message.role + '\n\n' + reasoning_content.strip('\n') + '\n\n\n' + content.lstrip('\n') }} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- if message.tool_calls %} + {%- for tool_call in message.tool_calls %} + {%- if (loop.first and content) or (not loop.first) %} + {{- '\n' }} + {%- endif %} + {%- if tool_call.function %} + {%- set tool_call = tool_call.function %} + {%- endif %} + {{- '\n{"name": "' }} + {{- tool_call.name }} + {{- '", "arguments": ' }} + {%- if tool_call.arguments is string %} + {{- tool_call.arguments }} + {%- else %} + {{- tool_call.arguments | tojson }} + {%- endif %} + {{- '}\n' }} + {%- endfor %} + {%- endif %} + {{- '<|im_end|>\n' }} + {%- elif message.role == "tool" %} + {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %} + {{- '<|im_start|>user' }} + {%- endif %} + {{- '\n\n' }} + {{- content }} + {{- '\n' }} + {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %} + {{- '<|im_end|>\n' }} + {%- endif %} + {%- endif %} +{%- endfor %} +{%- if add_generation_prompt %} + {{- '<|im_start|>assistant\n' }} + {%- if enable_thinking is defined and enable_thinking is false %} + {{- '\n\n\n\n' }} + {%- endif %} +{%- endif %} \ No newline at end of file diff --git a/GSM-Hard/SLS/Qwen3-8B/final/rl_train_summary.json b/GSM-Hard/SLS/Qwen3-8B/final/rl_train_summary.json new file mode 100644 index 0000000000000000000000000000000000000000..d3831b5571f40a5c5a661bed31d81e413f9072b9 --- /dev/null +++ b/GSM-Hard/SLS/Qwen3-8B/final/rl_train_summary.json @@ -0,0 +1,8 @@ +{ + "agent": "A3", + "global_step": 173, + "total_records": 2765, + "algorithm": "rwr", + "kl_coef": 0.1, + "world_size": 8 +} diff --git a/GSM-Hard/SLS/Qwen3-8B/final/tokenizer_config.json b/GSM-Hard/SLS/Qwen3-8B/final/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..5668a4a01433b0648bb972458de616f22f3e728e --- /dev/null +++ b/GSM-Hard/SLS/Qwen3-8B/final/tokenizer_config.json @@ -0,0 +1,30 @@ +{ + "add_prefix_space": false, + "backend": "tokenizers", + "bos_token": null, + "clean_up_tokenization_spaces": false, + "eos_token": "<|im_end|>", + "errors": "replace", + "extra_special_tokens": [ + "<|im_start|>", + "<|im_end|>", + "<|object_ref_start|>", + "<|object_ref_end|>", + "<|box_start|>", + "<|box_end|>", + "<|quad_start|>", + "<|quad_end|>", + "<|vision_start|>", + "<|vision_end|>", + "<|vision_pad|>", + "<|image_pad|>", + "<|video_pad|>" + ], + "is_local": true, + "local_files_only": false, + "model_max_length": 131072, + "pad_token": "<|endoftext|>", + "split_special_tokens": false, + "tokenizer_class": "Qwen2Tokenizer", + "unk_token": null +} diff --git a/MATH/PD/Qwen3-1.7B/checkpoint-100/adapter_config.json b/MATH/PD/Qwen3-1.7B/checkpoint-100/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..45d7687739133acb4ecc4f2612b4fb1e22ff43e7 --- /dev/null +++ b/MATH/PD/Qwen3-1.7B/checkpoint-100/adapter_config.json @@ -0,0 +1,45 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3-1.7B", + "bias": "none", + "corda_config": null, + "ensure_weight_tying": false, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": false, + "inference_mode": true, + "init_lora_weights": true, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 64, + "lora_bias": false, + "lora_dropout": 0.05, + "lora_ga_config": null, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "peft_type": "LORA", + "peft_version": "0.19.1", + "qalora_group_size": 16, + "r": 64, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "q_proj", + "o_proj", + "v_proj", + "k_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_bdlora": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} diff --git a/MATH/PD/Qwen3-1.7B/checkpoint-100/chat_template.jinja b/MATH/PD/Qwen3-1.7B/checkpoint-100/chat_template.jinja new file mode 100644 index 0000000000000000000000000000000000000000..01be9b307daa2d425f7c168c9fb145a286e0afb4 --- /dev/null +++ b/MATH/PD/Qwen3-1.7B/checkpoint-100/chat_template.jinja @@ -0,0 +1,89 @@ +{%- if tools %} + {{- '<|im_start|>system\n' }} + {%- if messages[0].role == 'system' %} + {{- messages[0].content + '\n\n' }} + {%- endif %} + {{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within XML tags:\n" }} + {%- for tool in tools %} + {{- "\n" }} + {{- tool | tojson }} + {%- endfor %} + {{- "\n\n\nFor each function call, return a json object with function name and arguments within XML tags:\n\n{\"name\": , \"arguments\": }\n<|im_end|>\n" }} +{%- else %} + {%- if messages[0].role == 'system' %} + {{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }} + {%- endif %} +{%- endif %} +{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %} +{%- for message in messages[::-1] %} + {%- set index = (messages|length - 1) - loop.index0 %} + {%- if ns.multi_step_tool and message.role == "user" and message.content is string and not(message.content.startswith('') and message.content.endswith('')) %} + {%- set ns.multi_step_tool = false %} + {%- set ns.last_query_index = index %} + {%- endif %} +{%- endfor %} +{%- for message in messages %} + {%- if message.content is string %} + {%- set content = message.content %} + {%- else %} + {%- set content = '' %} + {%- endif %} + {%- if (message.role == "user") or (message.role == "system" and not loop.first) %} + {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }} + {%- elif message.role == "assistant" %} + {%- set reasoning_content = '' %} + {%- if message.reasoning_content is string %} + {%- set reasoning_content = message.reasoning_content %} + {%- else %} + {%- if '' in content %} + {%- set reasoning_content = content.split('')[0].rstrip('\n').split('')[-1].lstrip('\n') %} + {%- set content = content.split('')[-1].lstrip('\n') %} + {%- endif %} + {%- endif %} + {%- if loop.index0 > ns.last_query_index %} + {%- if loop.last or (not loop.last and reasoning_content) %} + {{- '<|im_start|>' + message.role + '\n\n' + reasoning_content.strip('\n') + '\n\n\n' + content.lstrip('\n') }} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- if message.tool_calls %} + {%- for tool_call in message.tool_calls %} + {%- if (loop.first and content) or (not loop.first) %} + {{- '\n' }} + {%- endif %} + {%- if tool_call.function %} + {%- set tool_call = tool_call.function %} + {%- endif %} + {{- '\n{"name": "' }} + {{- tool_call.name }} + {{- '", "arguments": ' }} + {%- if tool_call.arguments is string %} + {{- tool_call.arguments }} + {%- else %} + {{- tool_call.arguments | tojson }} + {%- endif %} + {{- '}\n' }} + {%- endfor %} + {%- endif %} + {{- '<|im_end|>\n' }} + {%- elif message.role == "tool" %} + {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %} + {{- '<|im_start|>user' }} + {%- endif %} + {{- '\n\n' }} + {{- content }} + {{- '\n' }} + {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %} + {{- '<|im_end|>\n' }} + {%- endif %} + {%- endif %} +{%- endfor %} +{%- if add_generation_prompt %} + {{- '<|im_start|>assistant\n' }} + {%- if enable_thinking is defined and enable_thinking is false %} + {{- '\n\n\n\n' }} + {%- endif %} +{%- endif %} \ No newline at end of file diff --git a/MATH/PD/Qwen3-1.7B/checkpoint-100/tokenizer_config.json b/MATH/PD/Qwen3-1.7B/checkpoint-100/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..5668a4a01433b0648bb972458de616f22f3e728e --- /dev/null +++ b/MATH/PD/Qwen3-1.7B/checkpoint-100/tokenizer_config.json @@ -0,0 +1,30 @@ +{ + "add_prefix_space": false, + "backend": "tokenizers", + "bos_token": null, + "clean_up_tokenization_spaces": false, + "eos_token": "<|im_end|>", + "errors": "replace", + "extra_special_tokens": [ + "<|im_start|>", + "<|im_end|>", + "<|object_ref_start|>", + "<|object_ref_end|>", + "<|box_start|>", + "<|box_end|>", + "<|quad_start|>", + "<|quad_end|>", + "<|vision_start|>", + "<|vision_end|>", + "<|vision_pad|>", + "<|image_pad|>", + "<|video_pad|>" + ], + "is_local": true, + "local_files_only": false, + "model_max_length": 131072, + "pad_token": "<|endoftext|>", + "split_special_tokens": false, + "tokenizer_class": "Qwen2Tokenizer", + "unk_token": null +} diff --git a/MATH/PD/Qwen3-1.7B/checkpoint-100/trainer_state.json b/MATH/PD/Qwen3-1.7B/checkpoint-100/trainer_state.json new file mode 100644 index 0000000000000000000000000000000000000000..6aa08e1cee76f69c8de31bd34d6839f9e9ce2993 --- /dev/null +++ b/MATH/PD/Qwen3-1.7B/checkpoint-100/trainer_state.json @@ -0,0 +1,120 @@ +{ + "best_global_step": 100, + "best_metric": 0.24447518587112427, + "best_model_checkpoint": "source_project/experiments/math_specific_sft_rl_v1/artifacts/math_specific_sft_rl_reuse_legacy_v4d_real_rollout_sft_protocol_floor_v2_20260830/01_sft/adapters/A1/checkpoint-100", + "epoch": 1.5190839694656488, + "eval_steps": 50, + "global_step": 100, + "is_hyper_param_search": false, + "is_local_process_zero": true, + "is_world_process_zero": true, + "log_history": [ + { + "epoch": 0.15267175572519084, + "grad_norm": 3.1567957401275635, + "learning_rate": 9e-06, + "loss": 0.8258050918579102, + "step": 10 + }, + { + "epoch": 0.3053435114503817, + "grad_norm": 1.2992686033248901, + "learning_rate": 9.943559569286731e-06, + "loss": 0.6300257682800293, + "step": 20 + }, + { + "epoch": 0.4580152671755725, + "grad_norm": 0.35774725675582886, + "learning_rate": 9.75009217427352e-06, + "loss": 0.4455385208129883, + "step": 30 + }, + { + "epoch": 0.6106870229007634, + "grad_norm": 0.3282684087753296, + "learning_rate": 9.424289624237143e-06, + "loss": 0.40243377685546877, + "step": 40 + }, + { + "epoch": 0.7633587786259542, + "grad_norm": 0.29107794165611267, + "learning_rate": 8.975228612720415e-06, + "loss": 0.3573720932006836, + "step": 50 + }, + { + "epoch": 0.7633587786259542, + "eval_loss": 0.3532555401325226, + "eval_runtime": 19.8117, + "eval_samples_per_second": 5.552, + "eval_steps_per_second": 0.707, + "step": 50 + }, + { + "epoch": 0.916030534351145, + "grad_norm": 0.260421484708786, + "learning_rate": 8.415419751390155e-06, + "loss": 0.3471336841583252, + "step": 60 + }, + { + "epoch": 1.0610687022900764, + "grad_norm": 0.2985946238040924, + "learning_rate": 7.760459030751285e-06, + "loss": 0.3162586212158203, + "step": 70 + }, + { + "epoch": 1.213740458015267, + "grad_norm": 0.23947036266326904, + "learning_rate": 7.028593323773819e-06, + "loss": 0.2887066602706909, + "step": 80 + }, + { + "epoch": 1.366412213740458, + "grad_norm": 0.3040008246898651, + "learning_rate": 6.240212037280967e-06, + "loss": 0.27902913093566895, + "step": 90 + }, + { + "epoch": 1.5190839694656488, + "grad_norm": 0.2327352613210678, + "learning_rate": 5.41727907343245e-06, + "loss": 0.2482921838760376, + "step": 100 + }, + { + "epoch": 1.5190839694656488, + "eval_loss": 0.24447518587112427, + "eval_runtime": 19.6876, + "eval_samples_per_second": 5.587, + "eval_steps_per_second": 0.711, + "step": 100 + } + ], + "logging_steps": 10, + "max_steps": 198, + "num_input_tokens_seen": 0, + "num_train_epochs": 3, + "save_steps": 50, + "stateful_callbacks": { + "TrainerControl": { + "args": { + "should_epoch_stop": false, + "should_evaluate": false, + "should_log": false, + "should_save": true, + "should_training_stop": false + }, + "attributes": {} + } + }, + "total_flos": 2.966891923714867e+16, + "train_batch_size": 1, + "trial_name": null, + "trial_params": null +} diff --git a/MATH/PD/Qwen3-1.7B/checkpoint-150/adapter_config.json b/MATH/PD/Qwen3-1.7B/checkpoint-150/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..45d7687739133acb4ecc4f2612b4fb1e22ff43e7 --- /dev/null +++ b/MATH/PD/Qwen3-1.7B/checkpoint-150/adapter_config.json @@ -0,0 +1,45 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3-1.7B", + "bias": "none", + "corda_config": null, + "ensure_weight_tying": false, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": false, + "inference_mode": true, + "init_lora_weights": true, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 64, + "lora_bias": false, + "lora_dropout": 0.05, + "lora_ga_config": null, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "peft_type": "LORA", + "peft_version": "0.19.1", + "qalora_group_size": 16, + "r": 64, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "q_proj", + "o_proj", + "v_proj", + "k_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_bdlora": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} diff --git a/MATH/PD/Qwen3-1.7B/checkpoint-150/chat_template.jinja b/MATH/PD/Qwen3-1.7B/checkpoint-150/chat_template.jinja new file mode 100644 index 0000000000000000000000000000000000000000..01be9b307daa2d425f7c168c9fb145a286e0afb4 --- /dev/null +++ b/MATH/PD/Qwen3-1.7B/checkpoint-150/chat_template.jinja @@ -0,0 +1,89 @@ +{%- if tools %} + {{- '<|im_start|>system\n' }} + {%- if messages[0].role == 'system' %} + {{- messages[0].content + '\n\n' }} + {%- endif %} + {{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within XML tags:\n" }} + {%- for tool in tools %} + {{- "\n" }} + {{- tool | tojson }} + {%- endfor %} + {{- "\n\n\nFor each function call, return a json object with function name and arguments within XML tags:\n\n{\"name\": , \"arguments\": }\n<|im_end|>\n" }} +{%- else %} + {%- if messages[0].role == 'system' %} + {{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }} + {%- endif %} +{%- endif %} +{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %} +{%- for message in messages[::-1] %} + {%- set index = (messages|length - 1) - loop.index0 %} + {%- if ns.multi_step_tool and message.role == "user" and message.content is string and not(message.content.startswith('') and message.content.endswith('')) %} + {%- set ns.multi_step_tool = false %} + {%- set ns.last_query_index = index %} + {%- endif %} +{%- endfor %} +{%- for message in messages %} + {%- if message.content is string %} + {%- set content = message.content %} + {%- else %} + {%- set content = '' %} + {%- endif %} + {%- if (message.role == "user") or (message.role == "system" and not loop.first) %} + {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }} + {%- elif message.role == "assistant" %} + {%- set reasoning_content = '' %} + {%- if message.reasoning_content is string %} + {%- set reasoning_content = message.reasoning_content %} + {%- else %} + {%- if '' in content %} + {%- set reasoning_content = content.split('')[0].rstrip('\n').split('')[-1].lstrip('\n') %} + {%- set content = content.split('')[-1].lstrip('\n') %} + {%- endif %} + {%- endif %} + {%- if loop.index0 > ns.last_query_index %} + {%- if loop.last or (not loop.last and reasoning_content) %} + {{- '<|im_start|>' + message.role + '\n\n' + reasoning_content.strip('\n') + '\n\n\n' + content.lstrip('\n') }} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- if message.tool_calls %} + {%- for tool_call in message.tool_calls %} + {%- if (loop.first and content) or (not loop.first) %} + {{- '\n' }} + {%- endif %} + {%- if tool_call.function %} + {%- set tool_call = tool_call.function %} + {%- endif %} + {{- '\n{"name": "' }} + {{- tool_call.name }} + {{- '", "arguments": ' }} + {%- if tool_call.arguments is string %} + {{- tool_call.arguments }} + {%- else %} + {{- tool_call.arguments | tojson }} + {%- endif %} + {{- '}\n' }} + {%- endfor %} + {%- endif %} + {{- '<|im_end|>\n' }} + {%- elif message.role == "tool" %} + {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %} + {{- '<|im_start|>user' }} + {%- endif %} + {{- '\n\n' }} + {{- content }} + {{- '\n' }} + {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %} + {{- '<|im_end|>\n' }} + {%- endif %} + {%- endif %} +{%- endfor %} +{%- if add_generation_prompt %} + {{- '<|im_start|>assistant\n' }} + {%- if enable_thinking is defined and enable_thinking is false %} + {{- '\n\n\n\n' }} + {%- endif %} +{%- endif %} \ No newline at end of file diff --git a/MATH/PD/Qwen3-1.7B/checkpoint-150/tokenizer_config.json b/MATH/PD/Qwen3-1.7B/checkpoint-150/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..5668a4a01433b0648bb972458de616f22f3e728e --- /dev/null +++ b/MATH/PD/Qwen3-1.7B/checkpoint-150/tokenizer_config.json @@ -0,0 +1,30 @@ +{ + "add_prefix_space": false, + "backend": "tokenizers", + "bos_token": null, + "clean_up_tokenization_spaces": false, + "eos_token": "<|im_end|>", + "errors": "replace", + "extra_special_tokens": [ + "<|im_start|>", + "<|im_end|>", + "<|object_ref_start|>", + "<|object_ref_end|>", + "<|box_start|>", + "<|box_end|>", + "<|quad_start|>", + "<|quad_end|>", + "<|vision_start|>", + "<|vision_end|>", + "<|vision_pad|>", + "<|image_pad|>", + "<|video_pad|>" + ], + "is_local": true, + "local_files_only": false, + "model_max_length": 131072, + "pad_token": "<|endoftext|>", + "split_special_tokens": false, + "tokenizer_class": "Qwen2Tokenizer", + "unk_token": null +} diff --git a/MATH/PD/Qwen3-1.7B/checkpoint-150/trainer_state.json b/MATH/PD/Qwen3-1.7B/checkpoint-150/trainer_state.json new file mode 100644 index 0000000000000000000000000000000000000000..2236c487fa2a08808842bd8f4cf761270a8fc48a --- /dev/null +++ b/MATH/PD/Qwen3-1.7B/checkpoint-150/trainer_state.json @@ -0,0 +1,163 @@ +{ + "best_global_step": 150, + "best_metric": 0.19248250126838684, + "best_model_checkpoint": "source_project/experiments/math_specific_sft_rl_v1/artifacts/math_specific_sft_rl_reuse_legacy_v4d_real_rollout_sft_protocol_floor_v2_20260830/01_sft/adapters/A1/checkpoint-150", + "epoch": 2.2748091603053435, + "eval_steps": 50, + "global_step": 150, + "is_hyper_param_search": false, + "is_local_process_zero": true, + "is_world_process_zero": true, + "log_history": [ + { + "epoch": 0.15267175572519084, + "grad_norm": 3.1567957401275635, + "learning_rate": 9e-06, + "loss": 0.8258050918579102, + "step": 10 + }, + { + "epoch": 0.3053435114503817, + "grad_norm": 1.2992686033248901, + "learning_rate": 9.943559569286731e-06, + "loss": 0.6300257682800293, + "step": 20 + }, + { + "epoch": 0.4580152671755725, + "grad_norm": 0.35774725675582886, + "learning_rate": 9.75009217427352e-06, + "loss": 0.4455385208129883, + "step": 30 + }, + { + "epoch": 0.6106870229007634, + "grad_norm": 0.3282684087753296, + "learning_rate": 9.424289624237143e-06, + "loss": 0.40243377685546877, + "step": 40 + }, + { + "epoch": 0.7633587786259542, + "grad_norm": 0.29107794165611267, + "learning_rate": 8.975228612720415e-06, + "loss": 0.3573720932006836, + "step": 50 + }, + { + "epoch": 0.7633587786259542, + "eval_loss": 0.3532555401325226, + "eval_runtime": 19.8117, + "eval_samples_per_second": 5.552, + "eval_steps_per_second": 0.707, + "step": 50 + }, + { + "epoch": 0.916030534351145, + "grad_norm": 0.260421484708786, + "learning_rate": 8.415419751390155e-06, + "loss": 0.3471336841583252, + "step": 60 + }, + { + "epoch": 1.0610687022900764, + "grad_norm": 0.2985946238040924, + "learning_rate": 7.760459030751285e-06, + "loss": 0.3162586212158203, + "step": 70 + }, + { + "epoch": 1.213740458015267, + "grad_norm": 0.23947036266326904, + "learning_rate": 7.028593323773819e-06, + "loss": 0.2887066602706909, + "step": 80 + }, + { + "epoch": 1.366412213740458, + "grad_norm": 0.3040008246898651, + "learning_rate": 6.240212037280967e-06, + "loss": 0.27902913093566895, + "step": 90 + }, + { + "epoch": 1.5190839694656488, + "grad_norm": 0.2327352613210678, + "learning_rate": 5.41727907343245e-06, + "loss": 0.2482921838760376, + "step": 100 + }, + { + "epoch": 1.5190839694656488, + "eval_loss": 0.24447518587112427, + "eval_runtime": 19.6876, + "eval_samples_per_second": 5.587, + "eval_steps_per_second": 0.711, + "step": 100 + }, + { + "epoch": 1.6717557251908397, + "grad_norm": 0.29827895760536194, + "learning_rate": 4.582720926567552e-06, + "loss": 0.228773832321167, + "step": 110 + }, + { + "epoch": 1.8244274809160306, + "grad_norm": 0.29902011156082153, + "learning_rate": 3.7597879627190337e-06, + "loss": 0.22251617908477783, + "step": 120 + }, + { + "epoch": 1.9770992366412212, + "grad_norm": 0.25436460971832275, + "learning_rate": 2.9714066762261825e-06, + "loss": 0.20800313949584961, + "step": 130 + }, + { + "epoch": 2.122137404580153, + "grad_norm": 0.22389169037342072, + "learning_rate": 2.2395409692487174e-06, + "loss": 0.20263421535491943, + "step": 140 + }, + { + "epoch": 2.2748091603053435, + "grad_norm": 0.2508806884288788, + "learning_rate": 1.5845802486098461e-06, + "loss": 0.19670305252075196, + "step": 150 + }, + { + "epoch": 2.2748091603053435, + "eval_loss": 0.19248250126838684, + "eval_runtime": 19.2862, + "eval_samples_per_second": 5.704, + "eval_steps_per_second": 0.726, + "step": 150 + } + ], + "logging_steps": 10, + "max_steps": 198, + "num_input_tokens_seen": 0, + "num_train_epochs": 3, + "save_steps": 50, + "stateful_callbacks": { + "TrainerControl": { + "args": { + "should_epoch_stop": false, + "should_evaluate": false, + "should_log": false, + "should_save": true, + "should_training_stop": false + }, + "attributes": {} + } + }, + "total_flos": 4.448180483234202e+16, + "train_batch_size": 1, + "trial_name": null, + "trial_params": null +} diff --git a/MATH/PD/Qwen3-1.7B/checkpoint-198/adapter_config.json b/MATH/PD/Qwen3-1.7B/checkpoint-198/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..45d7687739133acb4ecc4f2612b4fb1e22ff43e7 --- /dev/null +++ b/MATH/PD/Qwen3-1.7B/checkpoint-198/adapter_config.json @@ -0,0 +1,45 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3-1.7B", + "bias": "none", + "corda_config": null, + "ensure_weight_tying": false, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": false, + "inference_mode": true, + "init_lora_weights": true, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 64, + "lora_bias": false, + "lora_dropout": 0.05, + "lora_ga_config": null, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "peft_type": "LORA", + "peft_version": "0.19.1", + "qalora_group_size": 16, + "r": 64, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "q_proj", + "o_proj", + "v_proj", + "k_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_bdlora": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} diff --git a/MATH/PD/Qwen3-1.7B/checkpoint-198/chat_template.jinja b/MATH/PD/Qwen3-1.7B/checkpoint-198/chat_template.jinja new file mode 100644 index 0000000000000000000000000000000000000000..01be9b307daa2d425f7c168c9fb145a286e0afb4 --- /dev/null +++ b/MATH/PD/Qwen3-1.7B/checkpoint-198/chat_template.jinja @@ -0,0 +1,89 @@ +{%- if tools %} + {{- '<|im_start|>system\n' }} + {%- if messages[0].role == 'system' %} + {{- messages[0].content + '\n\n' }} + {%- endif %} + {{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within XML tags:\n" }} + {%- for tool in tools %} + {{- "\n" }} + {{- tool | tojson }} + {%- endfor %} + {{- "\n\n\nFor each function call, return a json object with function name and arguments within XML tags:\n\n{\"name\": , \"arguments\": }\n<|im_end|>\n" }} +{%- else %} + {%- if messages[0].role == 'system' %} + {{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }} + {%- endif %} +{%- endif %} +{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %} +{%- for message in messages[::-1] %} + {%- set index = (messages|length - 1) - loop.index0 %} + {%- if ns.multi_step_tool and message.role == "user" and message.content is string and not(message.content.startswith('') and message.content.endswith('')) %} + {%- set ns.multi_step_tool = false %} + {%- set ns.last_query_index = index %} + {%- endif %} +{%- endfor %} +{%- for message in messages %} + {%- if message.content is string %} + {%- set content = message.content %} + {%- else %} + {%- set content = '' %} + {%- endif %} + {%- if (message.role == "user") or (message.role == "system" and not loop.first) %} + {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }} + {%- elif message.role == "assistant" %} + {%- set reasoning_content = '' %} + {%- if message.reasoning_content is string %} + {%- set reasoning_content = message.reasoning_content %} + {%- else %} + {%- if '' in content %} + {%- set reasoning_content = content.split('')[0].rstrip('\n').split('')[-1].lstrip('\n') %} + {%- set content = content.split('')[-1].lstrip('\n') %} + {%- endif %} + {%- endif %} + {%- if loop.index0 > ns.last_query_index %} + {%- if loop.last or (not loop.last and reasoning_content) %} + {{- '<|im_start|>' + message.role + '\n\n' + reasoning_content.strip('\n') + '\n\n\n' + content.lstrip('\n') }} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- if message.tool_calls %} + {%- for tool_call in message.tool_calls %} + {%- if (loop.first and content) or (not loop.first) %} + {{- '\n' }} + {%- endif %} + {%- if tool_call.function %} + {%- set tool_call = tool_call.function %} + {%- endif %} + {{- '\n{"name": "' }} + {{- tool_call.name }} + {{- '", "arguments": ' }} + {%- if tool_call.arguments is string %} + {{- tool_call.arguments }} + {%- else %} + {{- tool_call.arguments | tojson }} + {%- endif %} + {{- '}\n' }} + {%- endfor %} + {%- endif %} + {{- '<|im_end|>\n' }} + {%- elif message.role == "tool" %} + {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %} + {{- '<|im_start|>user' }} + {%- endif %} + {{- '\n\n' }} + {{- content }} + {{- '\n' }} + {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %} + {{- '<|im_end|>\n' }} + {%- endif %} + {%- endif %} +{%- endfor %} +{%- if add_generation_prompt %} + {{- '<|im_start|>assistant\n' }} + {%- if enable_thinking is defined and enable_thinking is false %} + {{- '\n\n\n\n' }} + {%- endif %} +{%- endif %} \ No newline at end of file diff --git a/MATH/PD/Qwen3-1.7B/checkpoint-198/tokenizer_config.json b/MATH/PD/Qwen3-1.7B/checkpoint-198/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..5668a4a01433b0648bb972458de616f22f3e728e --- /dev/null +++ b/MATH/PD/Qwen3-1.7B/checkpoint-198/tokenizer_config.json @@ -0,0 +1,30 @@ +{ + "add_prefix_space": false, + "backend": "tokenizers", + "bos_token": null, + "clean_up_tokenization_spaces": false, + "eos_token": "<|im_end|>", + "errors": "replace", + "extra_special_tokens": [ + "<|im_start|>", + "<|im_end|>", + "<|object_ref_start|>", + "<|object_ref_end|>", + "<|box_start|>", + "<|box_end|>", + "<|quad_start|>", + "<|quad_end|>", + "<|vision_start|>", + "<|vision_end|>", + "<|vision_pad|>", + "<|image_pad|>", + "<|video_pad|>" + ], + "is_local": true, + "local_files_only": false, + "model_max_length": 131072, + "pad_token": "<|endoftext|>", + "split_special_tokens": false, + "tokenizer_class": "Qwen2Tokenizer", + "unk_token": null +} diff --git a/MATH/PD/Qwen3-1.7B/checkpoint-198/trainer_state.json b/MATH/PD/Qwen3-1.7B/checkpoint-198/trainer_state.json new file mode 100644 index 0000000000000000000000000000000000000000..84eba3cf980aada54059fe008278231b7fae9d1b --- /dev/null +++ b/MATH/PD/Qwen3-1.7B/checkpoint-198/trainer_state.json @@ -0,0 +1,199 @@ +{ + "best_global_step": 198, + "best_metric": 0.1860458254814148, + "best_model_checkpoint": "source_project/experiments/math_specific_sft_rl_v1/artifacts/math_specific_sft_rl_reuse_legacy_v4d_real_rollout_sft_protocol_floor_v2_20260830/01_sft/adapters/A1/checkpoint-198", + "epoch": 3.0, + "eval_steps": 50, + "global_step": 198, + "is_hyper_param_search": false, + "is_local_process_zero": true, + "is_world_process_zero": true, + "log_history": [ + { + "epoch": 0.15267175572519084, + "grad_norm": 3.1567957401275635, + "learning_rate": 9e-06, + "loss": 0.8258050918579102, + "step": 10 + }, + { + "epoch": 0.3053435114503817, + "grad_norm": 1.2992686033248901, + "learning_rate": 9.943559569286731e-06, + "loss": 0.6300257682800293, + "step": 20 + }, + { + "epoch": 0.4580152671755725, + "grad_norm": 0.35774725675582886, + "learning_rate": 9.75009217427352e-06, + "loss": 0.4455385208129883, + "step": 30 + }, + { + "epoch": 0.6106870229007634, + "grad_norm": 0.3282684087753296, + "learning_rate": 9.424289624237143e-06, + "loss": 0.40243377685546877, + "step": 40 + }, + { + "epoch": 0.7633587786259542, + "grad_norm": 0.29107794165611267, + "learning_rate": 8.975228612720415e-06, + "loss": 0.3573720932006836, + "step": 50 + }, + { + "epoch": 0.7633587786259542, + "eval_loss": 0.3532555401325226, + "eval_runtime": 19.8117, + "eval_samples_per_second": 5.552, + "eval_steps_per_second": 0.707, + "step": 50 + }, + { + "epoch": 0.916030534351145, + "grad_norm": 0.260421484708786, + "learning_rate": 8.415419751390155e-06, + "loss": 0.3471336841583252, + "step": 60 + }, + { + "epoch": 1.0610687022900764, + "grad_norm": 0.2985946238040924, + "learning_rate": 7.760459030751285e-06, + "loss": 0.3162586212158203, + "step": 70 + }, + { + "epoch": 1.213740458015267, + "grad_norm": 0.23947036266326904, + "learning_rate": 7.028593323773819e-06, + "loss": 0.2887066602706909, + "step": 80 + }, + { + "epoch": 1.366412213740458, + "grad_norm": 0.3040008246898651, + "learning_rate": 6.240212037280967e-06, + "loss": 0.27902913093566895, + "step": 90 + }, + { + "epoch": 1.5190839694656488, + "grad_norm": 0.2327352613210678, + "learning_rate": 5.41727907343245e-06, + "loss": 0.2482921838760376, + "step": 100 + }, + { + "epoch": 1.5190839694656488, + "eval_loss": 0.24447518587112427, + "eval_runtime": 19.6876, + "eval_samples_per_second": 5.587, + "eval_steps_per_second": 0.711, + "step": 100 + }, + { + "epoch": 1.6717557251908397, + "grad_norm": 0.29827895760536194, + "learning_rate": 4.582720926567552e-06, + "loss": 0.228773832321167, + "step": 110 + }, + { + "epoch": 1.8244274809160306, + "grad_norm": 0.29902011156082153, + "learning_rate": 3.7597879627190337e-06, + "loss": 0.22251617908477783, + "step": 120 + }, + { + "epoch": 1.9770992366412212, + "grad_norm": 0.25436460971832275, + "learning_rate": 2.9714066762261825e-06, + "loss": 0.20800313949584961, + "step": 130 + }, + { + "epoch": 2.122137404580153, + "grad_norm": 0.22389169037342072, + "learning_rate": 2.2395409692487174e-06, + "loss": 0.20263421535491943, + "step": 140 + }, + { + "epoch": 2.2748091603053435, + "grad_norm": 0.2508806884288788, + "learning_rate": 1.5845802486098461e-06, + "loss": 0.19670305252075196, + "step": 150 + }, + { + "epoch": 2.2748091603053435, + "eval_loss": 0.19248250126838684, + "eval_runtime": 19.2862, + "eval_samples_per_second": 5.704, + "eval_steps_per_second": 0.726, + "step": 150 + }, + { + "epoch": 2.427480916030534, + "grad_norm": 0.2873935401439667, + "learning_rate": 1.024771387279585e-06, + "loss": 0.1819478988647461, + "step": 160 + }, + { + "epoch": 2.5801526717557253, + "grad_norm": 0.2759878933429718, + "learning_rate": 5.757103757628573e-07, + "loss": 0.19034929275512696, + "step": 170 + }, + { + "epoch": 2.732824427480916, + "grad_norm": 0.3156687021255493, + "learning_rate": 2.4990782572647977e-07, + "loss": 0.19006810188293458, + "step": 180 + }, + { + "epoch": 2.885496183206107, + "grad_norm": 0.2467876523733139, + "learning_rate": 5.6440430713269325e-08, + "loss": 0.18648893833160402, + "step": 190 + }, + { + "epoch": 3.0, + "eval_loss": 0.1860458254814148, + "eval_runtime": 20.0458, + "eval_samples_per_second": 5.487, + "eval_steps_per_second": 0.698, + "step": 198 + } + ], + "logging_steps": 10, + "max_steps": 198, + "num_input_tokens_seen": 0, + "num_train_epochs": 3, + "save_steps": 50, + "stateful_callbacks": { + "TrainerControl": { + "args": { + "should_epoch_stop": false, + "should_evaluate": false, + "should_log": false, + "should_save": true, + "should_training_stop": true + }, + "attributes": {} + } + }, + "total_flos": 5.863214796714803e+16, + "train_batch_size": 1, + "trial_name": null, + "trial_params": null +} diff --git a/MATH/PD/Qwen3-1.7B/checkpoint-50/adapter_config.json b/MATH/PD/Qwen3-1.7B/checkpoint-50/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..45d7687739133acb4ecc4f2612b4fb1e22ff43e7 --- /dev/null +++ b/MATH/PD/Qwen3-1.7B/checkpoint-50/adapter_config.json @@ -0,0 +1,45 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3-1.7B", + "bias": "none", + "corda_config": null, + "ensure_weight_tying": false, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": false, + "inference_mode": true, + "init_lora_weights": true, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 64, + "lora_bias": false, + "lora_dropout": 0.05, + "lora_ga_config": null, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "peft_type": "LORA", + "peft_version": "0.19.1", + "qalora_group_size": 16, + "r": 64, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "q_proj", + "o_proj", + "v_proj", + "k_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_bdlora": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} diff --git a/MATH/PD/Qwen3-1.7B/checkpoint-50/chat_template.jinja b/MATH/PD/Qwen3-1.7B/checkpoint-50/chat_template.jinja new file mode 100644 index 0000000000000000000000000000000000000000..01be9b307daa2d425f7c168c9fb145a286e0afb4 --- /dev/null +++ b/MATH/PD/Qwen3-1.7B/checkpoint-50/chat_template.jinja @@ -0,0 +1,89 @@ +{%- if tools %} + {{- '<|im_start|>system\n' }} + {%- if messages[0].role == 'system' %} + {{- messages[0].content + '\n\n' }} + {%- endif %} + {{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within XML tags:\n" }} + {%- for tool in tools %} + {{- "\n" }} + {{- tool | tojson }} + {%- endfor %} + {{- "\n\n\nFor each function call, return a json object with function name and arguments within XML tags:\n\n{\"name\": , \"arguments\": }\n<|im_end|>\n" }} +{%- else %} + {%- if messages[0].role == 'system' %} + {{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }} + {%- endif %} +{%- endif %} +{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %} +{%- for message in messages[::-1] %} + {%- set index = (messages|length - 1) - loop.index0 %} + {%- if ns.multi_step_tool and message.role == "user" and message.content is string and not(message.content.startswith('') and message.content.endswith('')) %} + {%- set ns.multi_step_tool = false %} + {%- set ns.last_query_index = index %} + {%- endif %} +{%- endfor %} +{%- for message in messages %} + {%- if message.content is string %} + {%- set content = message.content %} + {%- else %} + {%- set content = '' %} + {%- endif %} + {%- if (message.role == "user") or (message.role == "system" and not loop.first) %} + {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }} + {%- elif message.role == "assistant" %} + {%- set reasoning_content = '' %} + {%- if message.reasoning_content is string %} + {%- set reasoning_content = message.reasoning_content %} + {%- else %} + {%- if '' in content %} + {%- set reasoning_content = content.split('')[0].rstrip('\n').split('')[-1].lstrip('\n') %} + {%- set content = content.split('')[-1].lstrip('\n') %} + {%- endif %} + {%- endif %} + {%- if loop.index0 > ns.last_query_index %} + {%- if loop.last or (not loop.last and reasoning_content) %} + {{- '<|im_start|>' + message.role + '\n\n' + reasoning_content.strip('\n') + '\n\n\n' + content.lstrip('\n') }} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- if message.tool_calls %} + {%- for tool_call in message.tool_calls %} + {%- if (loop.first and content) or (not loop.first) %} + {{- '\n' }} + {%- endif %} + {%- if tool_call.function %} + {%- set tool_call = tool_call.function %} + {%- endif %} + {{- '\n{"name": "' }} + {{- tool_call.name }} + {{- '", "arguments": ' }} + {%- if tool_call.arguments is string %} + {{- tool_call.arguments }} + {%- else %} + {{- tool_call.arguments | tojson }} + {%- endif %} + {{- '}\n' }} + {%- endfor %} + {%- endif %} + {{- '<|im_end|>\n' }} + {%- elif message.role == "tool" %} + {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %} + {{- '<|im_start|>user' }} + {%- endif %} + {{- '\n\n' }} + {{- content }} + {{- '\n' }} + {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %} + {{- '<|im_end|>\n' }} + {%- endif %} + {%- endif %} +{%- endfor %} +{%- if add_generation_prompt %} + {{- '<|im_start|>assistant\n' }} + {%- if enable_thinking is defined and enable_thinking is false %} + {{- '\n\n\n\n' }} + {%- endif %} +{%- endif %} \ No newline at end of file diff --git a/MATH/PD/Qwen3-1.7B/checkpoint-50/tokenizer_config.json b/MATH/PD/Qwen3-1.7B/checkpoint-50/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..5668a4a01433b0648bb972458de616f22f3e728e --- /dev/null +++ b/MATH/PD/Qwen3-1.7B/checkpoint-50/tokenizer_config.json @@ -0,0 +1,30 @@ +{ + "add_prefix_space": false, + "backend": "tokenizers", + "bos_token": null, + "clean_up_tokenization_spaces": false, + "eos_token": "<|im_end|>", + "errors": "replace", + "extra_special_tokens": [ + "<|im_start|>", + "<|im_end|>", + "<|object_ref_start|>", + "<|object_ref_end|>", + "<|box_start|>", + "<|box_end|>", + "<|quad_start|>", + "<|quad_end|>", + "<|vision_start|>", + "<|vision_end|>", + "<|vision_pad|>", + "<|image_pad|>", + "<|video_pad|>" + ], + "is_local": true, + "local_files_only": false, + "model_max_length": 131072, + "pad_token": "<|endoftext|>", + "split_special_tokens": false, + "tokenizer_class": "Qwen2Tokenizer", + "unk_token": null +} diff --git a/MATH/PD/Qwen3-1.7B/checkpoint-50/trainer_state.json b/MATH/PD/Qwen3-1.7B/checkpoint-50/trainer_state.json new file mode 100644 index 0000000000000000000000000000000000000000..5668426ed3302bb1b36160074d2a3b91be5a1a0e --- /dev/null +++ b/MATH/PD/Qwen3-1.7B/checkpoint-50/trainer_state.json @@ -0,0 +1,77 @@ +{ + "best_global_step": 50, + "best_metric": 0.3532555401325226, + "best_model_checkpoint": "source_project/experiments/math_specific_sft_rl_v1/artifacts/math_specific_sft_rl_reuse_legacy_v4d_real_rollout_sft_protocol_floor_v2_20260830/01_sft/adapters/A1/checkpoint-50", + "epoch": 0.7633587786259542, + "eval_steps": 50, + "global_step": 50, + "is_hyper_param_search": false, + "is_local_process_zero": true, + "is_world_process_zero": true, + "log_history": [ + { + "epoch": 0.15267175572519084, + "grad_norm": 3.1567957401275635, + "learning_rate": 9e-06, + "loss": 0.8258050918579102, + "step": 10 + }, + { + "epoch": 0.3053435114503817, + "grad_norm": 1.2992686033248901, + "learning_rate": 9.943559569286731e-06, + "loss": 0.6300257682800293, + "step": 20 + }, + { + "epoch": 0.4580152671755725, + "grad_norm": 0.35774725675582886, + "learning_rate": 9.75009217427352e-06, + "loss": 0.4455385208129883, + "step": 30 + }, + { + "epoch": 0.6106870229007634, + "grad_norm": 0.3282684087753296, + "learning_rate": 9.424289624237143e-06, + "loss": 0.40243377685546877, + "step": 40 + }, + { + "epoch": 0.7633587786259542, + "grad_norm": 0.29107794165611267, + "learning_rate": 8.975228612720415e-06, + "loss": 0.3573720932006836, + "step": 50 + }, + { + "epoch": 0.7633587786259542, + "eval_loss": 0.3532555401325226, + "eval_runtime": 19.8117, + "eval_samples_per_second": 5.552, + "eval_steps_per_second": 0.707, + "step": 50 + } + ], + "logging_steps": 10, + "max_steps": 198, + "num_input_tokens_seen": 0, + "num_train_epochs": 3, + "save_steps": 50, + "stateful_callbacks": { + "TrainerControl": { + "args": { + "should_epoch_stop": false, + "should_evaluate": false, + "should_log": false, + "should_save": true, + "should_training_stop": false + }, + "attributes": {} + } + }, + "total_flos": 1.4915894480207872e+16, + "train_batch_size": 1, + "trial_name": null, + "trial_params": null +} diff --git a/MATH/PD/Qwen3-1.7B/final/adapter_config.json b/MATH/PD/Qwen3-1.7B/final/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..45d7687739133acb4ecc4f2612b4fb1e22ff43e7 --- /dev/null +++ b/MATH/PD/Qwen3-1.7B/final/adapter_config.json @@ -0,0 +1,45 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3-1.7B", + "bias": "none", + "corda_config": null, + "ensure_weight_tying": false, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": false, + "inference_mode": true, + "init_lora_weights": true, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 64, + "lora_bias": false, + "lora_dropout": 0.05, + "lora_ga_config": null, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "peft_type": "LORA", + "peft_version": "0.19.1", + "qalora_group_size": 16, + "r": 64, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "q_proj", + "o_proj", + "v_proj", + "k_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_bdlora": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} diff --git a/MATH/PD/Qwen3-1.7B/final/chat_template.jinja b/MATH/PD/Qwen3-1.7B/final/chat_template.jinja new file mode 100644 index 0000000000000000000000000000000000000000..01be9b307daa2d425f7c168c9fb145a286e0afb4 --- /dev/null +++ b/MATH/PD/Qwen3-1.7B/final/chat_template.jinja @@ -0,0 +1,89 @@ +{%- if tools %} + {{- '<|im_start|>system\n' }} + {%- if messages[0].role == 'system' %} + {{- messages[0].content + '\n\n' }} + {%- endif %} + {{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within XML tags:\n" }} + {%- for tool in tools %} + {{- "\n" }} + {{- tool | tojson }} + {%- endfor %} + {{- "\n\n\nFor each function call, return a json object with function name and arguments within XML tags:\n\n{\"name\": , \"arguments\": }\n<|im_end|>\n" }} +{%- else %} + {%- if messages[0].role == 'system' %} + {{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }} + {%- endif %} +{%- endif %} +{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %} +{%- for message in messages[::-1] %} + {%- set index = (messages|length - 1) - loop.index0 %} + {%- if ns.multi_step_tool and message.role == "user" and message.content is string and not(message.content.startswith('') and message.content.endswith('')) %} + {%- set ns.multi_step_tool = false %} + {%- set ns.last_query_index = index %} + {%- endif %} +{%- endfor %} +{%- for message in messages %} + {%- if message.content is string %} + {%- set content = message.content %} + {%- else %} + {%- set content = '' %} + {%- endif %} + {%- if (message.role == "user") or (message.role == "system" and not loop.first) %} + {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }} + {%- elif message.role == "assistant" %} + {%- set reasoning_content = '' %} + {%- if message.reasoning_content is string %} + {%- set reasoning_content = message.reasoning_content %} + {%- else %} + {%- if '' in content %} + {%- set reasoning_content = content.split('')[0].rstrip('\n').split('')[-1].lstrip('\n') %} + {%- set content = content.split('')[-1].lstrip('\n') %} + {%- endif %} + {%- endif %} + {%- if loop.index0 > ns.last_query_index %} + {%- if loop.last or (not loop.last and reasoning_content) %} + {{- '<|im_start|>' + message.role + '\n\n' + reasoning_content.strip('\n') + '\n\n\n' + content.lstrip('\n') }} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- if message.tool_calls %} + {%- for tool_call in message.tool_calls %} + {%- if (loop.first and content) or (not loop.first) %} + {{- '\n' }} + {%- endif %} + {%- if tool_call.function %} + {%- set tool_call = tool_call.function %} + {%- endif %} + {{- '\n{"name": "' }} + {{- tool_call.name }} + {{- '", "arguments": ' }} + {%- if tool_call.arguments is string %} + {{- tool_call.arguments }} + {%- else %} + {{- tool_call.arguments | tojson }} + {%- endif %} + {{- '}\n' }} + {%- endfor %} + {%- endif %} + {{- '<|im_end|>\n' }} + {%- elif message.role == "tool" %} + {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %} + {{- '<|im_start|>user' }} + {%- endif %} + {{- '\n\n' }} + {{- content }} + {{- '\n' }} + {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %} + {{- '<|im_end|>\n' }} + {%- endif %} + {%- endif %} +{%- endfor %} +{%- if add_generation_prompt %} + {{- '<|im_start|>assistant\n' }} + {%- if enable_thinking is defined and enable_thinking is false %} + {{- '\n\n\n\n' }} + {%- endif %} +{%- endif %} \ No newline at end of file diff --git a/MATH/PD/Qwen3-1.7B/final/final_eval_metrics.json b/MATH/PD/Qwen3-1.7B/final/final_eval_metrics.json new file mode 100644 index 0000000000000000000000000000000000000000..887033671959aab11351f8b3c753a5597d39c7da --- /dev/null +++ b/MATH/PD/Qwen3-1.7B/final/final_eval_metrics.json @@ -0,0 +1,7 @@ +{ + "eval_loss": 0.1860458254814148, + "eval_runtime": 19.7198, + "eval_samples_per_second": 5.578, + "eval_steps_per_second": 0.71, + "epoch": 3.0 +} diff --git a/MATH/PD/Qwen3-1.7B/final/tokenizer_config.json b/MATH/PD/Qwen3-1.7B/final/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..5668a4a01433b0648bb972458de616f22f3e728e --- /dev/null +++ b/MATH/PD/Qwen3-1.7B/final/tokenizer_config.json @@ -0,0 +1,30 @@ +{ + "add_prefix_space": false, + "backend": "tokenizers", + "bos_token": null, + "clean_up_tokenization_spaces": false, + "eos_token": "<|im_end|>", + "errors": "replace", + "extra_special_tokens": [ + "<|im_start|>", + "<|im_end|>", + "<|object_ref_start|>", + "<|object_ref_end|>", + "<|box_start|>", + "<|box_end|>", + "<|quad_start|>", + "<|quad_end|>", + "<|vision_start|>", + "<|vision_end|>", + "<|vision_pad|>", + "<|image_pad|>", + "<|video_pad|>" + ], + "is_local": true, + "local_files_only": false, + "model_max_length": 131072, + "pad_token": "<|endoftext|>", + "split_special_tokens": false, + "tokenizer_class": "Qwen2Tokenizer", + "unk_token": null +} diff --git a/MATH/PD/Qwen3-1.7B/final/train_summary.json b/MATH/PD/Qwen3-1.7B/final/train_summary.json new file mode 100644 index 0000000000000000000000000000000000000000..8080dc87e49b31f18281da2d891288751d5c7b63 --- /dev/null +++ b/MATH/PD/Qwen3-1.7B/final/train_summary.json @@ -0,0 +1,25 @@ +{ + "agent": "A1", + "dataset": "MATH", + "source_split": "train", + "builder_version": "math_specific_fixed_a1_rollout_sft_v2", + "supervision_source": "controlled_model_rollout", + "initialization": "fresh LoRA on the role base model", + "global_step": 198, + "training_loss": 0.3070455356077714, + "resume_from_checkpoint": null, + "split_stats": { + "train_rows": 2090, + "eval_rows": 110, + "train_groups": 1586, + "eval_groups": 89 + }, + "metrics": { + "train_runtime": 292.6264, + "train_samples_per_second": 21.427, + "train_steps_per_second": 0.677, + "total_flos": 5.863214796714803e+16, + "train_loss": 0.3070455356077714, + "epoch": 3.0 + } +} diff --git a/MATH/PD/Qwen3-4B/checkpoint-100/adapter_config.json b/MATH/PD/Qwen3-4B/checkpoint-100/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..5415827e76f26d7929733dd834c92682565e1db0 --- /dev/null +++ b/MATH/PD/Qwen3-4B/checkpoint-100/adapter_config.json @@ -0,0 +1,45 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3-4B", + "bias": "none", + "corda_config": null, + "ensure_weight_tying": false, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": false, + "inference_mode": true, + "init_lora_weights": true, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 64, + "lora_bias": false, + "lora_dropout": 0.05, + "lora_ga_config": null, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "peft_type": "LORA", + "peft_version": "0.19.1", + "qalora_group_size": 16, + "r": 64, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "q_proj", + "o_proj", + "v_proj", + "k_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_bdlora": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} diff --git a/MATH/PD/Qwen3-4B/checkpoint-100/chat_template.jinja b/MATH/PD/Qwen3-4B/checkpoint-100/chat_template.jinja new file mode 100644 index 0000000000000000000000000000000000000000..01be9b307daa2d425f7c168c9fb145a286e0afb4 --- /dev/null +++ b/MATH/PD/Qwen3-4B/checkpoint-100/chat_template.jinja @@ -0,0 +1,89 @@ +{%- if tools %} + {{- '<|im_start|>system\n' }} + {%- if messages[0].role == 'system' %} + {{- messages[0].content + '\n\n' }} + {%- endif %} + {{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within XML tags:\n" }} + {%- for tool in tools %} + {{- "\n" }} + {{- tool | tojson }} + {%- endfor %} + {{- "\n\n\nFor each function call, return a json object with function name and arguments within XML tags:\n\n{\"name\": , \"arguments\": }\n<|im_end|>\n" }} +{%- else %} + {%- if messages[0].role == 'system' %} + {{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }} + {%- endif %} +{%- endif %} +{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %} +{%- for message in messages[::-1] %} + {%- set index = (messages|length - 1) - loop.index0 %} + {%- if ns.multi_step_tool and message.role == "user" and message.content is string and not(message.content.startswith('') and message.content.endswith('')) %} + {%- set ns.multi_step_tool = false %} + {%- set ns.last_query_index = index %} + {%- endif %} +{%- endfor %} +{%- for message in messages %} + {%- if message.content is string %} + {%- set content = message.content %} + {%- else %} + {%- set content = '' %} + {%- endif %} + {%- if (message.role == "user") or (message.role == "system" and not loop.first) %} + {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }} + {%- elif message.role == "assistant" %} + {%- set reasoning_content = '' %} + {%- if message.reasoning_content is string %} + {%- set reasoning_content = message.reasoning_content %} + {%- else %} + {%- if '' in content %} + {%- set reasoning_content = content.split('')[0].rstrip('\n').split('')[-1].lstrip('\n') %} + {%- set content = content.split('')[-1].lstrip('\n') %} + {%- endif %} + {%- endif %} + {%- if loop.index0 > ns.last_query_index %} + {%- if loop.last or (not loop.last and reasoning_content) %} + {{- '<|im_start|>' + message.role + '\n\n' + reasoning_content.strip('\n') + '\n\n\n' + content.lstrip('\n') }} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- if message.tool_calls %} + {%- for tool_call in message.tool_calls %} + {%- if (loop.first and content) or (not loop.first) %} + {{- '\n' }} + {%- endif %} + {%- if tool_call.function %} + {%- set tool_call = tool_call.function %} + {%- endif %} + {{- '\n{"name": "' }} + {{- tool_call.name }} + {{- '", "arguments": ' }} + {%- if tool_call.arguments is string %} + {{- tool_call.arguments }} + {%- else %} + {{- tool_call.arguments | tojson }} + {%- endif %} + {{- '}\n' }} + {%- endfor %} + {%- endif %} + {{- '<|im_end|>\n' }} + {%- elif message.role == "tool" %} + {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %} + {{- '<|im_start|>user' }} + {%- endif %} + {{- '\n\n' }} + {{- content }} + {{- '\n' }} + {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %} + {{- '<|im_end|>\n' }} + {%- endif %} + {%- endif %} +{%- endfor %} +{%- if add_generation_prompt %} + {{- '<|im_start|>assistant\n' }} + {%- if enable_thinking is defined and enable_thinking is false %} + {{- '\n\n\n\n' }} + {%- endif %} +{%- endif %} \ No newline at end of file diff --git a/MATH/PD/Qwen3-4B/checkpoint-100/tokenizer_config.json b/MATH/PD/Qwen3-4B/checkpoint-100/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..5668a4a01433b0648bb972458de616f22f3e728e --- /dev/null +++ b/MATH/PD/Qwen3-4B/checkpoint-100/tokenizer_config.json @@ -0,0 +1,30 @@ +{ + "add_prefix_space": false, + "backend": "tokenizers", + "bos_token": null, + "clean_up_tokenization_spaces": false, + "eos_token": "<|im_end|>", + "errors": "replace", + "extra_special_tokens": [ + "<|im_start|>", + "<|im_end|>", + "<|object_ref_start|>", + "<|object_ref_end|>", + "<|box_start|>", + "<|box_end|>", + "<|quad_start|>", + "<|quad_end|>", + "<|vision_start|>", + "<|vision_end|>", + "<|vision_pad|>", + "<|image_pad|>", + "<|video_pad|>" + ], + "is_local": true, + "local_files_only": false, + "model_max_length": 131072, + "pad_token": "<|endoftext|>", + "split_special_tokens": false, + "tokenizer_class": "Qwen2Tokenizer", + "unk_token": null +} diff --git a/MATH/PD/Qwen3-4B/checkpoint-100/trainer_state.json b/MATH/PD/Qwen3-4B/checkpoint-100/trainer_state.json new file mode 100644 index 0000000000000000000000000000000000000000..76b48f2375a6ad9c249ea1f09e674ebe56384883 --- /dev/null +++ b/MATH/PD/Qwen3-4B/checkpoint-100/trainer_state.json @@ -0,0 +1,120 @@ +{ + "best_global_step": 100, + "best_metric": 0.08742509037256241, + "best_model_checkpoint": "source_project/experiments/math_specific_sft_rl_v1/artifacts/math_specific_sft_rl_reuse_legacy_v4d_real_rollout_sft_protocol_floor_v2_20260830/01_sft/adapters/A2/checkpoint-100", + "epoch": 1.5190839694656488, + "eval_steps": 50, + "global_step": 100, + "is_hyper_param_search": false, + "is_local_process_zero": true, + "is_world_process_zero": true, + "log_history": [ + { + "epoch": 0.15267175572519084, + "grad_norm": 0.696591854095459, + "learning_rate": 9e-06, + "loss": 0.2557272434234619, + "step": 10 + }, + { + "epoch": 0.3053435114503817, + "grad_norm": 0.1970239281654358, + "learning_rate": 9.943559569286731e-06, + "loss": 0.2061690092086792, + "step": 20 + }, + { + "epoch": 0.4580152671755725, + "grad_norm": 0.17068882286548615, + "learning_rate": 9.75009217427352e-06, + "loss": 0.16213114261627198, + "step": 30 + }, + { + "epoch": 0.6106870229007634, + "grad_norm": 0.15951788425445557, + "learning_rate": 9.424289624237143e-06, + "loss": 0.14796772003173828, + "step": 40 + }, + { + "epoch": 0.7633587786259542, + "grad_norm": 0.1677677184343338, + "learning_rate": 8.975228612720415e-06, + "loss": 0.16020280122756958, + "step": 50 + }, + { + "epoch": 0.7633587786259542, + "eval_loss": 0.10668114572763443, + "eval_runtime": 18.0304, + "eval_samples_per_second": 6.101, + "eval_steps_per_second": 0.776, + "step": 50 + }, + { + "epoch": 0.916030534351145, + "grad_norm": 0.14134329557418823, + "learning_rate": 8.415419751390155e-06, + "loss": 0.12689415216445923, + "step": 60 + }, + { + "epoch": 1.0610687022900764, + "grad_norm": 0.18037518858909607, + "learning_rate": 7.760459030751285e-06, + "loss": 0.12595828771591186, + "step": 70 + }, + { + "epoch": 1.213740458015267, + "grad_norm": 0.12098228186368942, + "learning_rate": 7.028593323773819e-06, + "loss": 0.11593916416168212, + "step": 80 + }, + { + "epoch": 1.366412213740458, + "grad_norm": 0.12128724157810211, + "learning_rate": 6.240212037280967e-06, + "loss": 0.11596386432647705, + "step": 90 + }, + { + "epoch": 1.5190839694656488, + "grad_norm": 0.13207407295703888, + "learning_rate": 5.41727907343245e-06, + "loss": 0.1192549467086792, + "step": 100 + }, + { + "epoch": 1.5190839694656488, + "eval_loss": 0.08742509037256241, + "eval_runtime": 17.4235, + "eval_samples_per_second": 6.313, + "eval_steps_per_second": 0.804, + "step": 100 + } + ], + "logging_steps": 10, + "max_steps": 198, + "num_input_tokens_seen": 0, + "num_train_epochs": 3, + "save_steps": 50, + "stateful_callbacks": { + "TrainerControl": { + "args": { + "should_epoch_stop": false, + "should_evaluate": false, + "should_log": false, + "should_save": true, + "should_training_stop": false + }, + "attributes": {} + } + }, + "total_flos": 9.67342373690409e+16, + "train_batch_size": 1, + "trial_name": null, + "trial_params": null +} diff --git a/MATH/PD/Qwen3-4B/checkpoint-150/adapter_config.json b/MATH/PD/Qwen3-4B/checkpoint-150/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..5415827e76f26d7929733dd834c92682565e1db0 --- /dev/null +++ b/MATH/PD/Qwen3-4B/checkpoint-150/adapter_config.json @@ -0,0 +1,45 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3-4B", + "bias": "none", + "corda_config": null, + "ensure_weight_tying": false, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": false, + "inference_mode": true, + "init_lora_weights": true, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 64, + "lora_bias": false, + "lora_dropout": 0.05, + "lora_ga_config": null, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "peft_type": "LORA", + "peft_version": "0.19.1", + "qalora_group_size": 16, + "r": 64, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "q_proj", + "o_proj", + "v_proj", + "k_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_bdlora": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} diff --git a/MATH/PD/Qwen3-4B/checkpoint-150/chat_template.jinja b/MATH/PD/Qwen3-4B/checkpoint-150/chat_template.jinja new file mode 100644 index 0000000000000000000000000000000000000000..01be9b307daa2d425f7c168c9fb145a286e0afb4 --- /dev/null +++ b/MATH/PD/Qwen3-4B/checkpoint-150/chat_template.jinja @@ -0,0 +1,89 @@ +{%- if tools %} + {{- '<|im_start|>system\n' }} + {%- if messages[0].role == 'system' %} + {{- messages[0].content + '\n\n' }} + {%- endif %} + {{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within XML tags:\n" }} + {%- for tool in tools %} + {{- "\n" }} + {{- tool | tojson }} + {%- endfor %} + {{- "\n\n\nFor each function call, return a json object with function name and arguments within XML tags:\n\n{\"name\": , \"arguments\": }\n<|im_end|>\n" }} +{%- else %} + {%- if messages[0].role == 'system' %} + {{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }} + {%- endif %} +{%- endif %} +{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %} +{%- for message in messages[::-1] %} + {%- set index = (messages|length - 1) - loop.index0 %} + {%- if ns.multi_step_tool and message.role == "user" and message.content is string and not(message.content.startswith('') and message.content.endswith('')) %} + {%- set ns.multi_step_tool = false %} + {%- set ns.last_query_index = index %} + {%- endif %} +{%- endfor %} +{%- for message in messages %} + {%- if message.content is string %} + {%- set content = message.content %} + {%- else %} + {%- set content = '' %} + {%- endif %} + {%- if (message.role == "user") or (message.role == "system" and not loop.first) %} + {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }} + {%- elif message.role == "assistant" %} + {%- set reasoning_content = '' %} + {%- if message.reasoning_content is string %} + {%- set reasoning_content = message.reasoning_content %} + {%- else %} + {%- if '' in content %} + {%- set reasoning_content = content.split('')[0].rstrip('\n').split('')[-1].lstrip('\n') %} + {%- set content = content.split('')[-1].lstrip('\n') %} + {%- endif %} + {%- endif %} + {%- if loop.index0 > ns.last_query_index %} + {%- if loop.last or (not loop.last and reasoning_content) %} + {{- '<|im_start|>' + message.role + '\n\n' + reasoning_content.strip('\n') + '\n\n\n' + content.lstrip('\n') }} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- if message.tool_calls %} + {%- for tool_call in message.tool_calls %} + {%- if (loop.first and content) or (not loop.first) %} + {{- '\n' }} + {%- endif %} + {%- if tool_call.function %} + {%- set tool_call = tool_call.function %} + {%- endif %} + {{- '\n{"name": "' }} + {{- tool_call.name }} + {{- '", "arguments": ' }} + {%- if tool_call.arguments is string %} + {{- tool_call.arguments }} + {%- else %} + {{- tool_call.arguments | tojson }} + {%- endif %} + {{- '}\n' }} + {%- endfor %} + {%- endif %} + {{- '<|im_end|>\n' }} + {%- elif message.role == "tool" %} + {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %} + {{- '<|im_start|>user' }} + {%- endif %} + {{- '\n\n' }} + {{- content }} + {{- '\n' }} + {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %} + {{- '<|im_end|>\n' }} + {%- endif %} + {%- endif %} +{%- endfor %} +{%- if add_generation_prompt %} + {{- '<|im_start|>assistant\n' }} + {%- if enable_thinking is defined and enable_thinking is false %} + {{- '\n\n\n\n' }} + {%- endif %} +{%- endif %} \ No newline at end of file diff --git a/MATH/PD/Qwen3-4B/checkpoint-150/tokenizer_config.json b/MATH/PD/Qwen3-4B/checkpoint-150/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..5668a4a01433b0648bb972458de616f22f3e728e --- /dev/null +++ b/MATH/PD/Qwen3-4B/checkpoint-150/tokenizer_config.json @@ -0,0 +1,30 @@ +{ + "add_prefix_space": false, + "backend": "tokenizers", + "bos_token": null, + "clean_up_tokenization_spaces": false, + "eos_token": "<|im_end|>", + "errors": "replace", + "extra_special_tokens": [ + "<|im_start|>", + "<|im_end|>", + "<|object_ref_start|>", + "<|object_ref_end|>", + "<|box_start|>", + "<|box_end|>", + "<|quad_start|>", + "<|quad_end|>", + "<|vision_start|>", + "<|vision_end|>", + "<|vision_pad|>", + "<|image_pad|>", + "<|video_pad|>" + ], + "is_local": true, + "local_files_only": false, + "model_max_length": 131072, + "pad_token": "<|endoftext|>", + "split_special_tokens": false, + "tokenizer_class": "Qwen2Tokenizer", + "unk_token": null +} diff --git a/MATH/PD/Qwen3-4B/checkpoint-150/trainer_state.json b/MATH/PD/Qwen3-4B/checkpoint-150/trainer_state.json new file mode 100644 index 0000000000000000000000000000000000000000..493f27063fcd68e2a9095c22f6e4b5b82fdb9ae3 --- /dev/null +++ b/MATH/PD/Qwen3-4B/checkpoint-150/trainer_state.json @@ -0,0 +1,163 @@ +{ + "best_global_step": 150, + "best_metric": 0.08347755670547485, + "best_model_checkpoint": "source_project/experiments/math_specific_sft_rl_v1/artifacts/math_specific_sft_rl_reuse_legacy_v4d_real_rollout_sft_protocol_floor_v2_20260830/01_sft/adapters/A2/checkpoint-150", + "epoch": 2.2748091603053435, + "eval_steps": 50, + "global_step": 150, + "is_hyper_param_search": false, + "is_local_process_zero": true, + "is_world_process_zero": true, + "log_history": [ + { + "epoch": 0.15267175572519084, + "grad_norm": 0.696591854095459, + "learning_rate": 9e-06, + "loss": 0.2557272434234619, + "step": 10 + }, + { + "epoch": 0.3053435114503817, + "grad_norm": 0.1970239281654358, + "learning_rate": 9.943559569286731e-06, + "loss": 0.2061690092086792, + "step": 20 + }, + { + "epoch": 0.4580152671755725, + "grad_norm": 0.17068882286548615, + "learning_rate": 9.75009217427352e-06, + "loss": 0.16213114261627198, + "step": 30 + }, + { + "epoch": 0.6106870229007634, + "grad_norm": 0.15951788425445557, + "learning_rate": 9.424289624237143e-06, + "loss": 0.14796772003173828, + "step": 40 + }, + { + "epoch": 0.7633587786259542, + "grad_norm": 0.1677677184343338, + "learning_rate": 8.975228612720415e-06, + "loss": 0.16020280122756958, + "step": 50 + }, + { + "epoch": 0.7633587786259542, + "eval_loss": 0.10668114572763443, + "eval_runtime": 18.0304, + "eval_samples_per_second": 6.101, + "eval_steps_per_second": 0.776, + "step": 50 + }, + { + "epoch": 0.916030534351145, + "grad_norm": 0.14134329557418823, + "learning_rate": 8.415419751390155e-06, + "loss": 0.12689415216445923, + "step": 60 + }, + { + "epoch": 1.0610687022900764, + "grad_norm": 0.18037518858909607, + "learning_rate": 7.760459030751285e-06, + "loss": 0.12595828771591186, + "step": 70 + }, + { + "epoch": 1.213740458015267, + "grad_norm": 0.12098228186368942, + "learning_rate": 7.028593323773819e-06, + "loss": 0.11593916416168212, + "step": 80 + }, + { + "epoch": 1.366412213740458, + "grad_norm": 0.12128724157810211, + "learning_rate": 6.240212037280967e-06, + "loss": 0.11596386432647705, + "step": 90 + }, + { + "epoch": 1.5190839694656488, + "grad_norm": 0.13207407295703888, + "learning_rate": 5.41727907343245e-06, + "loss": 0.1192549467086792, + "step": 100 + }, + { + "epoch": 1.5190839694656488, + "eval_loss": 0.08742509037256241, + "eval_runtime": 17.4235, + "eval_samples_per_second": 6.313, + "eval_steps_per_second": 0.804, + "step": 100 + }, + { + "epoch": 1.6717557251908397, + "grad_norm": 0.13649605214595795, + "learning_rate": 4.582720926567552e-06, + "loss": 0.11310548782348633, + "step": 110 + }, + { + "epoch": 1.8244274809160306, + "grad_norm": 0.12128529697656631, + "learning_rate": 3.7597879627190337e-06, + "loss": 0.11591682434082032, + "step": 120 + }, + { + "epoch": 1.9770992366412212, + "grad_norm": 0.16580627858638763, + "learning_rate": 2.9714066762261825e-06, + "loss": 0.10325522422790527, + "step": 130 + }, + { + "epoch": 2.122137404580153, + "grad_norm": 0.12244649231433868, + "learning_rate": 2.2395409692487174e-06, + "loss": 0.10527455806732178, + "step": 140 + }, + { + "epoch": 2.2748091603053435, + "grad_norm": 0.11358758062124252, + "learning_rate": 1.5845802486098461e-06, + "loss": 0.10554697513580322, + "step": 150 + }, + { + "epoch": 2.2748091603053435, + "eval_loss": 0.08347755670547485, + "eval_runtime": 17.4843, + "eval_samples_per_second": 6.291, + "eval_steps_per_second": 0.801, + "step": 150 + } + ], + "logging_steps": 10, + "max_steps": 198, + "num_input_tokens_seen": 0, + "num_train_epochs": 3, + "save_steps": 50, + "stateful_callbacks": { + "TrainerControl": { + "args": { + "should_epoch_stop": false, + "should_evaluate": false, + "should_log": false, + "should_save": true, + "should_training_stop": false + }, + "attributes": {} + } + }, + "total_flos": 1.4466036974957363e+17, + "train_batch_size": 1, + "trial_name": null, + "trial_params": null +} diff --git a/MATH/PD/Qwen3-4B/checkpoint-198/adapter_config.json b/MATH/PD/Qwen3-4B/checkpoint-198/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..5415827e76f26d7929733dd834c92682565e1db0 --- /dev/null +++ b/MATH/PD/Qwen3-4B/checkpoint-198/adapter_config.json @@ -0,0 +1,45 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3-4B", + "bias": "none", + "corda_config": null, + "ensure_weight_tying": false, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": false, + "inference_mode": true, + "init_lora_weights": true, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 64, + "lora_bias": false, + "lora_dropout": 0.05, + "lora_ga_config": null, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "peft_type": "LORA", + "peft_version": "0.19.1", + "qalora_group_size": 16, + "r": 64, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "q_proj", + "o_proj", + "v_proj", + "k_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_bdlora": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} diff --git a/MATH/PD/Qwen3-4B/checkpoint-198/chat_template.jinja b/MATH/PD/Qwen3-4B/checkpoint-198/chat_template.jinja new file mode 100644 index 0000000000000000000000000000000000000000..01be9b307daa2d425f7c168c9fb145a286e0afb4 --- /dev/null +++ b/MATH/PD/Qwen3-4B/checkpoint-198/chat_template.jinja @@ -0,0 +1,89 @@ +{%- if tools %} + {{- '<|im_start|>system\n' }} + {%- if messages[0].role == 'system' %} + {{- messages[0].content + '\n\n' }} + {%- endif %} + {{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within XML tags:\n" }} + {%- for tool in tools %} + {{- "\n" }} + {{- tool | tojson }} + {%- endfor %} + {{- "\n\n\nFor each function call, return a json object with function name and arguments within XML tags:\n\n{\"name\": , \"arguments\": }\n<|im_end|>\n" }} +{%- else %} + {%- if messages[0].role == 'system' %} + {{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }} + {%- endif %} +{%- endif %} +{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %} +{%- for message in messages[::-1] %} + {%- set index = (messages|length - 1) - loop.index0 %} + {%- if ns.multi_step_tool and message.role == "user" and message.content is string and not(message.content.startswith('') and message.content.endswith('')) %} + {%- set ns.multi_step_tool = false %} + {%- set ns.last_query_index = index %} + {%- endif %} +{%- endfor %} +{%- for message in messages %} + {%- if message.content is string %} + {%- set content = message.content %} + {%- else %} + {%- set content = '' %} + {%- endif %} + {%- if (message.role == "user") or (message.role == "system" and not loop.first) %} + {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }} + {%- elif message.role == "assistant" %} + {%- set reasoning_content = '' %} + {%- if message.reasoning_content is string %} + {%- set reasoning_content = message.reasoning_content %} + {%- else %} + {%- if '' in content %} + {%- set reasoning_content = content.split('')[0].rstrip('\n').split('')[-1].lstrip('\n') %} + {%- set content = content.split('')[-1].lstrip('\n') %} + {%- endif %} + {%- endif %} + {%- if loop.index0 > ns.last_query_index %} + {%- if loop.last or (not loop.last and reasoning_content) %} + {{- '<|im_start|>' + message.role + '\n\n' + reasoning_content.strip('\n') + '\n\n\n' + content.lstrip('\n') }} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- if message.tool_calls %} + {%- for tool_call in message.tool_calls %} + {%- if (loop.first and content) or (not loop.first) %} + {{- '\n' }} + {%- endif %} + {%- if tool_call.function %} + {%- set tool_call = tool_call.function %} + {%- endif %} + {{- '\n{"name": "' }} + {{- tool_call.name }} + {{- '", "arguments": ' }} + {%- if tool_call.arguments is string %} + {{- tool_call.arguments }} + {%- else %} + {{- tool_call.arguments | tojson }} + {%- endif %} + {{- '}\n' }} + {%- endfor %} + {%- endif %} + {{- '<|im_end|>\n' }} + {%- elif message.role == "tool" %} + {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %} + {{- '<|im_start|>user' }} + {%- endif %} + {{- '\n\n' }} + {{- content }} + {{- '\n' }} + {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %} + {{- '<|im_end|>\n' }} + {%- endif %} + {%- endif %} +{%- endfor %} +{%- if add_generation_prompt %} + {{- '<|im_start|>assistant\n' }} + {%- if enable_thinking is defined and enable_thinking is false %} + {{- '\n\n\n\n' }} + {%- endif %} +{%- endif %} \ No newline at end of file diff --git a/MATH/PD/Qwen3-4B/checkpoint-198/tokenizer_config.json b/MATH/PD/Qwen3-4B/checkpoint-198/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..5668a4a01433b0648bb972458de616f22f3e728e --- /dev/null +++ b/MATH/PD/Qwen3-4B/checkpoint-198/tokenizer_config.json @@ -0,0 +1,30 @@ +{ + "add_prefix_space": false, + "backend": "tokenizers", + "bos_token": null, + "clean_up_tokenization_spaces": false, + "eos_token": "<|im_end|>", + "errors": "replace", + "extra_special_tokens": [ + "<|im_start|>", + "<|im_end|>", + "<|object_ref_start|>", + "<|object_ref_end|>", + "<|box_start|>", + "<|box_end|>", + "<|quad_start|>", + "<|quad_end|>", + "<|vision_start|>", + "<|vision_end|>", + "<|vision_pad|>", + "<|image_pad|>", + "<|video_pad|>" + ], + "is_local": true, + "local_files_only": false, + "model_max_length": 131072, + "pad_token": "<|endoftext|>", + "split_special_tokens": false, + "tokenizer_class": "Qwen2Tokenizer", + "unk_token": null +} diff --git a/MATH/PD/Qwen3-4B/checkpoint-198/trainer_state.json b/MATH/PD/Qwen3-4B/checkpoint-198/trainer_state.json new file mode 100644 index 0000000000000000000000000000000000000000..ae92ea775d66d77b9e656a872b1b3d66d843fcc0 --- /dev/null +++ b/MATH/PD/Qwen3-4B/checkpoint-198/trainer_state.json @@ -0,0 +1,199 @@ +{ + "best_global_step": 198, + "best_metric": 0.08283418416976929, + "best_model_checkpoint": "source_project/experiments/math_specific_sft_rl_v1/artifacts/math_specific_sft_rl_reuse_legacy_v4d_real_rollout_sft_protocol_floor_v2_20260830/01_sft/adapters/A2/checkpoint-198", + "epoch": 3.0, + "eval_steps": 50, + "global_step": 198, + "is_hyper_param_search": false, + "is_local_process_zero": true, + "is_world_process_zero": true, + "log_history": [ + { + "epoch": 0.15267175572519084, + "grad_norm": 0.696591854095459, + "learning_rate": 9e-06, + "loss": 0.2557272434234619, + "step": 10 + }, + { + "epoch": 0.3053435114503817, + "grad_norm": 0.1970239281654358, + "learning_rate": 9.943559569286731e-06, + "loss": 0.2061690092086792, + "step": 20 + }, + { + "epoch": 0.4580152671755725, + "grad_norm": 0.17068882286548615, + "learning_rate": 9.75009217427352e-06, + "loss": 0.16213114261627198, + "step": 30 + }, + { + "epoch": 0.6106870229007634, + "grad_norm": 0.15951788425445557, + "learning_rate": 9.424289624237143e-06, + "loss": 0.14796772003173828, + "step": 40 + }, + { + "epoch": 0.7633587786259542, + "grad_norm": 0.1677677184343338, + "learning_rate": 8.975228612720415e-06, + "loss": 0.16020280122756958, + "step": 50 + }, + { + "epoch": 0.7633587786259542, + "eval_loss": 0.10668114572763443, + "eval_runtime": 18.0304, + "eval_samples_per_second": 6.101, + "eval_steps_per_second": 0.776, + "step": 50 + }, + { + "epoch": 0.916030534351145, + "grad_norm": 0.14134329557418823, + "learning_rate": 8.415419751390155e-06, + "loss": 0.12689415216445923, + "step": 60 + }, + { + "epoch": 1.0610687022900764, + "grad_norm": 0.18037518858909607, + "learning_rate": 7.760459030751285e-06, + "loss": 0.12595828771591186, + "step": 70 + }, + { + "epoch": 1.213740458015267, + "grad_norm": 0.12098228186368942, + "learning_rate": 7.028593323773819e-06, + "loss": 0.11593916416168212, + "step": 80 + }, + { + "epoch": 1.366412213740458, + "grad_norm": 0.12128724157810211, + "learning_rate": 6.240212037280967e-06, + "loss": 0.11596386432647705, + "step": 90 + }, + { + "epoch": 1.5190839694656488, + "grad_norm": 0.13207407295703888, + "learning_rate": 5.41727907343245e-06, + "loss": 0.1192549467086792, + "step": 100 + }, + { + "epoch": 1.5190839694656488, + "eval_loss": 0.08742509037256241, + "eval_runtime": 17.4235, + "eval_samples_per_second": 6.313, + "eval_steps_per_second": 0.804, + "step": 100 + }, + { + "epoch": 1.6717557251908397, + "grad_norm": 0.13649605214595795, + "learning_rate": 4.582720926567552e-06, + "loss": 0.11310548782348633, + "step": 110 + }, + { + "epoch": 1.8244274809160306, + "grad_norm": 0.12128529697656631, + "learning_rate": 3.7597879627190337e-06, + "loss": 0.11591682434082032, + "step": 120 + }, + { + "epoch": 1.9770992366412212, + "grad_norm": 0.16580627858638763, + "learning_rate": 2.9714066762261825e-06, + "loss": 0.10325522422790527, + "step": 130 + }, + { + "epoch": 2.122137404580153, + "grad_norm": 0.12244649231433868, + "learning_rate": 2.2395409692487174e-06, + "loss": 0.10527455806732178, + "step": 140 + }, + { + "epoch": 2.2748091603053435, + "grad_norm": 0.11358758062124252, + "learning_rate": 1.5845802486098461e-06, + "loss": 0.10554697513580322, + "step": 150 + }, + { + "epoch": 2.2748091603053435, + "eval_loss": 0.08347755670547485, + "eval_runtime": 17.4843, + "eval_samples_per_second": 6.291, + "eval_steps_per_second": 0.801, + "step": 150 + }, + { + "epoch": 2.427480916030534, + "grad_norm": 0.11932511627674103, + "learning_rate": 1.024771387279585e-06, + "loss": 0.10333406925201416, + "step": 160 + }, + { + "epoch": 2.5801526717557253, + "grad_norm": 0.13888202607631683, + "learning_rate": 5.757103757628573e-07, + "loss": 0.11079965829849243, + "step": 170 + }, + { + "epoch": 2.732824427480916, + "grad_norm": 0.11913561075925827, + "learning_rate": 2.4990782572647977e-07, + "loss": 0.10506956577301026, + "step": 180 + }, + { + "epoch": 2.885496183206107, + "grad_norm": 0.1289082020521164, + "learning_rate": 5.6440430713269325e-08, + "loss": 0.10447471141815186, + "step": 190 + }, + { + "epoch": 3.0, + "eval_loss": 0.08283418416976929, + "eval_runtime": 17.1018, + "eval_samples_per_second": 6.432, + "eval_steps_per_second": 0.819, + "step": 198 + } + ], + "logging_steps": 10, + "max_steps": 198, + "num_input_tokens_seen": 0, + "num_train_epochs": 3, + "save_steps": 50, + "stateful_callbacks": { + "TrainerControl": { + "args": { + "should_epoch_stop": false, + "should_evaluate": false, + "should_log": false, + "should_save": true, + "should_training_stop": true + }, + "attributes": {} + } + }, + "total_flos": 1.9101991710385766e+17, + "train_batch_size": 1, + "trial_name": null, + "trial_params": null +} diff --git a/MATH/PD/Qwen3-4B/checkpoint-50/adapter_config.json b/MATH/PD/Qwen3-4B/checkpoint-50/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..5415827e76f26d7929733dd834c92682565e1db0 --- /dev/null +++ b/MATH/PD/Qwen3-4B/checkpoint-50/adapter_config.json @@ -0,0 +1,45 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3-4B", + "bias": "none", + "corda_config": null, + "ensure_weight_tying": false, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": false, + "inference_mode": true, + "init_lora_weights": true, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 64, + "lora_bias": false, + "lora_dropout": 0.05, + "lora_ga_config": null, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "peft_type": "LORA", + "peft_version": "0.19.1", + "qalora_group_size": 16, + "r": 64, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "q_proj", + "o_proj", + "v_proj", + "k_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_bdlora": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} diff --git a/MATH/PD/Qwen3-4B/checkpoint-50/chat_template.jinja b/MATH/PD/Qwen3-4B/checkpoint-50/chat_template.jinja new file mode 100644 index 0000000000000000000000000000000000000000..01be9b307daa2d425f7c168c9fb145a286e0afb4 --- /dev/null +++ b/MATH/PD/Qwen3-4B/checkpoint-50/chat_template.jinja @@ -0,0 +1,89 @@ +{%- if tools %} + {{- '<|im_start|>system\n' }} + {%- if messages[0].role == 'system' %} + {{- messages[0].content + '\n\n' }} + {%- endif %} + {{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within XML tags:\n" }} + {%- for tool in tools %} + {{- "\n" }} + {{- tool | tojson }} + {%- endfor %} + {{- "\n\n\nFor each function call, return a json object with function name and arguments within XML tags:\n\n{\"name\": , \"arguments\": }\n<|im_end|>\n" }} +{%- else %} + {%- if messages[0].role == 'system' %} + {{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }} + {%- endif %} +{%- endif %} +{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %} +{%- for message in messages[::-1] %} + {%- set index = (messages|length - 1) - loop.index0 %} + {%- if ns.multi_step_tool and message.role == "user" and message.content is string and not(message.content.startswith('') and message.content.endswith('')) %} + {%- set ns.multi_step_tool = false %} + {%- set ns.last_query_index = index %} + {%- endif %} +{%- endfor %} +{%- for message in messages %} + {%- if message.content is string %} + {%- set content = message.content %} + {%- else %} + {%- set content = '' %} + {%- endif %} + {%- if (message.role == "user") or (message.role == "system" and not loop.first) %} + {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }} + {%- elif message.role == "assistant" %} + {%- set reasoning_content = '' %} + {%- if message.reasoning_content is string %} + {%- set reasoning_content = message.reasoning_content %} + {%- else %} + {%- if '' in content %} + {%- set reasoning_content = content.split('')[0].rstrip('\n').split('')[-1].lstrip('\n') %} + {%- set content = content.split('')[-1].lstrip('\n') %} + {%- endif %} + {%- endif %} + {%- if loop.index0 > ns.last_query_index %} + {%- if loop.last or (not loop.last and reasoning_content) %} + {{- '<|im_start|>' + message.role + '\n\n' + reasoning_content.strip('\n') + '\n\n\n' + content.lstrip('\n') }} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- if message.tool_calls %} + {%- for tool_call in message.tool_calls %} + {%- if (loop.first and content) or (not loop.first) %} + {{- '\n' }} + {%- endif %} + {%- if tool_call.function %} + {%- set tool_call = tool_call.function %} + {%- endif %} + {{- '\n{"name": "' }} + {{- tool_call.name }} + {{- '", "arguments": ' }} + {%- if tool_call.arguments is string %} + {{- tool_call.arguments }} + {%- else %} + {{- tool_call.arguments | tojson }} + {%- endif %} + {{- '}\n' }} + {%- endfor %} + {%- endif %} + {{- '<|im_end|>\n' }} + {%- elif message.role == "tool" %} + {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %} + {{- '<|im_start|>user' }} + {%- endif %} + {{- '\n\n' }} + {{- content }} + {{- '\n' }} + {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %} + {{- '<|im_end|>\n' }} + {%- endif %} + {%- endif %} +{%- endfor %} +{%- if add_generation_prompt %} + {{- '<|im_start|>assistant\n' }} + {%- if enable_thinking is defined and enable_thinking is false %} + {{- '\n\n\n\n' }} + {%- endif %} +{%- endif %} \ No newline at end of file diff --git a/MATH/PD/Qwen3-4B/checkpoint-50/tokenizer_config.json b/MATH/PD/Qwen3-4B/checkpoint-50/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..5668a4a01433b0648bb972458de616f22f3e728e --- /dev/null +++ b/MATH/PD/Qwen3-4B/checkpoint-50/tokenizer_config.json @@ -0,0 +1,30 @@ +{ + "add_prefix_space": false, + "backend": "tokenizers", + "bos_token": null, + "clean_up_tokenization_spaces": false, + "eos_token": "<|im_end|>", + "errors": "replace", + "extra_special_tokens": [ + "<|im_start|>", + "<|im_end|>", + "<|object_ref_start|>", + "<|object_ref_end|>", + "<|box_start|>", + "<|box_end|>", + "<|quad_start|>", + "<|quad_end|>", + "<|vision_start|>", + "<|vision_end|>", + "<|vision_pad|>", + "<|image_pad|>", + "<|video_pad|>" + ], + "is_local": true, + "local_files_only": false, + "model_max_length": 131072, + "pad_token": "<|endoftext|>", + "split_special_tokens": false, + "tokenizer_class": "Qwen2Tokenizer", + "unk_token": null +} diff --git a/MATH/PD/Qwen3-4B/checkpoint-50/trainer_state.json b/MATH/PD/Qwen3-4B/checkpoint-50/trainer_state.json new file mode 100644 index 0000000000000000000000000000000000000000..0c9611526a9792f1208086d65b845863c9f22132 --- /dev/null +++ b/MATH/PD/Qwen3-4B/checkpoint-50/trainer_state.json @@ -0,0 +1,77 @@ +{ + "best_global_step": 50, + "best_metric": 0.10668114572763443, + "best_model_checkpoint": "source_project/experiments/math_specific_sft_rl_v1/artifacts/math_specific_sft_rl_reuse_legacy_v4d_real_rollout_sft_protocol_floor_v2_20260830/01_sft/adapters/A2/checkpoint-50", + "epoch": 0.7633587786259542, + "eval_steps": 50, + "global_step": 50, + "is_hyper_param_search": false, + "is_local_process_zero": true, + "is_world_process_zero": true, + "log_history": [ + { + "epoch": 0.15267175572519084, + "grad_norm": 0.696591854095459, + "learning_rate": 9e-06, + "loss": 0.2557272434234619, + "step": 10 + }, + { + "epoch": 0.3053435114503817, + "grad_norm": 0.1970239281654358, + "learning_rate": 9.943559569286731e-06, + "loss": 0.2061690092086792, + "step": 20 + }, + { + "epoch": 0.4580152671755725, + "grad_norm": 0.17068882286548615, + "learning_rate": 9.75009217427352e-06, + "loss": 0.16213114261627198, + "step": 30 + }, + { + "epoch": 0.6106870229007634, + "grad_norm": 0.15951788425445557, + "learning_rate": 9.424289624237143e-06, + "loss": 0.14796772003173828, + "step": 40 + }, + { + "epoch": 0.7633587786259542, + "grad_norm": 0.1677677184343338, + "learning_rate": 8.975228612720415e-06, + "loss": 0.16020280122756958, + "step": 50 + }, + { + "epoch": 0.7633587786259542, + "eval_loss": 0.10668114572763443, + "eval_runtime": 18.0304, + "eval_samples_per_second": 6.101, + "eval_steps_per_second": 0.776, + "step": 50 + } + ], + "logging_steps": 10, + "max_steps": 198, + "num_input_tokens_seen": 0, + "num_train_epochs": 3, + "save_steps": 50, + "stateful_callbacks": { + "TrainerControl": { + "args": { + "should_epoch_stop": false, + "should_evaluate": false, + "should_log": false, + "should_save": true, + "should_training_stop": false + }, + "attributes": {} + } + }, + "total_flos": 4.87025443560489e+16, + "train_batch_size": 1, + "trial_name": null, + "trial_params": null +} diff --git a/MATH/PD/Qwen3-4B/final/adapter_config.json b/MATH/PD/Qwen3-4B/final/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..5415827e76f26d7929733dd834c92682565e1db0 --- /dev/null +++ b/MATH/PD/Qwen3-4B/final/adapter_config.json @@ -0,0 +1,45 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3-4B", + "bias": "none", + "corda_config": null, + "ensure_weight_tying": false, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": false, + "inference_mode": true, + "init_lora_weights": true, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 64, + "lora_bias": false, + "lora_dropout": 0.05, + "lora_ga_config": null, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "peft_type": "LORA", + "peft_version": "0.19.1", + "qalora_group_size": 16, + "r": 64, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "q_proj", + "o_proj", + "v_proj", + "k_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_bdlora": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} diff --git a/MATH/PD/Qwen3-4B/final/chat_template.jinja b/MATH/PD/Qwen3-4B/final/chat_template.jinja new file mode 100644 index 0000000000000000000000000000000000000000..01be9b307daa2d425f7c168c9fb145a286e0afb4 --- /dev/null +++ b/MATH/PD/Qwen3-4B/final/chat_template.jinja @@ -0,0 +1,89 @@ +{%- if tools %} + {{- '<|im_start|>system\n' }} + {%- if messages[0].role == 'system' %} + {{- messages[0].content + '\n\n' }} + {%- endif %} + {{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within XML tags:\n" }} + {%- for tool in tools %} + {{- "\n" }} + {{- tool | tojson }} + {%- endfor %} + {{- "\n\n\nFor each function call, return a json object with function name and arguments within XML tags:\n\n{\"name\": , \"arguments\": }\n<|im_end|>\n" }} +{%- else %} + {%- if messages[0].role == 'system' %} + {{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }} + {%- endif %} +{%- endif %} +{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %} +{%- for message in messages[::-1] %} + {%- set index = (messages|length - 1) - loop.index0 %} + {%- if ns.multi_step_tool and message.role == "user" and message.content is string and not(message.content.startswith('') and message.content.endswith('')) %} + {%- set ns.multi_step_tool = false %} + {%- set ns.last_query_index = index %} + {%- endif %} +{%- endfor %} +{%- for message in messages %} + {%- if message.content is string %} + {%- set content = message.content %} + {%- else %} + {%- set content = '' %} + {%- endif %} + {%- if (message.role == "user") or (message.role == "system" and not loop.first) %} + {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }} + {%- elif message.role == "assistant" %} + {%- set reasoning_content = '' %} + {%- if message.reasoning_content is string %} + {%- set reasoning_content = message.reasoning_content %} + {%- else %} + {%- if '' in content %} + {%- set reasoning_content = content.split('')[0].rstrip('\n').split('')[-1].lstrip('\n') %} + {%- set content = content.split('')[-1].lstrip('\n') %} + {%- endif %} + {%- endif %} + {%- if loop.index0 > ns.last_query_index %} + {%- if loop.last or (not loop.last and reasoning_content) %} + {{- '<|im_start|>' + message.role + '\n\n' + reasoning_content.strip('\n') + '\n\n\n' + content.lstrip('\n') }} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- if message.tool_calls %} + {%- for tool_call in message.tool_calls %} + {%- if (loop.first and content) or (not loop.first) %} + {{- '\n' }} + {%- endif %} + {%- if tool_call.function %} + {%- set tool_call = tool_call.function %} + {%- endif %} + {{- '\n{"name": "' }} + {{- tool_call.name }} + {{- '", "arguments": ' }} + {%- if tool_call.arguments is string %} + {{- tool_call.arguments }} + {%- else %} + {{- tool_call.arguments | tojson }} + {%- endif %} + {{- '}\n' }} + {%- endfor %} + {%- endif %} + {{- '<|im_end|>\n' }} + {%- elif message.role == "tool" %} + {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %} + {{- '<|im_start|>user' }} + {%- endif %} + {{- '\n\n' }} + {{- content }} + {{- '\n' }} + {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %} + {{- '<|im_end|>\n' }} + {%- endif %} + {%- endif %} +{%- endfor %} +{%- if add_generation_prompt %} + {{- '<|im_start|>assistant\n' }} + {%- if enable_thinking is defined and enable_thinking is false %} + {{- '\n\n\n\n' }} + {%- endif %} +{%- endif %} \ No newline at end of file diff --git a/MATH/PD/Qwen3-4B/final/final_eval_metrics.json b/MATH/PD/Qwen3-4B/final/final_eval_metrics.json new file mode 100644 index 0000000000000000000000000000000000000000..38bd4b649bb9c287840054b104e1210f379db6cb --- /dev/null +++ b/MATH/PD/Qwen3-4B/final/final_eval_metrics.json @@ -0,0 +1,7 @@ +{ + "eval_loss": 0.08283418416976929, + "eval_runtime": 16.8629, + "eval_samples_per_second": 6.523, + "eval_steps_per_second": 0.83, + "epoch": 3.0 +} diff --git a/MATH/PD/Qwen3-4B/final/tokenizer_config.json b/MATH/PD/Qwen3-4B/final/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..5668a4a01433b0648bb972458de616f22f3e728e --- /dev/null +++ b/MATH/PD/Qwen3-4B/final/tokenizer_config.json @@ -0,0 +1,30 @@ +{ + "add_prefix_space": false, + "backend": "tokenizers", + "bos_token": null, + "clean_up_tokenization_spaces": false, + "eos_token": "<|im_end|>", + "errors": "replace", + "extra_special_tokens": [ + "<|im_start|>", + "<|im_end|>", + "<|object_ref_start|>", + "<|object_ref_end|>", + "<|box_start|>", + "<|box_end|>", + "<|quad_start|>", + "<|quad_end|>", + "<|vision_start|>", + "<|vision_end|>", + "<|vision_pad|>", + "<|image_pad|>", + "<|video_pad|>" + ], + "is_local": true, + "local_files_only": false, + "model_max_length": 131072, + "pad_token": "<|endoftext|>", + "split_special_tokens": false, + "tokenizer_class": "Qwen2Tokenizer", + "unk_token": null +} diff --git a/MATH/PD/Qwen3-4B/final/train_summary.json b/MATH/PD/Qwen3-4B/final/train_summary.json new file mode 100644 index 0000000000000000000000000000000000000000..823dc6c3c36b55c4753d495cc827fb541ae368c9 --- /dev/null +++ b/MATH/PD/Qwen3-4B/final/train_summary.json @@ -0,0 +1,25 @@ +{ + "agent": "A2", + "dataset": "MATH", + "source_split": "train", + "builder_version": "math_specific_fixed_a1_rollout_sft_v2", + "supervision_source": "controlled_model_rollout", + "initialization": "fresh LoRA on the role base model", + "global_step": 198, + "training_loss": 0.13073236021128568, + "resume_from_checkpoint": null, + "split_stats": { + "train_rows": 2090, + "eval_rows": 110, + "train_groups": 1550, + "eval_groups": 85 + }, + "metrics": { + "train_runtime": 389.1849, + "train_samples_per_second": 16.111, + "train_steps_per_second": 0.509, + "total_flos": 1.9101991710385766e+17, + "train_loss": 0.13073236021128568, + "epoch": 3.0 + } +} diff --git a/MATH/PD/Qwen3-8B/checkpoint-198/tokenizer_config.json b/MATH/PD/Qwen3-8B/checkpoint-198/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..5668a4a01433b0648bb972458de616f22f3e728e --- /dev/null +++ b/MATH/PD/Qwen3-8B/checkpoint-198/tokenizer_config.json @@ -0,0 +1,30 @@ +{ + "add_prefix_space": false, + "backend": "tokenizers", + "bos_token": null, + "clean_up_tokenization_spaces": false, + "eos_token": "<|im_end|>", + "errors": "replace", + "extra_special_tokens": [ + "<|im_start|>", + "<|im_end|>", + "<|object_ref_start|>", + "<|object_ref_end|>", + "<|box_start|>", + "<|box_end|>", + "<|quad_start|>", + "<|quad_end|>", + "<|vision_start|>", + "<|vision_end|>", + "<|vision_pad|>", + "<|image_pad|>", + "<|video_pad|>" + ], + "is_local": true, + "local_files_only": false, + "model_max_length": 131072, + "pad_token": "<|endoftext|>", + "split_special_tokens": false, + "tokenizer_class": "Qwen2Tokenizer", + "unk_token": null +} diff --git a/MATH/SLS/Qwen3-8B/checkpoint-1050/adapter_config.json b/MATH/SLS/Qwen3-8B/checkpoint-1050/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..2b7c990d8049472c95210022572ac85eff639c37 --- /dev/null +++ b/MATH/SLS/Qwen3-8B/checkpoint-1050/adapter_config.json @@ -0,0 +1,45 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3-8B", + "bias": "none", + "corda_config": null, + "ensure_weight_tying": false, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": false, + "inference_mode": true, + "init_lora_weights": true, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 64, + "lora_bias": false, + "lora_dropout": 0.05, + "lora_ga_config": null, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "peft_type": "LORA", + "peft_version": "0.19.1", + "qalora_group_size": 16, + "r": 64, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "o_proj", + "k_proj", + "q_proj", + "v_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_bdlora": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} diff --git a/MATH/SLS/Qwen3-8B/checkpoint-1050/chat_template.jinja b/MATH/SLS/Qwen3-8B/checkpoint-1050/chat_template.jinja new file mode 100644 index 0000000000000000000000000000000000000000..01be9b307daa2d425f7c168c9fb145a286e0afb4 --- /dev/null +++ b/MATH/SLS/Qwen3-8B/checkpoint-1050/chat_template.jinja @@ -0,0 +1,89 @@ +{%- if tools %} + {{- '<|im_start|>system\n' }} + {%- if messages[0].role == 'system' %} + {{- messages[0].content + '\n\n' }} + {%- endif %} + {{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within XML tags:\n" }} + {%- for tool in tools %} + {{- "\n" }} + {{- tool | tojson }} + {%- endfor %} + {{- "\n\n\nFor each function call, return a json object with function name and arguments within XML tags:\n\n{\"name\": , \"arguments\": }\n<|im_end|>\n" }} +{%- else %} + {%- if messages[0].role == 'system' %} + {{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }} + {%- endif %} +{%- endif %} +{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %} +{%- for message in messages[::-1] %} + {%- set index = (messages|length - 1) - loop.index0 %} + {%- if ns.multi_step_tool and message.role == "user" and message.content is string and not(message.content.startswith('') and message.content.endswith('')) %} + {%- set ns.multi_step_tool = false %} + {%- set ns.last_query_index = index %} + {%- endif %} +{%- endfor %} +{%- for message in messages %} + {%- if message.content is string %} + {%- set content = message.content %} + {%- else %} + {%- set content = '' %} + {%- endif %} + {%- if (message.role == "user") or (message.role == "system" and not loop.first) %} + {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }} + {%- elif message.role == "assistant" %} + {%- set reasoning_content = '' %} + {%- if message.reasoning_content is string %} + {%- set reasoning_content = message.reasoning_content %} + {%- else %} + {%- if '' in content %} + {%- set reasoning_content = content.split('')[0].rstrip('\n').split('')[-1].lstrip('\n') %} + {%- set content = content.split('')[-1].lstrip('\n') %} + {%- endif %} + {%- endif %} + {%- if loop.index0 > ns.last_query_index %} + {%- if loop.last or (not loop.last and reasoning_content) %} + {{- '<|im_start|>' + message.role + '\n\n' + reasoning_content.strip('\n') + '\n\n\n' + content.lstrip('\n') }} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- if message.tool_calls %} + {%- for tool_call in message.tool_calls %} + {%- if (loop.first and content) or (not loop.first) %} + {{- '\n' }} + {%- endif %} + {%- if tool_call.function %} + {%- set tool_call = tool_call.function %} + {%- endif %} + {{- '\n{"name": "' }} + {{- tool_call.name }} + {{- '", "arguments": ' }} + {%- if tool_call.arguments is string %} + {{- tool_call.arguments }} + {%- else %} + {{- tool_call.arguments | tojson }} + {%- endif %} + {{- '}\n' }} + {%- endfor %} + {%- endif %} + {{- '<|im_end|>\n' }} + {%- elif message.role == "tool" %} + {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %} + {{- '<|im_start|>user' }} + {%- endif %} + {{- '\n\n' }} + {{- content }} + {{- '\n' }} + {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %} + {{- '<|im_end|>\n' }} + {%- endif %} + {%- endif %} +{%- endfor %} +{%- if add_generation_prompt %} + {{- '<|im_start|>assistant\n' }} + {%- if enable_thinking is defined and enable_thinking is false %} + {{- '\n\n\n\n' }} + {%- endif %} +{%- endif %} \ No newline at end of file diff --git a/MATH/SLS/Qwen3-8B/checkpoint-1050/tokenizer_config.json b/MATH/SLS/Qwen3-8B/checkpoint-1050/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..5668a4a01433b0648bb972458de616f22f3e728e --- /dev/null +++ b/MATH/SLS/Qwen3-8B/checkpoint-1050/tokenizer_config.json @@ -0,0 +1,30 @@ +{ + "add_prefix_space": false, + "backend": "tokenizers", + "bos_token": null, + "clean_up_tokenization_spaces": false, + "eos_token": "<|im_end|>", + "errors": "replace", + "extra_special_tokens": [ + "<|im_start|>", + "<|im_end|>", + "<|object_ref_start|>", + "<|object_ref_end|>", + "<|box_start|>", + "<|box_end|>", + "<|quad_start|>", + "<|quad_end|>", + "<|vision_start|>", + "<|vision_end|>", + "<|vision_pad|>", + "<|image_pad|>", + "<|video_pad|>" + ], + "is_local": true, + "local_files_only": false, + "model_max_length": 131072, + "pad_token": "<|endoftext|>", + "split_special_tokens": false, + "tokenizer_class": "Qwen2Tokenizer", + "unk_token": null +} diff --git a/MATH/SLS/Qwen3-8B/checkpoint-1100/adapter_config.json b/MATH/SLS/Qwen3-8B/checkpoint-1100/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..2b7c990d8049472c95210022572ac85eff639c37 --- /dev/null +++ b/MATH/SLS/Qwen3-8B/checkpoint-1100/adapter_config.json @@ -0,0 +1,45 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3-8B", + "bias": "none", + "corda_config": null, + "ensure_weight_tying": false, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": false, + "inference_mode": true, + "init_lora_weights": true, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 64, + "lora_bias": false, + "lora_dropout": 0.05, + "lora_ga_config": null, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "peft_type": "LORA", + "peft_version": "0.19.1", + "qalora_group_size": 16, + "r": 64, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "o_proj", + "k_proj", + "q_proj", + "v_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_bdlora": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} diff --git a/MATH/SLS/Qwen3-8B/checkpoint-1100/chat_template.jinja b/MATH/SLS/Qwen3-8B/checkpoint-1100/chat_template.jinja new file mode 100644 index 0000000000000000000000000000000000000000..01be9b307daa2d425f7c168c9fb145a286e0afb4 --- /dev/null +++ b/MATH/SLS/Qwen3-8B/checkpoint-1100/chat_template.jinja @@ -0,0 +1,89 @@ +{%- if tools %} + {{- '<|im_start|>system\n' }} + {%- if messages[0].role == 'system' %} + {{- messages[0].content + '\n\n' }} + {%- endif %} + {{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within XML tags:\n" }} + {%- for tool in tools %} + {{- "\n" }} + {{- tool | tojson }} + {%- endfor %} + {{- "\n\n\nFor each function call, return a json object with function name and arguments within XML tags:\n\n{\"name\": , \"arguments\": }\n<|im_end|>\n" }} +{%- else %} + {%- if messages[0].role == 'system' %} + {{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }} + {%- endif %} +{%- endif %} +{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %} +{%- for message in messages[::-1] %} + {%- set index = (messages|length - 1) - loop.index0 %} + {%- if ns.multi_step_tool and message.role == "user" and message.content is string and not(message.content.startswith('') and message.content.endswith('')) %} + {%- set ns.multi_step_tool = false %} + {%- set ns.last_query_index = index %} + {%- endif %} +{%- endfor %} +{%- for message in messages %} + {%- if message.content is string %} + {%- set content = message.content %} + {%- else %} + {%- set content = '' %} + {%- endif %} + {%- if (message.role == "user") or (message.role == "system" and not loop.first) %} + {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }} + {%- elif message.role == "assistant" %} + {%- set reasoning_content = '' %} + {%- if message.reasoning_content is string %} + {%- set reasoning_content = message.reasoning_content %} + {%- else %} + {%- if '' in content %} + {%- set reasoning_content = content.split('')[0].rstrip('\n').split('')[-1].lstrip('\n') %} + {%- set content = content.split('')[-1].lstrip('\n') %} + {%- endif %} + {%- endif %} + {%- if loop.index0 > ns.last_query_index %} + {%- if loop.last or (not loop.last and reasoning_content) %} + {{- '<|im_start|>' + message.role + '\n\n' + reasoning_content.strip('\n') + '\n\n\n' + content.lstrip('\n') }} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- if message.tool_calls %} + {%- for tool_call in message.tool_calls %} + {%- if (loop.first and content) or (not loop.first) %} + {{- '\n' }} + {%- endif %} + {%- if tool_call.function %} + {%- set tool_call = tool_call.function %} + {%- endif %} + {{- '\n{"name": "' }} + {{- tool_call.name }} + {{- '", "arguments": ' }} + {%- if tool_call.arguments is string %} + {{- tool_call.arguments }} + {%- else %} + {{- tool_call.arguments | tojson }} + {%- endif %} + {{- '}\n' }} + {%- endfor %} + {%- endif %} + {{- '<|im_end|>\n' }} + {%- elif message.role == "tool" %} + {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %} + {{- '<|im_start|>user' }} + {%- endif %} + {{- '\n\n' }} + {{- content }} + {{- '\n' }} + {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %} + {{- '<|im_end|>\n' }} + {%- endif %} + {%- endif %} +{%- endfor %} +{%- if add_generation_prompt %} + {{- '<|im_start|>assistant\n' }} + {%- if enable_thinking is defined and enable_thinking is false %} + {{- '\n\n\n\n' }} + {%- endif %} +{%- endif %} \ No newline at end of file diff --git a/MATH/SLS/Qwen3-8B/checkpoint-1100/tokenizer_config.json b/MATH/SLS/Qwen3-8B/checkpoint-1100/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..5668a4a01433b0648bb972458de616f22f3e728e --- /dev/null +++ b/MATH/SLS/Qwen3-8B/checkpoint-1100/tokenizer_config.json @@ -0,0 +1,30 @@ +{ + "add_prefix_space": false, + "backend": "tokenizers", + "bos_token": null, + "clean_up_tokenization_spaces": false, + "eos_token": "<|im_end|>", + "errors": "replace", + "extra_special_tokens": [ + "<|im_start|>", + "<|im_end|>", + "<|object_ref_start|>", + "<|object_ref_end|>", + "<|box_start|>", + "<|box_end|>", + "<|quad_start|>", + "<|quad_end|>", + "<|vision_start|>", + "<|vision_end|>", + "<|vision_pad|>", + "<|image_pad|>", + "<|video_pad|>" + ], + "is_local": true, + "local_files_only": false, + "model_max_length": 131072, + "pad_token": "<|endoftext|>", + "split_special_tokens": false, + "tokenizer_class": "Qwen2Tokenizer", + "unk_token": null +} diff --git a/MATH/SLS/Qwen3-8B/checkpoint-1125/adapter_config.json b/MATH/SLS/Qwen3-8B/checkpoint-1125/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..2b7c990d8049472c95210022572ac85eff639c37 --- /dev/null +++ b/MATH/SLS/Qwen3-8B/checkpoint-1125/adapter_config.json @@ -0,0 +1,45 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3-8B", + "bias": "none", + "corda_config": null, + "ensure_weight_tying": false, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": false, + "inference_mode": true, + "init_lora_weights": true, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 64, + "lora_bias": false, + "lora_dropout": 0.05, + "lora_ga_config": null, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "peft_type": "LORA", + "peft_version": "0.19.1", + "qalora_group_size": 16, + "r": 64, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "o_proj", + "k_proj", + "q_proj", + "v_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_bdlora": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} diff --git a/MATH/SLS/Qwen3-8B/checkpoint-1125/chat_template.jinja b/MATH/SLS/Qwen3-8B/checkpoint-1125/chat_template.jinja new file mode 100644 index 0000000000000000000000000000000000000000..01be9b307daa2d425f7c168c9fb145a286e0afb4 --- /dev/null +++ b/MATH/SLS/Qwen3-8B/checkpoint-1125/chat_template.jinja @@ -0,0 +1,89 @@ +{%- if tools %} + {{- '<|im_start|>system\n' }} + {%- if messages[0].role == 'system' %} + {{- messages[0].content + '\n\n' }} + {%- endif %} + {{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within XML tags:\n" }} + {%- for tool in tools %} + {{- "\n" }} + {{- tool | tojson }} + {%- endfor %} + {{- "\n\n\nFor each function call, return a json object with function name and arguments within XML tags:\n\n{\"name\": , \"arguments\": }\n<|im_end|>\n" }} +{%- else %} + {%- if messages[0].role == 'system' %} + {{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }} + {%- endif %} +{%- endif %} +{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %} +{%- for message in messages[::-1] %} + {%- set index = (messages|length - 1) - loop.index0 %} + {%- if ns.multi_step_tool and message.role == "user" and message.content is string and not(message.content.startswith('') and message.content.endswith('')) %} + {%- set ns.multi_step_tool = false %} + {%- set ns.last_query_index = index %} + {%- endif %} +{%- endfor %} +{%- for message in messages %} + {%- if message.content is string %} + {%- set content = message.content %} + {%- else %} + {%- set content = '' %} + {%- endif %} + {%- if (message.role == "user") or (message.role == "system" and not loop.first) %} + {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }} + {%- elif message.role == "assistant" %} + {%- set reasoning_content = '' %} + {%- if message.reasoning_content is string %} + {%- set reasoning_content = message.reasoning_content %} + {%- else %} + {%- if '' in content %} + {%- set reasoning_content = content.split('')[0].rstrip('\n').split('')[-1].lstrip('\n') %} + {%- set content = content.split('')[-1].lstrip('\n') %} + {%- endif %} + {%- endif %} + {%- if loop.index0 > ns.last_query_index %} + {%- if loop.last or (not loop.last and reasoning_content) %} + {{- '<|im_start|>' + message.role + '\n\n' + reasoning_content.strip('\n') + '\n\n\n' + content.lstrip('\n') }} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- if message.tool_calls %} + {%- for tool_call in message.tool_calls %} + {%- if (loop.first and content) or (not loop.first) %} + {{- '\n' }} + {%- endif %} + {%- if tool_call.function %} + {%- set tool_call = tool_call.function %} + {%- endif %} + {{- '\n{"name": "' }} + {{- tool_call.name }} + {{- '", "arguments": ' }} + {%- if tool_call.arguments is string %} + {{- tool_call.arguments }} + {%- else %} + {{- tool_call.arguments | tojson }} + {%- endif %} + {{- '}\n' }} + {%- endfor %} + {%- endif %} + {{- '<|im_end|>\n' }} + {%- elif message.role == "tool" %} + {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %} + {{- '<|im_start|>user' }} + {%- endif %} + {{- '\n\n' }} + {{- content }} + {{- '\n' }} + {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %} + {{- '<|im_end|>\n' }} + {%- endif %} + {%- endif %} +{%- endfor %} +{%- if add_generation_prompt %} + {{- '<|im_start|>assistant\n' }} + {%- if enable_thinking is defined and enable_thinking is false %} + {{- '\n\n\n\n' }} + {%- endif %} +{%- endif %} \ No newline at end of file diff --git a/MATH/SLS/Qwen3-8B/checkpoint-1125/tokenizer_config.json b/MATH/SLS/Qwen3-8B/checkpoint-1125/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..5668a4a01433b0648bb972458de616f22f3e728e --- /dev/null +++ b/MATH/SLS/Qwen3-8B/checkpoint-1125/tokenizer_config.json @@ -0,0 +1,30 @@ +{ + "add_prefix_space": false, + "backend": "tokenizers", + "bos_token": null, + "clean_up_tokenization_spaces": false, + "eos_token": "<|im_end|>", + "errors": "replace", + "extra_special_tokens": [ + "<|im_start|>", + "<|im_end|>", + "<|object_ref_start|>", + "<|object_ref_end|>", + "<|box_start|>", + "<|box_end|>", + "<|quad_start|>", + "<|quad_end|>", + "<|vision_start|>", + "<|vision_end|>", + "<|vision_pad|>", + "<|image_pad|>", + "<|video_pad|>" + ], + "is_local": true, + "local_files_only": false, + "model_max_length": 131072, + "pad_token": "<|endoftext|>", + "split_special_tokens": false, + "tokenizer_class": "Qwen2Tokenizer", + "unk_token": null +} diff --git a/MATH/SLS/Qwen3-8B/checkpoint-675/adapter_config.json b/MATH/SLS/Qwen3-8B/checkpoint-675/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..2b7c990d8049472c95210022572ac85eff639c37 --- /dev/null +++ b/MATH/SLS/Qwen3-8B/checkpoint-675/adapter_config.json @@ -0,0 +1,45 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3-8B", + "bias": "none", + "corda_config": null, + "ensure_weight_tying": false, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": false, + "inference_mode": true, + "init_lora_weights": true, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 64, + "lora_bias": false, + "lora_dropout": 0.05, + "lora_ga_config": null, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "peft_type": "LORA", + "peft_version": "0.19.1", + "qalora_group_size": 16, + "r": 64, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "o_proj", + "k_proj", + "q_proj", + "v_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_bdlora": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} diff --git a/MATH/SLS/Qwen3-8B/checkpoint-675/chat_template.jinja b/MATH/SLS/Qwen3-8B/checkpoint-675/chat_template.jinja new file mode 100644 index 0000000000000000000000000000000000000000..01be9b307daa2d425f7c168c9fb145a286e0afb4 --- /dev/null +++ b/MATH/SLS/Qwen3-8B/checkpoint-675/chat_template.jinja @@ -0,0 +1,89 @@ +{%- if tools %} + {{- '<|im_start|>system\n' }} + {%- if messages[0].role == 'system' %} + {{- messages[0].content + '\n\n' }} + {%- endif %} + {{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within XML tags:\n" }} + {%- for tool in tools %} + {{- "\n" }} + {{- tool | tojson }} + {%- endfor %} + {{- "\n\n\nFor each function call, return a json object with function name and arguments within XML tags:\n\n{\"name\": , \"arguments\": }\n<|im_end|>\n" }} +{%- else %} + {%- if messages[0].role == 'system' %} + {{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }} + {%- endif %} +{%- endif %} +{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %} +{%- for message in messages[::-1] %} + {%- set index = (messages|length - 1) - loop.index0 %} + {%- if ns.multi_step_tool and message.role == "user" and message.content is string and not(message.content.startswith('') and message.content.endswith('')) %} + {%- set ns.multi_step_tool = false %} + {%- set ns.last_query_index = index %} + {%- endif %} +{%- endfor %} +{%- for message in messages %} + {%- if message.content is string %} + {%- set content = message.content %} + {%- else %} + {%- set content = '' %} + {%- endif %} + {%- if (message.role == "user") or (message.role == "system" and not loop.first) %} + {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }} + {%- elif message.role == "assistant" %} + {%- set reasoning_content = '' %} + {%- if message.reasoning_content is string %} + {%- set reasoning_content = message.reasoning_content %} + {%- else %} + {%- if '' in content %} + {%- set reasoning_content = content.split('')[0].rstrip('\n').split('')[-1].lstrip('\n') %} + {%- set content = content.split('')[-1].lstrip('\n') %} + {%- endif %} + {%- endif %} + {%- if loop.index0 > ns.last_query_index %} + {%- if loop.last or (not loop.last and reasoning_content) %} + {{- '<|im_start|>' + message.role + '\n\n' + reasoning_content.strip('\n') + '\n\n\n' + content.lstrip('\n') }} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- if message.tool_calls %} + {%- for tool_call in message.tool_calls %} + {%- if (loop.first and content) or (not loop.first) %} + {{- '\n' }} + {%- endif %} + {%- if tool_call.function %} + {%- set tool_call = tool_call.function %} + {%- endif %} + {{- '\n{"name": "' }} + {{- tool_call.name }} + {{- '", "arguments": ' }} + {%- if tool_call.arguments is string %} + {{- tool_call.arguments }} + {%- else %} + {{- tool_call.arguments | tojson }} + {%- endif %} + {{- '}\n' }} + {%- endfor %} + {%- endif %} + {{- '<|im_end|>\n' }} + {%- elif message.role == "tool" %} + {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %} + {{- '<|im_start|>user' }} + {%- endif %} + {{- '\n\n' }} + {{- content }} + {{- '\n' }} + {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %} + {{- '<|im_end|>\n' }} + {%- endif %} + {%- endif %} +{%- endfor %} +{%- if add_generation_prompt %} + {{- '<|im_start|>assistant\n' }} + {%- if enable_thinking is defined and enable_thinking is false %} + {{- '\n\n\n\n' }} + {%- endif %} +{%- endif %} \ No newline at end of file diff --git a/MATH/SLS/Qwen3-8B/checkpoint-675/tokenizer_config.json b/MATH/SLS/Qwen3-8B/checkpoint-675/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..5668a4a01433b0648bb972458de616f22f3e728e --- /dev/null +++ b/MATH/SLS/Qwen3-8B/checkpoint-675/tokenizer_config.json @@ -0,0 +1,30 @@ +{ + "add_prefix_space": false, + "backend": "tokenizers", + "bos_token": null, + "clean_up_tokenization_spaces": false, + "eos_token": "<|im_end|>", + "errors": "replace", + "extra_special_tokens": [ + "<|im_start|>", + "<|im_end|>", + "<|object_ref_start|>", + "<|object_ref_end|>", + "<|box_start|>", + "<|box_end|>", + "<|quad_start|>", + "<|quad_end|>", + "<|vision_start|>", + "<|vision_end|>", + "<|vision_pad|>", + "<|image_pad|>", + "<|video_pad|>" + ], + "is_local": true, + "local_files_only": false, + "model_max_length": 131072, + "pad_token": "<|endoftext|>", + "split_special_tokens": false, + "tokenizer_class": "Qwen2Tokenizer", + "unk_token": null +} diff --git a/MATH/SLS/Qwen3-8B/checkpoint-975/adapter_config.json b/MATH/SLS/Qwen3-8B/checkpoint-975/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..2b7c990d8049472c95210022572ac85eff639c37 --- /dev/null +++ b/MATH/SLS/Qwen3-8B/checkpoint-975/adapter_config.json @@ -0,0 +1,45 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3-8B", + "bias": "none", + "corda_config": null, + "ensure_weight_tying": false, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": false, + "inference_mode": true, + "init_lora_weights": true, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 64, + "lora_bias": false, + "lora_dropout": 0.05, + "lora_ga_config": null, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "peft_type": "LORA", + "peft_version": "0.19.1", + "qalora_group_size": 16, + "r": 64, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "o_proj", + "k_proj", + "q_proj", + "v_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_bdlora": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} diff --git a/MATH/SLS/Qwen3-8B/checkpoint-975/chat_template.jinja b/MATH/SLS/Qwen3-8B/checkpoint-975/chat_template.jinja new file mode 100644 index 0000000000000000000000000000000000000000..01be9b307daa2d425f7c168c9fb145a286e0afb4 --- /dev/null +++ b/MATH/SLS/Qwen3-8B/checkpoint-975/chat_template.jinja @@ -0,0 +1,89 @@ +{%- if tools %} + {{- '<|im_start|>system\n' }} + {%- if messages[0].role == 'system' %} + {{- messages[0].content + '\n\n' }} + {%- endif %} + {{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within XML tags:\n" }} + {%- for tool in tools %} + {{- "\n" }} + {{- tool | tojson }} + {%- endfor %} + {{- "\n\n\nFor each function call, return a json object with function name and arguments within XML tags:\n\n{\"name\": , \"arguments\": }\n<|im_end|>\n" }} +{%- else %} + {%- if messages[0].role == 'system' %} + {{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }} + {%- endif %} +{%- endif %} +{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %} +{%- for message in messages[::-1] %} + {%- set index = (messages|length - 1) - loop.index0 %} + {%- if ns.multi_step_tool and message.role == "user" and message.content is string and not(message.content.startswith('') and message.content.endswith('')) %} + {%- set ns.multi_step_tool = false %} + {%- set ns.last_query_index = index %} + {%- endif %} +{%- endfor %} +{%- for message in messages %} + {%- if message.content is string %} + {%- set content = message.content %} + {%- else %} + {%- set content = '' %} + {%- endif %} + {%- if (message.role == "user") or (message.role == "system" and not loop.first) %} + {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }} + {%- elif message.role == "assistant" %} + {%- set reasoning_content = '' %} + {%- if message.reasoning_content is string %} + {%- set reasoning_content = message.reasoning_content %} + {%- else %} + {%- if '' in content %} + {%- set reasoning_content = content.split('')[0].rstrip('\n').split('')[-1].lstrip('\n') %} + {%- set content = content.split('')[-1].lstrip('\n') %} + {%- endif %} + {%- endif %} + {%- if loop.index0 > ns.last_query_index %} + {%- if loop.last or (not loop.last and reasoning_content) %} + {{- '<|im_start|>' + message.role + '\n\n' + reasoning_content.strip('\n') + '\n\n\n' + content.lstrip('\n') }} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- if message.tool_calls %} + {%- for tool_call in message.tool_calls %} + {%- if (loop.first and content) or (not loop.first) %} + {{- '\n' }} + {%- endif %} + {%- if tool_call.function %} + {%- set tool_call = tool_call.function %} + {%- endif %} + {{- '\n{"name": "' }} + {{- tool_call.name }} + {{- '", "arguments": ' }} + {%- if tool_call.arguments is string %} + {{- tool_call.arguments }} + {%- else %} + {{- tool_call.arguments | tojson }} + {%- endif %} + {{- '}\n' }} + {%- endfor %} + {%- endif %} + {{- '<|im_end|>\n' }} + {%- elif message.role == "tool" %} + {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %} + {{- '<|im_start|>user' }} + {%- endif %} + {{- '\n\n' }} + {{- content }} + {{- '\n' }} + {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %} + {{- '<|im_end|>\n' }} + {%- endif %} + {%- endif %} +{%- endfor %} +{%- if add_generation_prompt %} + {{- '<|im_start|>assistant\n' }} + {%- if enable_thinking is defined and enable_thinking is false %} + {{- '\n\n\n\n' }} + {%- endif %} +{%- endif %} \ No newline at end of file diff --git a/MATH/SLS/Qwen3-8B/checkpoint-975/tokenizer_config.json b/MATH/SLS/Qwen3-8B/checkpoint-975/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..5668a4a01433b0648bb972458de616f22f3e728e --- /dev/null +++ b/MATH/SLS/Qwen3-8B/checkpoint-975/tokenizer_config.json @@ -0,0 +1,30 @@ +{ + "add_prefix_space": false, + "backend": "tokenizers", + "bos_token": null, + "clean_up_tokenization_spaces": false, + "eos_token": "<|im_end|>", + "errors": "replace", + "extra_special_tokens": [ + "<|im_start|>", + "<|im_end|>", + "<|object_ref_start|>", + "<|object_ref_end|>", + "<|box_start|>", + "<|box_end|>", + "<|quad_start|>", + "<|quad_end|>", + "<|vision_start|>", + "<|vision_end|>", + "<|vision_pad|>", + "<|image_pad|>", + "<|video_pad|>" + ], + "is_local": true, + "local_files_only": false, + "model_max_length": 131072, + "pad_token": "<|endoftext|>", + "split_special_tokens": false, + "tokenizer_class": "Qwen2Tokenizer", + "unk_token": null +} diff --git a/MuSiQue/PD/Qwen3-1.7B/final/final_eval_metrics.json b/MuSiQue/PD/Qwen3-1.7B/final/final_eval_metrics.json new file mode 100644 index 0000000000000000000000000000000000000000..2777705b7645753d08f7df1066568a0398321066 --- /dev/null +++ b/MuSiQue/PD/Qwen3-1.7B/final/final_eval_metrics.json @@ -0,0 +1,7 @@ +{ + "eval_loss": 0.42751801013946533, + "eval_runtime": 26.8472, + "eval_samples_per_second": 11.025, + "eval_steps_per_second": 0.708, + "epoch": 5.0 +} diff --git a/MuSiQue/PD/Qwen3-1.7B/final/train_summary.json b/MuSiQue/PD/Qwen3-1.7B/final/train_summary.json new file mode 100644 index 0000000000000000000000000000000000000000..50e5ac045f38ee94c4067cd78f544a0da471758f --- /dev/null +++ b/MuSiQue/PD/Qwen3-1.7B/final/train_summary.json @@ -0,0 +1,12 @@ +{ + "global_step": 210, + "training_loss": 0.5127826781499953, + "metrics": { + "train_runtime": 1140.4734, + "train_samples_per_second": 11.517, + "train_steps_per_second": 0.184, + "total_flos": 4.188032724977582e+17, + "train_loss": 0.5127826781499953, + "epoch": 5.0 + } +} diff --git a/MuSiQue/PD/Qwen3-4B/checkpoint-210/adapter_config.json b/MuSiQue/PD/Qwen3-4B/checkpoint-210/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..9e4f92d62739074b61b493d1cac69c11f5a1b5ed --- /dev/null +++ b/MuSiQue/PD/Qwen3-4B/checkpoint-210/adapter_config.json @@ -0,0 +1,45 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3-4B", + "bias": "none", + "corda_config": null, + "ensure_weight_tying": false, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": false, + "inference_mode": true, + "init_lora_weights": true, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 64, + "lora_bias": false, + "lora_dropout": 0.05, + "lora_ga_config": null, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "peft_type": "LORA", + "peft_version": "0.19.1", + "qalora_group_size": 16, + "r": 64, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "o_proj", + "q_proj", + "k_proj", + "v_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_bdlora": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} diff --git a/MuSiQue/PD/Qwen3-4B/checkpoint-210/chat_template.jinja b/MuSiQue/PD/Qwen3-4B/checkpoint-210/chat_template.jinja new file mode 100644 index 0000000000000000000000000000000000000000..01be9b307daa2d425f7c168c9fb145a286e0afb4 --- /dev/null +++ b/MuSiQue/PD/Qwen3-4B/checkpoint-210/chat_template.jinja @@ -0,0 +1,89 @@ +{%- if tools %} + {{- '<|im_start|>system\n' }} + {%- if messages[0].role == 'system' %} + {{- messages[0].content + '\n\n' }} + {%- endif %} + {{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within XML tags:\n" }} + {%- for tool in tools %} + {{- "\n" }} + {{- tool | tojson }} + {%- endfor %} + {{- "\n\n\nFor each function call, return a json object with function name and arguments within XML tags:\n\n{\"name\": , \"arguments\": }\n<|im_end|>\n" }} +{%- else %} + {%- if messages[0].role == 'system' %} + {{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }} + {%- endif %} +{%- endif %} +{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %} +{%- for message in messages[::-1] %} + {%- set index = (messages|length - 1) - loop.index0 %} + {%- if ns.multi_step_tool and message.role == "user" and message.content is string and not(message.content.startswith('') and message.content.endswith('')) %} + {%- set ns.multi_step_tool = false %} + {%- set ns.last_query_index = index %} + {%- endif %} +{%- endfor %} +{%- for message in messages %} + {%- if message.content is string %} + {%- set content = message.content %} + {%- else %} + {%- set content = '' %} + {%- endif %} + {%- if (message.role == "user") or (message.role == "system" and not loop.first) %} + {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }} + {%- elif message.role == "assistant" %} + {%- set reasoning_content = '' %} + {%- if message.reasoning_content is string %} + {%- set reasoning_content = message.reasoning_content %} + {%- else %} + {%- if '' in content %} + {%- set reasoning_content = content.split('')[0].rstrip('\n').split('')[-1].lstrip('\n') %} + {%- set content = content.split('')[-1].lstrip('\n') %} + {%- endif %} + {%- endif %} + {%- if loop.index0 > ns.last_query_index %} + {%- if loop.last or (not loop.last and reasoning_content) %} + {{- '<|im_start|>' + message.role + '\n\n' + reasoning_content.strip('\n') + '\n\n\n' + content.lstrip('\n') }} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- if message.tool_calls %} + {%- for tool_call in message.tool_calls %} + {%- if (loop.first and content) or (not loop.first) %} + {{- '\n' }} + {%- endif %} + {%- if tool_call.function %} + {%- set tool_call = tool_call.function %} + {%- endif %} + {{- '\n{"name": "' }} + {{- tool_call.name }} + {{- '", "arguments": ' }} + {%- if tool_call.arguments is string %} + {{- tool_call.arguments }} + {%- else %} + {{- tool_call.arguments | tojson }} + {%- endif %} + {{- '}\n' }} + {%- endfor %} + {%- endif %} + {{- '<|im_end|>\n' }} + {%- elif message.role == "tool" %} + {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %} + {{- '<|im_start|>user' }} + {%- endif %} + {{- '\n\n' }} + {{- content }} + {{- '\n' }} + {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %} + {{- '<|im_end|>\n' }} + {%- endif %} + {%- endif %} +{%- endfor %} +{%- if add_generation_prompt %} + {{- '<|im_start|>assistant\n' }} + {%- if enable_thinking is defined and enable_thinking is false %} + {{- '\n\n\n\n' }} + {%- endif %} +{%- endif %} \ No newline at end of file diff --git a/MuSiQue/PD/Qwen3-4B/checkpoint-210/tokenizer_config.json b/MuSiQue/PD/Qwen3-4B/checkpoint-210/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..5668a4a01433b0648bb972458de616f22f3e728e --- /dev/null +++ b/MuSiQue/PD/Qwen3-4B/checkpoint-210/tokenizer_config.json @@ -0,0 +1,30 @@ +{ + "add_prefix_space": false, + "backend": "tokenizers", + "bos_token": null, + "clean_up_tokenization_spaces": false, + "eos_token": "<|im_end|>", + "errors": "replace", + "extra_special_tokens": [ + "<|im_start|>", + "<|im_end|>", + "<|object_ref_start|>", + "<|object_ref_end|>", + "<|box_start|>", + "<|box_end|>", + "<|quad_start|>", + "<|quad_end|>", + "<|vision_start|>", + "<|vision_end|>", + "<|vision_pad|>", + "<|image_pad|>", + "<|video_pad|>" + ], + "is_local": true, + "local_files_only": false, + "model_max_length": 131072, + "pad_token": "<|endoftext|>", + "split_special_tokens": false, + "tokenizer_class": "Qwen2Tokenizer", + "unk_token": null +} diff --git a/MuSiQue/PD/Qwen3-4B/checkpoint-210/trainer_state.json b/MuSiQue/PD/Qwen3-4B/checkpoint-210/trainer_state.json new file mode 100644 index 0000000000000000000000000000000000000000..0eb31479c9ea856a2a65d42b52e8883ccd63a05e --- /dev/null +++ b/MuSiQue/PD/Qwen3-4B/checkpoint-210/trainer_state.json @@ -0,0 +1,214 @@ +{ + "best_global_step": 210, + "best_metric": 0.33650460839271545, + "best_model_checkpoint": "jca/sft_runs/0706v2/A2/checkpoint-210", + "epoch": 5.0, + "eval_steps": 100, + "global_step": 210, + "is_hyper_param_search": false, + "is_local_process_zero": true, + "is_world_process_zero": true, + "log_history": [ + { + "epoch": 0.24242424242424243, + "grad_norm": 2.355684995651245, + "learning_rate": 1.6363636363636366e-05, + "loss": 1.0766295433044433, + "step": 10 + }, + { + "epoch": 0.48484848484848486, + "grad_norm": 0.3754599392414093, + "learning_rate": 1.992035358593258e-05, + "loss": 0.609400749206543, + "step": 20 + }, + { + "epoch": 0.7272727272727273, + "grad_norm": 0.24750632047653198, + "learning_rate": 1.959896320156857e-05, + "loss": 0.4279136657714844, + "step": 30 + }, + { + "epoch": 0.9696969696969697, + "grad_norm": 0.20160840451717377, + "learning_rate": 1.903883800488824e-05, + "loss": 0.40570430755615233, + "step": 40 + }, + { + "epoch": 1.1939393939393939, + "grad_norm": 0.16031071543693542, + "learning_rate": 1.8253908811219764e-05, + "loss": 0.38538694381713867, + "step": 50 + }, + { + "epoch": 1.4363636363636363, + "grad_norm": 0.14260052144527435, + "learning_rate": 1.7263697512646397e-05, + "loss": 0.3609494209289551, + "step": 60 + }, + { + "epoch": 1.6787878787878787, + "grad_norm": 0.1463041603565216, + "learning_rate": 1.609283155106517e-05, + "loss": 0.3578346252441406, + "step": 70 + }, + { + "epoch": 1.9212121212121214, + "grad_norm": 0.16592077910900116, + "learning_rate": 1.4770431411648898e-05, + "loss": 0.34612488746643066, + "step": 80 + }, + { + "epoch": 2.1454545454545455, + "grad_norm": 0.16671159863471985, + "learning_rate": 1.3329386370297615e-05, + "loss": 0.34031288623809813, + "step": 90 + }, + { + "epoch": 2.3878787878787877, + "grad_norm": 0.1656835824251175, + "learning_rate": 1.1805536507889021e-05, + "loss": 0.3353354692459106, + "step": 100 + }, + { + "epoch": 2.3878787878787877, + "eval_loss": 0.35049664974212646, + "eval_runtime": 39.9699, + "eval_samples_per_second": 7.406, + "eval_steps_per_second": 0.475, + "step": 100 + }, + { + "epoch": 2.6303030303030304, + "grad_norm": 0.1533147543668747, + "learning_rate": 1.0236781335366239e-05, + "loss": 0.33091373443603517, + "step": 110 + }, + { + "epoch": 2.8727272727272726, + "grad_norm": 0.1681651622056961, + "learning_rate": 8.662137198955211e-06, + "loss": 0.3279443264007568, + "step": 120 + }, + { + "epoch": 3.096969696969697, + "grad_norm": 0.16137106716632843, + "learning_rate": 7.1207669086883366e-06, + "loss": 0.34074177742004397, + "step": 130 + }, + { + "epoch": 3.3393939393939394, + "grad_norm": 0.16217614710330963, + "learning_rate": 5.651005724242072e-06, + "loss": 0.32854495048522947, + "step": 140 + }, + { + "epoch": 3.581818181818182, + "grad_norm": 0.18967971205711365, + "learning_rate": 4.289407922693053e-06, + "loss": 0.31683077812194826, + "step": 150 + }, + { + "epoch": 3.824242424242424, + "grad_norm": 0.1790875494480133, + "learning_rate": 3.0698376609066828e-06, + "loss": 0.3158400535583496, + "step": 160 + }, + { + "epoch": 4.048484848484849, + "grad_norm": 0.17203989624977112, + "learning_rate": 2.022626743624807e-06, + "loss": 0.3289612293243408, + "step": 170 + }, + { + "epoch": 4.290909090909091, + "grad_norm": 0.20636889338493347, + "learning_rate": 1.1738202443145307e-06, + "loss": 0.32933242321014405, + "step": 180 + }, + { + "epoch": 4.533333333333333, + "grad_norm": 0.17741191387176514, + "learning_rate": 5.445287408633304e-07, + "loss": 0.3244450569152832, + "step": 190 + }, + { + "epoch": 4.775757575757575, + "grad_norm": 0.1625152975320816, + "learning_rate": 1.504032765988961e-07, + "loss": 0.3033029079437256, + "step": 200 + }, + { + "epoch": 4.775757575757575, + "eval_loss": 0.3367431163787842, + "eval_runtime": 43.5501, + "eval_samples_per_second": 6.797, + "eval_steps_per_second": 0.436, + "step": 200 + }, + { + "epoch": 5.0, + "grad_norm": 0.28132712841033936, + "learning_rate": 1.246104823426908e-09, + "loss": 0.30692453384399415, + "step": 210 + }, + { + "epoch": 5.0, + "eval_loss": 0.33650460839271545, + "eval_runtime": 40.7323, + "eval_samples_per_second": 7.267, + "eval_steps_per_second": 0.466, + "step": 210 + } + ], + "logging_steps": 10, + "max_steps": 210, + "num_input_tokens_seen": 0, + "num_train_epochs": 5, + "save_steps": 100, + "stateful_callbacks": { + "EarlyStoppingCallback": { + "args": { + "early_stopping_patience": 3, + "early_stopping_threshold": 0.0 + }, + "attributes": { + "early_stopping_patience_counter": 0 + } + }, + "TrainerControl": { + "args": { + "should_epoch_stop": false, + "should_evaluate": false, + "should_log": false, + "should_save": true, + "should_training_stop": true + }, + "attributes": {} + } + }, + "total_flos": 1.07413289795217e+18, + "train_batch_size": 2, + "trial_name": null, + "trial_params": null +} diff --git a/MuSiQue/PD/Qwen3-4B/final/adapter_config.json b/MuSiQue/PD/Qwen3-4B/final/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..9e4f92d62739074b61b493d1cac69c11f5a1b5ed --- /dev/null +++ b/MuSiQue/PD/Qwen3-4B/final/adapter_config.json @@ -0,0 +1,45 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3-4B", + "bias": "none", + "corda_config": null, + "ensure_weight_tying": false, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": false, + "inference_mode": true, + "init_lora_weights": true, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 64, + "lora_bias": false, + "lora_dropout": 0.05, + "lora_ga_config": null, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "peft_type": "LORA", + "peft_version": "0.19.1", + "qalora_group_size": 16, + "r": 64, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "o_proj", + "q_proj", + "k_proj", + "v_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_bdlora": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} diff --git a/MuSiQue/PD/Qwen3-4B/final/chat_template.jinja b/MuSiQue/PD/Qwen3-4B/final/chat_template.jinja new file mode 100644 index 0000000000000000000000000000000000000000..01be9b307daa2d425f7c168c9fb145a286e0afb4 --- /dev/null +++ b/MuSiQue/PD/Qwen3-4B/final/chat_template.jinja @@ -0,0 +1,89 @@ +{%- if tools %} + {{- '<|im_start|>system\n' }} + {%- if messages[0].role == 'system' %} + {{- messages[0].content + '\n\n' }} + {%- endif %} + {{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within XML tags:\n" }} + {%- for tool in tools %} + {{- "\n" }} + {{- tool | tojson }} + {%- endfor %} + {{- "\n\n\nFor each function call, return a json object with function name and arguments within XML tags:\n\n{\"name\": , \"arguments\": }\n<|im_end|>\n" }} +{%- else %} + {%- if messages[0].role == 'system' %} + {{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }} + {%- endif %} +{%- endif %} +{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %} +{%- for message in messages[::-1] %} + {%- set index = (messages|length - 1) - loop.index0 %} + {%- if ns.multi_step_tool and message.role == "user" and message.content is string and not(message.content.startswith('') and message.content.endswith('')) %} + {%- set ns.multi_step_tool = false %} + {%- set ns.last_query_index = index %} + {%- endif %} +{%- endfor %} +{%- for message in messages %} + {%- if message.content is string %} + {%- set content = message.content %} + {%- else %} + {%- set content = '' %} + {%- endif %} + {%- if (message.role == "user") or (message.role == "system" and not loop.first) %} + {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }} + {%- elif message.role == "assistant" %} + {%- set reasoning_content = '' %} + {%- if message.reasoning_content is string %} + {%- set reasoning_content = message.reasoning_content %} + {%- else %} + {%- if '' in content %} + {%- set reasoning_content = content.split('')[0].rstrip('\n').split('')[-1].lstrip('\n') %} + {%- set content = content.split('')[-1].lstrip('\n') %} + {%- endif %} + {%- endif %} + {%- if loop.index0 > ns.last_query_index %} + {%- if loop.last or (not loop.last and reasoning_content) %} + {{- '<|im_start|>' + message.role + '\n\n' + reasoning_content.strip('\n') + '\n\n\n' + content.lstrip('\n') }} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- if message.tool_calls %} + {%- for tool_call in message.tool_calls %} + {%- if (loop.first and content) or (not loop.first) %} + {{- '\n' }} + {%- endif %} + {%- if tool_call.function %} + {%- set tool_call = tool_call.function %} + {%- endif %} + {{- '\n{"name": "' }} + {{- tool_call.name }} + {{- '", "arguments": ' }} + {%- if tool_call.arguments is string %} + {{- tool_call.arguments }} + {%- else %} + {{- tool_call.arguments | tojson }} + {%- endif %} + {{- '}\n' }} + {%- endfor %} + {%- endif %} + {{- '<|im_end|>\n' }} + {%- elif message.role == "tool" %} + {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %} + {{- '<|im_start|>user' }} + {%- endif %} + {{- '\n\n' }} + {{- content }} + {{- '\n' }} + {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %} + {{- '<|im_end|>\n' }} + {%- endif %} + {%- endif %} +{%- endfor %} +{%- if add_generation_prompt %} + {{- '<|im_start|>assistant\n' }} + {%- if enable_thinking is defined and enable_thinking is false %} + {{- '\n\n\n\n' }} + {%- endif %} +{%- endif %} \ No newline at end of file diff --git a/MuSiQue/PD/Qwen3-4B/final/final_eval_metrics.json b/MuSiQue/PD/Qwen3-4B/final/final_eval_metrics.json new file mode 100644 index 0000000000000000000000000000000000000000..d1cae45e333af6391d653ac173be129fe2d38df0 --- /dev/null +++ b/MuSiQue/PD/Qwen3-4B/final/final_eval_metrics.json @@ -0,0 +1,7 @@ +{ + "eval_loss": 0.33650460839271545, + "eval_runtime": 40.5451, + "eval_samples_per_second": 7.301, + "eval_steps_per_second": 0.469, + "epoch": 5.0 +} diff --git a/MuSiQue/PD/Qwen3-4B/final/tokenizer_config.json b/MuSiQue/PD/Qwen3-4B/final/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..5668a4a01433b0648bb972458de616f22f3e728e --- /dev/null +++ b/MuSiQue/PD/Qwen3-4B/final/tokenizer_config.json @@ -0,0 +1,30 @@ +{ + "add_prefix_space": false, + "backend": "tokenizers", + "bos_token": null, + "clean_up_tokenization_spaces": false, + "eos_token": "<|im_end|>", + "errors": "replace", + "extra_special_tokens": [ + "<|im_start|>", + "<|im_end|>", + "<|object_ref_start|>", + "<|object_ref_end|>", + "<|box_start|>", + "<|box_end|>", + "<|quad_start|>", + "<|quad_end|>", + "<|vision_start|>", + "<|vision_end|>", + "<|vision_pad|>", + "<|image_pad|>", + "<|video_pad|>" + ], + "is_local": true, + "local_files_only": false, + "model_max_length": 131072, + "pad_token": "<|endoftext|>", + "split_special_tokens": false, + "tokenizer_class": "Qwen2Tokenizer", + "unk_token": null +} diff --git a/MuSiQue/PD/Qwen3-4B/final/train_summary.json b/MuSiQue/PD/Qwen3-4B/final/train_summary.json new file mode 100644 index 0000000000000000000000000000000000000000..52427951107ebdd1792062bb6850b4355b0e3ab0 --- /dev/null +++ b/MuSiQue/PD/Qwen3-4B/final/train_summary.json @@ -0,0 +1,12 @@ +{ + "global_step": 210, + "training_loss": 0.3904463938304356, + "metrics": { + "train_runtime": 2428.0626, + "train_samples_per_second": 5.41, + "train_steps_per_second": 0.086, + "total_flos": 1.07413289795217e+18, + "train_loss": 0.3904463938304356, + "epoch": 5.0 + } +} diff --git a/MuSiQue/PD/Qwen3-8B/checkpoint-200/adapter_config.json b/MuSiQue/PD/Qwen3-8B/checkpoint-200/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..b3c0282381dfea55351c7175fbad57cbb35a290b --- /dev/null +++ b/MuSiQue/PD/Qwen3-8B/checkpoint-200/adapter_config.json @@ -0,0 +1,45 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3-8B", + "bias": "none", + "corda_config": null, + "ensure_weight_tying": false, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": false, + "inference_mode": true, + "init_lora_weights": true, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 64, + "lora_bias": false, + "lora_dropout": 0.05, + "lora_ga_config": null, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "peft_type": "LORA", + "peft_version": "0.19.1", + "qalora_group_size": 16, + "r": 64, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "v_proj", + "o_proj", + "q_proj", + "k_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_bdlora": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} diff --git a/MuSiQue/PD/Qwen3-8B/checkpoint-200/chat_template.jinja b/MuSiQue/PD/Qwen3-8B/checkpoint-200/chat_template.jinja new file mode 100644 index 0000000000000000000000000000000000000000..01be9b307daa2d425f7c168c9fb145a286e0afb4 --- /dev/null +++ b/MuSiQue/PD/Qwen3-8B/checkpoint-200/chat_template.jinja @@ -0,0 +1,89 @@ +{%- if tools %} + {{- '<|im_start|>system\n' }} + {%- if messages[0].role == 'system' %} + {{- messages[0].content + '\n\n' }} + {%- endif %} + {{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within XML tags:\n" }} + {%- for tool in tools %} + {{- "\n" }} + {{- tool | tojson }} + {%- endfor %} + {{- "\n\n\nFor each function call, return a json object with function name and arguments within XML tags:\n\n{\"name\": , \"arguments\": }\n<|im_end|>\n" }} +{%- else %} + {%- if messages[0].role == 'system' %} + {{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }} + {%- endif %} +{%- endif %} +{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %} +{%- for message in messages[::-1] %} + {%- set index = (messages|length - 1) - loop.index0 %} + {%- if ns.multi_step_tool and message.role == "user" and message.content is string and not(message.content.startswith('') and message.content.endswith('')) %} + {%- set ns.multi_step_tool = false %} + {%- set ns.last_query_index = index %} + {%- endif %} +{%- endfor %} +{%- for message in messages %} + {%- if message.content is string %} + {%- set content = message.content %} + {%- else %} + {%- set content = '' %} + {%- endif %} + {%- if (message.role == "user") or (message.role == "system" and not loop.first) %} + {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }} + {%- elif message.role == "assistant" %} + {%- set reasoning_content = '' %} + {%- if message.reasoning_content is string %} + {%- set reasoning_content = message.reasoning_content %} + {%- else %} + {%- if '' in content %} + {%- set reasoning_content = content.split('')[0].rstrip('\n').split('')[-1].lstrip('\n') %} + {%- set content = content.split('')[-1].lstrip('\n') %} + {%- endif %} + {%- endif %} + {%- if loop.index0 > ns.last_query_index %} + {%- if loop.last or (not loop.last and reasoning_content) %} + {{- '<|im_start|>' + message.role + '\n\n' + reasoning_content.strip('\n') + '\n\n\n' + content.lstrip('\n') }} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- if message.tool_calls %} + {%- for tool_call in message.tool_calls %} + {%- if (loop.first and content) or (not loop.first) %} + {{- '\n' }} + {%- endif %} + {%- if tool_call.function %} + {%- set tool_call = tool_call.function %} + {%- endif %} + {{- '\n{"name": "' }} + {{- tool_call.name }} + {{- '", "arguments": ' }} + {%- if tool_call.arguments is string %} + {{- tool_call.arguments }} + {%- else %} + {{- tool_call.arguments | tojson }} + {%- endif %} + {{- '}\n' }} + {%- endfor %} + {%- endif %} + {{- '<|im_end|>\n' }} + {%- elif message.role == "tool" %} + {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %} + {{- '<|im_start|>user' }} + {%- endif %} + {{- '\n\n' }} + {{- content }} + {{- '\n' }} + {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %} + {{- '<|im_end|>\n' }} + {%- endif %} + {%- endif %} +{%- endfor %} +{%- if add_generation_prompt %} + {{- '<|im_start|>assistant\n' }} + {%- if enable_thinking is defined and enable_thinking is false %} + {{- '\n\n\n\n' }} + {%- endif %} +{%- endif %} \ No newline at end of file diff --git a/MuSiQue/PD/Qwen3-8B/checkpoint-200/tokenizer_config.json b/MuSiQue/PD/Qwen3-8B/checkpoint-200/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..5668a4a01433b0648bb972458de616f22f3e728e --- /dev/null +++ b/MuSiQue/PD/Qwen3-8B/checkpoint-200/tokenizer_config.json @@ -0,0 +1,30 @@ +{ + "add_prefix_space": false, + "backend": "tokenizers", + "bos_token": null, + "clean_up_tokenization_spaces": false, + "eos_token": "<|im_end|>", + "errors": "replace", + "extra_special_tokens": [ + "<|im_start|>", + "<|im_end|>", + "<|object_ref_start|>", + "<|object_ref_end|>", + "<|box_start|>", + "<|box_end|>", + "<|quad_start|>", + "<|quad_end|>", + "<|vision_start|>", + "<|vision_end|>", + "<|vision_pad|>", + "<|image_pad|>", + "<|video_pad|>" + ], + "is_local": true, + "local_files_only": false, + "model_max_length": 131072, + "pad_token": "<|endoftext|>", + "split_special_tokens": false, + "tokenizer_class": "Qwen2Tokenizer", + "unk_token": null +} diff --git a/MuSiQue/PD/Qwen3-8B/checkpoint-200/trainer_state.json b/MuSiQue/PD/Qwen3-8B/checkpoint-200/trainer_state.json new file mode 100644 index 0000000000000000000000000000000000000000..a0dff9722f8c2dd9fef9e1ab7538d3d0f21203a7 --- /dev/null +++ b/MuSiQue/PD/Qwen3-8B/checkpoint-200/trainer_state.json @@ -0,0 +1,199 @@ +{ + "best_global_step": 200, + "best_metric": 0.27919960021972656, + "best_model_checkpoint": "jca/sft_runs/0706v2/A3/checkpoint-200", + "epoch": 4.775757575757575, + "eval_steps": 100, + "global_step": 200, + "is_hyper_param_search": false, + "is_local_process_zero": true, + "is_world_process_zero": true, + "log_history": [ + { + "epoch": 0.24242424242424243, + "grad_norm": 1.534663200378418, + "learning_rate": 1.6363636363636366e-05, + "loss": 0.8781854629516601, + "step": 10 + }, + { + "epoch": 0.48484848484848486, + "grad_norm": 0.29615896940231323, + "learning_rate": 1.992035358593258e-05, + "loss": 0.5227407455444336, + "step": 20 + }, + { + "epoch": 0.7272727272727273, + "grad_norm": 0.19130074977874756, + "learning_rate": 1.959896320156857e-05, + "loss": 0.38105478286743166, + "step": 30 + }, + { + "epoch": 0.9696969696969697, + "grad_norm": 0.16179293394088745, + "learning_rate": 1.903883800488824e-05, + "loss": 0.3732306957244873, + "step": 40 + }, + { + "epoch": 1.1939393939393939, + "grad_norm": 0.11441448330879211, + "learning_rate": 1.8253908811219764e-05, + "loss": 0.34767518043518064, + "step": 50 + }, + { + "epoch": 1.4363636363636363, + "grad_norm": 0.157217875123024, + "learning_rate": 1.7263697512646397e-05, + "loss": 0.3196584224700928, + "step": 60 + }, + { + "epoch": 1.6787878787878787, + "grad_norm": 0.10881475359201431, + "learning_rate": 1.609283155106517e-05, + "loss": 0.3047509670257568, + "step": 70 + }, + { + "epoch": 1.9212121212121214, + "grad_norm": 0.12226514518260956, + "learning_rate": 1.4770431411648898e-05, + "loss": 0.29686751365661623, + "step": 80 + }, + { + "epoch": 2.1454545454545455, + "grad_norm": 0.1166081503033638, + "learning_rate": 1.3329386370297615e-05, + "loss": 0.28742203712463377, + "step": 90 + }, + { + "epoch": 2.3878787878787877, + "grad_norm": 0.11496414244174957, + "learning_rate": 1.1805536507889021e-05, + "loss": 0.2836357593536377, + "step": 100 + }, + { + "epoch": 2.3878787878787877, + "eval_loss": 0.295452743768692, + "eval_runtime": 41.2582, + "eval_samples_per_second": 7.174, + "eval_steps_per_second": 0.461, + "step": 100 + }, + { + "epoch": 2.6303030303030304, + "grad_norm": 0.1209372952580452, + "learning_rate": 1.0236781335366239e-05, + "loss": 0.27798166275024416, + "step": 110 + }, + { + "epoch": 2.8727272727272726, + "grad_norm": 0.13011479377746582, + "learning_rate": 8.662137198955211e-06, + "loss": 0.2755016326904297, + "step": 120 + }, + { + "epoch": 3.096969696969697, + "grad_norm": 0.12652049958705902, + "learning_rate": 7.1207669086883366e-06, + "loss": 0.285199499130249, + "step": 130 + }, + { + "epoch": 3.3393939393939394, + "grad_norm": 0.12429764121770859, + "learning_rate": 5.651005724242072e-06, + "loss": 0.2755171775817871, + "step": 140 + }, + { + "epoch": 3.581818181818182, + "grad_norm": 0.1399020254611969, + "learning_rate": 4.289407922693053e-06, + "loss": 0.26243863105773924, + "step": 150 + }, + { + "epoch": 3.824242424242424, + "grad_norm": 0.1388467699289322, + "learning_rate": 3.0698376609066828e-06, + "loss": 0.2600212097167969, + "step": 160 + }, + { + "epoch": 4.048484848484849, + "grad_norm": 0.13249215483665466, + "learning_rate": 2.022626743624807e-06, + "loss": 0.2813900947570801, + "step": 170 + }, + { + "epoch": 4.290909090909091, + "grad_norm": 0.1475314348936081, + "learning_rate": 1.1738202443145307e-06, + "loss": 0.2743372917175293, + "step": 180 + }, + { + "epoch": 4.533333333333333, + "grad_norm": 0.14186662435531616, + "learning_rate": 5.445287408633304e-07, + "loss": 0.26972575187683107, + "step": 190 + }, + { + "epoch": 4.775757575757575, + "grad_norm": 0.13559632003307343, + "learning_rate": 1.504032765988961e-07, + "loss": 0.2514580965042114, + "step": 200 + }, + { + "epoch": 4.775757575757575, + "eval_loss": 0.27919960021972656, + "eval_runtime": 42.4732, + "eval_samples_per_second": 6.969, + "eval_steps_per_second": 0.447, + "step": 200 + } + ], + "logging_steps": 10, + "max_steps": 210, + "num_input_tokens_seen": 0, + "num_train_epochs": 5, + "save_steps": 100, + "stateful_callbacks": { + "EarlyStoppingCallback": { + "args": { + "early_stopping_patience": 3, + "early_stopping_threshold": 0.0 + }, + "attributes": { + "early_stopping_patience_counter": 0 + } + }, + "TrainerControl": { + "args": { + "should_epoch_stop": false, + "should_evaluate": false, + "should_log": false, + "should_save": true, + "should_training_stop": false + }, + "attributes": {} + } + }, + "total_flos": 2.1266984801885225e+18, + "train_batch_size": 2, + "trial_name": null, + "trial_params": null +} diff --git a/MuSiQue/PD/Qwen3-8B/checkpoint-210/adapter_config.json b/MuSiQue/PD/Qwen3-8B/checkpoint-210/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..b3c0282381dfea55351c7175fbad57cbb35a290b --- /dev/null +++ b/MuSiQue/PD/Qwen3-8B/checkpoint-210/adapter_config.json @@ -0,0 +1,45 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3-8B", + "bias": "none", + "corda_config": null, + "ensure_weight_tying": false, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": false, + "inference_mode": true, + "init_lora_weights": true, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 64, + "lora_bias": false, + "lora_dropout": 0.05, + "lora_ga_config": null, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "peft_type": "LORA", + "peft_version": "0.19.1", + "qalora_group_size": 16, + "r": 64, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "v_proj", + "o_proj", + "q_proj", + "k_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_bdlora": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} diff --git a/MuSiQue/PD/Qwen3-8B/checkpoint-210/chat_template.jinja b/MuSiQue/PD/Qwen3-8B/checkpoint-210/chat_template.jinja new file mode 100644 index 0000000000000000000000000000000000000000..01be9b307daa2d425f7c168c9fb145a286e0afb4 --- /dev/null +++ b/MuSiQue/PD/Qwen3-8B/checkpoint-210/chat_template.jinja @@ -0,0 +1,89 @@ +{%- if tools %} + {{- '<|im_start|>system\n' }} + {%- if messages[0].role == 'system' %} + {{- messages[0].content + '\n\n' }} + {%- endif %} + {{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within XML tags:\n" }} + {%- for tool in tools %} + {{- "\n" }} + {{- tool | tojson }} + {%- endfor %} + {{- "\n\n\nFor each function call, return a json object with function name and arguments within XML tags:\n\n{\"name\": , \"arguments\": }\n<|im_end|>\n" }} +{%- else %} + {%- if messages[0].role == 'system' %} + {{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }} + {%- endif %} +{%- endif %} +{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %} +{%- for message in messages[::-1] %} + {%- set index = (messages|length - 1) - loop.index0 %} + {%- if ns.multi_step_tool and message.role == "user" and message.content is string and not(message.content.startswith('') and message.content.endswith('')) %} + {%- set ns.multi_step_tool = false %} + {%- set ns.last_query_index = index %} + {%- endif %} +{%- endfor %} +{%- for message in messages %} + {%- if message.content is string %} + {%- set content = message.content %} + {%- else %} + {%- set content = '' %} + {%- endif %} + {%- if (message.role == "user") or (message.role == "system" and not loop.first) %} + {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }} + {%- elif message.role == "assistant" %} + {%- set reasoning_content = '' %} + {%- if message.reasoning_content is string %} + {%- set reasoning_content = message.reasoning_content %} + {%- else %} + {%- if '' in content %} + {%- set reasoning_content = content.split('')[0].rstrip('\n').split('')[-1].lstrip('\n') %} + {%- set content = content.split('')[-1].lstrip('\n') %} + {%- endif %} + {%- endif %} + {%- if loop.index0 > ns.last_query_index %} + {%- if loop.last or (not loop.last and reasoning_content) %} + {{- '<|im_start|>' + message.role + '\n\n' + reasoning_content.strip('\n') + '\n\n\n' + content.lstrip('\n') }} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- if message.tool_calls %} + {%- for tool_call in message.tool_calls %} + {%- if (loop.first and content) or (not loop.first) %} + {{- '\n' }} + {%- endif %} + {%- if tool_call.function %} + {%- set tool_call = tool_call.function %} + {%- endif %} + {{- '\n{"name": "' }} + {{- tool_call.name }} + {{- '", "arguments": ' }} + {%- if tool_call.arguments is string %} + {{- tool_call.arguments }} + {%- else %} + {{- tool_call.arguments | tojson }} + {%- endif %} + {{- '}\n' }} + {%- endfor %} + {%- endif %} + {{- '<|im_end|>\n' }} + {%- elif message.role == "tool" %} + {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %} + {{- '<|im_start|>user' }} + {%- endif %} + {{- '\n\n' }} + {{- content }} + {{- '\n' }} + {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %} + {{- '<|im_end|>\n' }} + {%- endif %} + {%- endif %} +{%- endfor %} +{%- if add_generation_prompt %} + {{- '<|im_start|>assistant\n' }} + {%- if enable_thinking is defined and enable_thinking is false %} + {{- '\n\n\n\n' }} + {%- endif %} +{%- endif %} \ No newline at end of file diff --git a/MuSiQue/PD/Qwen3-8B/checkpoint-210/tokenizer_config.json b/MuSiQue/PD/Qwen3-8B/checkpoint-210/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..5668a4a01433b0648bb972458de616f22f3e728e --- /dev/null +++ b/MuSiQue/PD/Qwen3-8B/checkpoint-210/tokenizer_config.json @@ -0,0 +1,30 @@ +{ + "add_prefix_space": false, + "backend": "tokenizers", + "bos_token": null, + "clean_up_tokenization_spaces": false, + "eos_token": "<|im_end|>", + "errors": "replace", + "extra_special_tokens": [ + "<|im_start|>", + "<|im_end|>", + "<|object_ref_start|>", + "<|object_ref_end|>", + "<|box_start|>", + "<|box_end|>", + "<|quad_start|>", + "<|quad_end|>", + "<|vision_start|>", + "<|vision_end|>", + "<|vision_pad|>", + "<|image_pad|>", + "<|video_pad|>" + ], + "is_local": true, + "local_files_only": false, + "model_max_length": 131072, + "pad_token": "<|endoftext|>", + "split_special_tokens": false, + "tokenizer_class": "Qwen2Tokenizer", + "unk_token": null +} diff --git a/MuSiQue/PD/Qwen3-8B/checkpoint-210/trainer_state.json b/MuSiQue/PD/Qwen3-8B/checkpoint-210/trainer_state.json new file mode 100644 index 0000000000000000000000000000000000000000..d2340daf5a863b208da3aa2acf763850b246ca38 --- /dev/null +++ b/MuSiQue/PD/Qwen3-8B/checkpoint-210/trainer_state.json @@ -0,0 +1,214 @@ +{ + "best_global_step": 200, + "best_metric": 0.27919960021972656, + "best_model_checkpoint": "jca/sft_runs/0706v2/A3/checkpoint-200", + "epoch": 5.0, + "eval_steps": 100, + "global_step": 210, + "is_hyper_param_search": false, + "is_local_process_zero": true, + "is_world_process_zero": true, + "log_history": [ + { + "epoch": 0.24242424242424243, + "grad_norm": 1.534663200378418, + "learning_rate": 1.6363636363636366e-05, + "loss": 0.8781854629516601, + "step": 10 + }, + { + "epoch": 0.48484848484848486, + "grad_norm": 0.29615896940231323, + "learning_rate": 1.992035358593258e-05, + "loss": 0.5227407455444336, + "step": 20 + }, + { + "epoch": 0.7272727272727273, + "grad_norm": 0.19130074977874756, + "learning_rate": 1.959896320156857e-05, + "loss": 0.38105478286743166, + "step": 30 + }, + { + "epoch": 0.9696969696969697, + "grad_norm": 0.16179293394088745, + "learning_rate": 1.903883800488824e-05, + "loss": 0.3732306957244873, + "step": 40 + }, + { + "epoch": 1.1939393939393939, + "grad_norm": 0.11441448330879211, + "learning_rate": 1.8253908811219764e-05, + "loss": 0.34767518043518064, + "step": 50 + }, + { + "epoch": 1.4363636363636363, + "grad_norm": 0.157217875123024, + "learning_rate": 1.7263697512646397e-05, + "loss": 0.3196584224700928, + "step": 60 + }, + { + "epoch": 1.6787878787878787, + "grad_norm": 0.10881475359201431, + "learning_rate": 1.609283155106517e-05, + "loss": 0.3047509670257568, + "step": 70 + }, + { + "epoch": 1.9212121212121214, + "grad_norm": 0.12226514518260956, + "learning_rate": 1.4770431411648898e-05, + "loss": 0.29686751365661623, + "step": 80 + }, + { + "epoch": 2.1454545454545455, + "grad_norm": 0.1166081503033638, + "learning_rate": 1.3329386370297615e-05, + "loss": 0.28742203712463377, + "step": 90 + }, + { + "epoch": 2.3878787878787877, + "grad_norm": 0.11496414244174957, + "learning_rate": 1.1805536507889021e-05, + "loss": 0.2836357593536377, + "step": 100 + }, + { + "epoch": 2.3878787878787877, + "eval_loss": 0.295452743768692, + "eval_runtime": 41.2582, + "eval_samples_per_second": 7.174, + "eval_steps_per_second": 0.461, + "step": 100 + }, + { + "epoch": 2.6303030303030304, + "grad_norm": 0.1209372952580452, + "learning_rate": 1.0236781335366239e-05, + "loss": 0.27798166275024416, + "step": 110 + }, + { + "epoch": 2.8727272727272726, + "grad_norm": 0.13011479377746582, + "learning_rate": 8.662137198955211e-06, + "loss": 0.2755016326904297, + "step": 120 + }, + { + "epoch": 3.096969696969697, + "grad_norm": 0.12652049958705902, + "learning_rate": 7.1207669086883366e-06, + "loss": 0.285199499130249, + "step": 130 + }, + { + "epoch": 3.3393939393939394, + "grad_norm": 0.12429764121770859, + "learning_rate": 5.651005724242072e-06, + "loss": 0.2755171775817871, + "step": 140 + }, + { + "epoch": 3.581818181818182, + "grad_norm": 0.1399020254611969, + "learning_rate": 4.289407922693053e-06, + "loss": 0.26243863105773924, + "step": 150 + }, + { + "epoch": 3.824242424242424, + "grad_norm": 0.1388467699289322, + "learning_rate": 3.0698376609066828e-06, + "loss": 0.2600212097167969, + "step": 160 + }, + { + "epoch": 4.048484848484849, + "grad_norm": 0.13249215483665466, + "learning_rate": 2.022626743624807e-06, + "loss": 0.2813900947570801, + "step": 170 + }, + { + "epoch": 4.290909090909091, + "grad_norm": 0.1475314348936081, + "learning_rate": 1.1738202443145307e-06, + "loss": 0.2743372917175293, + "step": 180 + }, + { + "epoch": 4.533333333333333, + "grad_norm": 0.14186662435531616, + "learning_rate": 5.445287408633304e-07, + "loss": 0.26972575187683107, + "step": 190 + }, + { + "epoch": 4.775757575757575, + "grad_norm": 0.13559632003307343, + "learning_rate": 1.504032765988961e-07, + "loss": 0.2514580965042114, + "step": 200 + }, + { + "epoch": 4.775757575757575, + "eval_loss": 0.27919960021972656, + "eval_runtime": 42.4732, + "eval_samples_per_second": 6.969, + "eval_steps_per_second": 0.447, + "step": 200 + }, + { + "epoch": 5.0, + "grad_norm": 0.23140116035938263, + "learning_rate": 1.246104823426908e-09, + "loss": 0.2537376880645752, + "step": 210 + }, + { + "epoch": 5.0, + "eval_loss": 0.2794340252876282, + "eval_runtime": 42.8597, + "eval_samples_per_second": 6.906, + "eval_steps_per_second": 0.443, + "step": 210 + } + ], + "logging_steps": 10, + "max_steps": 210, + "num_input_tokens_seen": 0, + "num_train_epochs": 5, + "save_steps": 100, + "stateful_callbacks": { + "EarlyStoppingCallback": { + "args": { + "early_stopping_patience": 3, + "early_stopping_threshold": 0.0 + }, + "attributes": { + "early_stopping_patience_counter": 1 + } + }, + "TrainerControl": { + "args": { + "should_epoch_stop": false, + "should_evaluate": false, + "should_log": false, + "should_save": true, + "should_training_stop": true + }, + "attributes": {} + } + }, + "total_flos": 2.2265784256933396e+18, + "train_batch_size": 2, + "trial_name": null, + "trial_params": null +} diff --git a/MuSiQue/PD/Qwen3-8B/final/adapter_config.json b/MuSiQue/PD/Qwen3-8B/final/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..b3c0282381dfea55351c7175fbad57cbb35a290b --- /dev/null +++ b/MuSiQue/PD/Qwen3-8B/final/adapter_config.json @@ -0,0 +1,45 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3-8B", + "bias": "none", + "corda_config": null, + "ensure_weight_tying": false, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": false, + "inference_mode": true, + "init_lora_weights": true, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 64, + "lora_bias": false, + "lora_dropout": 0.05, + "lora_ga_config": null, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "peft_type": "LORA", + "peft_version": "0.19.1", + "qalora_group_size": 16, + "r": 64, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "v_proj", + "o_proj", + "q_proj", + "k_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_bdlora": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} diff --git a/MuSiQue/PD/Qwen3-8B/final/chat_template.jinja b/MuSiQue/PD/Qwen3-8B/final/chat_template.jinja new file mode 100644 index 0000000000000000000000000000000000000000..01be9b307daa2d425f7c168c9fb145a286e0afb4 --- /dev/null +++ b/MuSiQue/PD/Qwen3-8B/final/chat_template.jinja @@ -0,0 +1,89 @@ +{%- if tools %} + {{- '<|im_start|>system\n' }} + {%- if messages[0].role == 'system' %} + {{- messages[0].content + '\n\n' }} + {%- endif %} + {{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within XML tags:\n" }} + {%- for tool in tools %} + {{- "\n" }} + {{- tool | tojson }} + {%- endfor %} + {{- "\n\n\nFor each function call, return a json object with function name and arguments within XML tags:\n\n{\"name\": , \"arguments\": }\n<|im_end|>\n" }} +{%- else %} + {%- if messages[0].role == 'system' %} + {{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }} + {%- endif %} +{%- endif %} +{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %} +{%- for message in messages[::-1] %} + {%- set index = (messages|length - 1) - loop.index0 %} + {%- if ns.multi_step_tool and message.role == "user" and message.content is string and not(message.content.startswith('') and message.content.endswith('')) %} + {%- set ns.multi_step_tool = false %} + {%- set ns.last_query_index = index %} + {%- endif %} +{%- endfor %} +{%- for message in messages %} + {%- if message.content is string %} + {%- set content = message.content %} + {%- else %} + {%- set content = '' %} + {%- endif %} + {%- if (message.role == "user") or (message.role == "system" and not loop.first) %} + {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }} + {%- elif message.role == "assistant" %} + {%- set reasoning_content = '' %} + {%- if message.reasoning_content is string %} + {%- set reasoning_content = message.reasoning_content %} + {%- else %} + {%- if '' in content %} + {%- set reasoning_content = content.split('')[0].rstrip('\n').split('')[-1].lstrip('\n') %} + {%- set content = content.split('')[-1].lstrip('\n') %} + {%- endif %} + {%- endif %} + {%- if loop.index0 > ns.last_query_index %} + {%- if loop.last or (not loop.last and reasoning_content) %} + {{- '<|im_start|>' + message.role + '\n\n' + reasoning_content.strip('\n') + '\n\n\n' + content.lstrip('\n') }} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- if message.tool_calls %} + {%- for tool_call in message.tool_calls %} + {%- if (loop.first and content) or (not loop.first) %} + {{- '\n' }} + {%- endif %} + {%- if tool_call.function %} + {%- set tool_call = tool_call.function %} + {%- endif %} + {{- '\n{"name": "' }} + {{- tool_call.name }} + {{- '", "arguments": ' }} + {%- if tool_call.arguments is string %} + {{- tool_call.arguments }} + {%- else %} + {{- tool_call.arguments | tojson }} + {%- endif %} + {{- '}\n' }} + {%- endfor %} + {%- endif %} + {{- '<|im_end|>\n' }} + {%- elif message.role == "tool" %} + {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %} + {{- '<|im_start|>user' }} + {%- endif %} + {{- '\n\n' }} + {{- content }} + {{- '\n' }} + {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %} + {{- '<|im_end|>\n' }} + {%- endif %} + {%- endif %} +{%- endfor %} +{%- if add_generation_prompt %} + {{- '<|im_start|>assistant\n' }} + {%- if enable_thinking is defined and enable_thinking is false %} + {{- '\n\n\n\n' }} + {%- endif %} +{%- endif %} \ No newline at end of file diff --git a/MuSiQue/PD/Qwen3-8B/final/final_eval_metrics.json b/MuSiQue/PD/Qwen3-8B/final/final_eval_metrics.json new file mode 100644 index 0000000000000000000000000000000000000000..3770482d8a2dceede223c8554d47d77dcaf6d804 --- /dev/null +++ b/MuSiQue/PD/Qwen3-8B/final/final_eval_metrics.json @@ -0,0 +1,7 @@ +{ + "eval_loss": 0.2794340252876282, + "eval_runtime": 42.6181, + "eval_samples_per_second": 6.945, + "eval_steps_per_second": 0.446, + "epoch": 5.0 +} diff --git a/MuSiQue/PD/Qwen3-8B/final/tokenizer_config.json b/MuSiQue/PD/Qwen3-8B/final/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..5668a4a01433b0648bb972458de616f22f3e728e --- /dev/null +++ b/MuSiQue/PD/Qwen3-8B/final/tokenizer_config.json @@ -0,0 +1,30 @@ +{ + "add_prefix_space": false, + "backend": "tokenizers", + "bos_token": null, + "clean_up_tokenization_spaces": false, + "eos_token": "<|im_end|>", + "errors": "replace", + "extra_special_tokens": [ + "<|im_start|>", + "<|im_end|>", + "<|object_ref_start|>", + "<|object_ref_end|>", + "<|box_start|>", + "<|box_end|>", + "<|quad_start|>", + "<|quad_end|>", + "<|vision_start|>", + "<|vision_end|>", + "<|vision_pad|>", + "<|image_pad|>", + "<|video_pad|>" + ], + "is_local": true, + "local_files_only": false, + "model_max_length": 131072, + "pad_token": "<|endoftext|>", + "split_special_tokens": false, + "tokenizer_class": "Qwen2Tokenizer", + "unk_token": null +} diff --git a/MuSiQue/PD/Qwen3-8B/final/train_summary.json b/MuSiQue/PD/Qwen3-8B/final/train_summary.json new file mode 100644 index 0000000000000000000000000000000000000000..2d35f04b5aa1e83cc80d4575d68a754a26801a3a --- /dev/null +++ b/MuSiQue/PD/Qwen3-8B/final/train_summary.json @@ -0,0 +1,12 @@ +{ + "global_step": 210, + "training_loss": 0.3315490620476859, + "metrics": { + "train_runtime": 3059.8504, + "train_samples_per_second": 4.293, + "train_steps_per_second": 0.069, + "total_flos": 2.2265784256933396e+18, + "train_loss": 0.3315490620476859, + "epoch": 5.0 + } +}