diff --git a/precise_coder/4b_rl_bcbfix_eagrpo/best_ckpt_state.json b/precise_coder/4b_rl_bcbfix_eagrpo/best_ckpt_state.json new file mode 100644 index 0000000000000000000000000000000000000000..e08704f58ac7c13ed9438999d680448706d092a0 --- /dev/null +++ b/precise_coder/4b_rl_bcbfix_eagrpo/best_ckpt_state.json @@ -0,0 +1 @@ +{"best_val_score": 1.0947488567228776, "best_global_step": 100, "no_improve_rounds": 10} \ No newline at end of file diff --git a/precise_coder/4b_rl_bcbfix_eagrpo/global_step_100/actor/fsdp_config.json b/precise_coder/4b_rl_bcbfix_eagrpo/global_step_100/actor/fsdp_config.json new file mode 100644 index 0000000000000000000000000000000000000000..17ff55630675ec23d6a1d79ec7a480aa25faa5de --- /dev/null +++ b/precise_coder/4b_rl_bcbfix_eagrpo/global_step_100/actor/fsdp_config.json @@ -0,0 +1,4 @@ +{ + "FSDP_version": 2, + "world_size": 4 +} \ No newline at end of file diff --git a/precise_coder/4b_rl_bcbfix_eagrpo/global_step_100/actor/huggingface/chat_template.jinja b/precise_coder/4b_rl_bcbfix_eagrpo/global_step_100/actor/huggingface/chat_template.jinja new file mode 100644 index 0000000000000000000000000000000000000000..a585dec894e63da457d9440ec6aa7caa16d20860 --- /dev/null +++ b/precise_coder/4b_rl_bcbfix_eagrpo/global_step_100/actor/huggingface/chat_template.jinja @@ -0,0 +1,154 @@ +{%- set image_count = namespace(value=0) %} +{%- set video_count = namespace(value=0) %} +{%- macro render_content(content, do_vision_count, is_system_content=false) %} + {%- if content is string %} + {{- content }} + {%- elif content is iterable and content is not mapping %} + {%- for item in content %} + {%- if 'image' in item or 'image_url' in item or item.type == 'image' %} + {%- if is_system_content %} + {{- raise_exception('System message cannot contain images.') }} + {%- endif %} + {%- if do_vision_count %} + {%- set image_count.value = image_count.value + 1 %} + {%- endif %} + {%- if add_vision_id %} + {{- 'Picture ' ~ image_count.value ~ ': ' }} + {%- endif %} + {{- '<|vision_start|><|image_pad|><|vision_end|>' }} + {%- elif 'video' in item or item.type == 'video' %} + {%- if is_system_content %} + {{- raise_exception('System message cannot contain videos.') }} + {%- endif %} + {%- if do_vision_count %} + {%- set video_count.value = video_count.value + 1 %} + {%- endif %} + {%- if add_vision_id %} + {{- 'Video ' ~ video_count.value ~ ': ' }} + {%- endif %} + {{- '<|vision_start|><|video_pad|><|vision_end|>' }} + {%- elif 'text' in item %} + {{- item.text }} + {%- else %} + {{- raise_exception('Unexpected item type in content.') }} + {%- endif %} + {%- endfor %} + {%- elif content is none or content is undefined %} + {{- '' }} + {%- else %} + {{- raise_exception('Unexpected content type.') }} + {%- endif %} +{%- endmacro %} +{%- if not messages %} + {{- raise_exception('No messages provided.') }} +{%- endif %} +{%- if tools and tools is iterable and tools is not mapping %} + {{- '<|im_start|>system\n' }} + {{- "# Tools\n\nYou have access to the following functions:\n\n" }} + {%- for tool in tools %} + {{- "\n" }} + {{- tool | tojson }} + {%- endfor %} + {{- "\n" }} + {{- '\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n\n\n\nvalue_1\n\n\nThis is the value for the second parameter\nthat can span\nmultiple lines\n\n\n\n\n\nReminder:\n- Function calls MUST follow the specified format: an inner block must be nested within XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls\n' }} + {%- if messages[0].role == 'system' %} + {%- set content = render_content(messages[0].content, false, true)|trim %} + {%- if content %} + {{- '\n\n' + content }} + {%- endif %} + {%- endif %} + {{- '<|im_end|>\n' }} +{%- else %} + {%- if messages[0].role == 'system' %} + {%- set content = render_content(messages[0].content, false, true)|trim %} + {{- '<|im_start|>system\n' + 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" %} + {%- set content = render_content(message.content, false)|trim %} + {%- if not(content.startswith('') and content.endswith('')) %} + {%- set ns.multi_step_tool = false %} + {%- set ns.last_query_index = index %} + {%- endif %} + {%- endif %} +{%- endfor %} +{%- if ns.multi_step_tool %} + {{- raise_exception('No user query found in messages.') }} +{%- endif %} +{%- for message in messages %} + {%- set content = render_content(message.content, true)|trim %} + {%- if message.role == "system" %} + {%- if not loop.first %} + {{- raise_exception('System message must be at the beginning.') }} + {%- endif %} + {%- elif message.role == "user" %} + {{- '<|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 %} + {%- set reasoning_content = reasoning_content|trim %} + {%- if loop.index0 > ns.last_query_index %} + {{- '<|im_start|>' + message.role + '\n\n' + reasoning_content + '\n\n\n' + content }} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- if message.tool_calls and message.tool_calls is iterable and message.tool_calls is not mapping %} + {%- for tool_call in message.tool_calls %} + {%- if tool_call.function is defined %} + {%- set tool_call = tool_call.function %} + {%- endif %} + {%- if loop.first %} + {%- if content|trim %} + {{- '\n\n\n\n' }} + {%- else %} + {{- '\n\n' }} + {%- endif %} + {%- else %} + {{- '\n\n\n' }} + {%- endif %} + {%- if tool_call.arguments is defined %} + {%- for args_name, args_value in tool_call.arguments|items %} + {{- '\n' }} + {%- set args_value = args_value | tojson | safe if args_value is mapping or (args_value is sequence and args_value is not string) else args_value | string %} + {{- args_value }} + {{- '\n\n' }} + {%- endfor %} + {%- endif %} + {{- '\n' }} + {%- endfor %} + {%- endif %} + {{- '<|im_end|>\n' }} + {%- elif message.role == "tool" %} + {%- if loop.previtem and loop.previtem.role != "tool" %} + {{- '<|im_start|>user' }} + {%- endif %} + {{- '\n\n' }} + {{- content }} + {{- '\n' }} + {%- if not loop.last and loop.nextitem.role != "tool" %} + {{- '<|im_end|>\n' }} + {%- elif loop.last %} + {{- '<|im_end|>\n' }} + {%- endif %} + {%- else %} + {{- raise_exception('Unexpected message role.') }} + {%- endif %} +{%- endfor %} +{%- if add_generation_prompt %} + {{- '<|im_start|>assistant\n' }} + {%- if enable_thinking is defined and enable_thinking is false %} + {{- '\n\n\n\n' }} + {%- else %} + {{- '\n' }} + {%- endif %} +{%- endif %} \ No newline at end of file diff --git a/precise_coder/4b_rl_bcbfix_eagrpo/global_step_100/actor/huggingface/config.json b/precise_coder/4b_rl_bcbfix_eagrpo/global_step_100/actor/huggingface/config.json new file mode 100644 index 0000000000000000000000000000000000000000..0e8cd2d6f8b5c82e83b6479da2639aa4f7f24473 --- /dev/null +++ b/precise_coder/4b_rl_bcbfix_eagrpo/global_step_100/actor/huggingface/config.json @@ -0,0 +1,112 @@ +{ + "architectures": [ + "Qwen3_5ForConditionalGeneration" + ], + "bos_token_id": null, + "dtype": "bfloat16", + "eos_token_id": 248046, + "image_token_id": 248056, + "model_type": "qwen3_5", + "pad_token_id": 248044, + "text_config": { + "attention_bias": false, + "attention_dropout": 0.0, + "attn_output_gate": true, + "bos_token_id": null, + "dtype": "bfloat16", + "eos_token_id": 248044, + "full_attention_interval": 4, + "head_dim": 256, + "hidden_act": "silu", + "hidden_size": 2560, + "initializer_range": 0.02, + "intermediate_size": 9216, + "layer_types": [ + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention" + ], + "linear_conv_kernel_dim": 4, + "linear_key_head_dim": 128, + "linear_num_key_heads": 16, + "linear_num_value_heads": 32, + "linear_value_head_dim": 128, + "mamba_ssm_dtype": "float32", + "max_position_embeddings": 262144, + "mlp_only_layers": [], + "model_type": "qwen3_5_text", + "mtp_num_hidden_layers": 0, + "mtp_use_dedicated_embeddings": false, + "num_attention_heads": 16, + "num_hidden_layers": 32, + "num_key_value_heads": 4, + "pad_token_id": null, + "partial_rotary_factor": 0.25, + "rms_norm_eps": 1e-06, + "rope_parameters": { + "mrope_interleaved": true, + "mrope_section": [ + 11, + 11, + 10 + ], + "partial_rotary_factor": 0.25, + "rope_theta": 10000000, + "rope_type": "default" + }, + "tie_word_embeddings": true, + "use_cache": true, + "vocab_size": 248320 + }, + "tie_word_embeddings": true, + "transformers_version": "5.10.2", + "video_token_id": 248057, + "vision_config": { + "deepstack_visual_indexes": [], + "depth": 24, + "dtype": "bfloat16", + "hidden_act": "gelu_pytorch_tanh", + "hidden_size": 1024, + "in_channels": 3, + "initializer_range": 0.02, + "intermediate_size": 4096, + "model_type": "qwen3_5_vision", + "num_heads": 16, + "num_position_embeddings": 2304, + "out_hidden_size": 2560, + "patch_size": 16, + "spatial_merge_size": 2, + "temporal_patch_size": 2 + }, + "vision_end_token_id": 248054, + "vision_start_token_id": 248053 +} diff --git a/precise_coder/4b_rl_bcbfix_eagrpo/global_step_100/actor/huggingface/generation_config.json b/precise_coder/4b_rl_bcbfix_eagrpo/global_step_100/actor/huggingface/generation_config.json new file mode 100644 index 0000000000000000000000000000000000000000..a8f50cfe9f041954a2175966a9ef6f88480f4769 --- /dev/null +++ b/precise_coder/4b_rl_bcbfix_eagrpo/global_step_100/actor/huggingface/generation_config.json @@ -0,0 +1,9 @@ +{ + "_from_model_config": true, + "eos_token_id": 248046, + "output_attentions": false, + "output_hidden_states": false, + "pad_token_id": 248044, + "transformers_version": "5.10.2", + "use_cache": true +} diff --git a/precise_coder/4b_rl_bcbfix_eagrpo/global_step_100/actor/huggingface/processor_config.json b/precise_coder/4b_rl_bcbfix_eagrpo/global_step_100/actor/huggingface/processor_config.json new file mode 100644 index 0000000000000000000000000000000000000000..33818c7f9e991ad735fd240209f4fa73e6c28c50 --- /dev/null +++ b/precise_coder/4b_rl_bcbfix_eagrpo/global_step_100/actor/huggingface/processor_config.json @@ -0,0 +1,60 @@ +{ + "image_processor": { + "do_convert_rgb": true, + "do_normalize": true, + "do_rescale": true, + "do_resize": true, + "image_mean": [ + 0.5, + 0.5, + 0.5 + ], + "image_processor_type": "Qwen2VLImageProcessor", + "image_std": [ + 0.5, + 0.5, + 0.5 + ], + "merge_size": 2, + "patch_size": 16, + "resample": 3, + "rescale_factor": 0.00392156862745098, + "size": { + "longest_edge": 16777216, + "shortest_edge": 65536 + }, + "temporal_patch_size": 2 + }, + "processor_class": "Qwen3VLProcessor", + "video_processor": { + "do_convert_rgb": true, + "do_normalize": true, + "do_rescale": true, + "do_resize": true, + "do_sample_frames": true, + "fps": 2, + "image_mean": [ + 0.5, + 0.5, + 0.5 + ], + "image_std": [ + 0.5, + 0.5, + 0.5 + ], + "max_frames": 768, + "merge_size": 2, + "min_frames": 4, + "patch_size": 16, + "resample": 3, + "rescale_factor": 0.00392156862745098, + "return_metadata": false, + "size": { + "longest_edge": 25165824, + "shortest_edge": 4096 + }, + "temporal_patch_size": 2, + "video_processor_type": "Qwen3VLVideoProcessor" + } +} diff --git a/precise_coder/4b_rl_bcbfix_eagrpo/global_step_100/actor/huggingface/tokenizer_config.json b/precise_coder/4b_rl_bcbfix_eagrpo/global_step_100/actor/huggingface/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..1d134cd298be1e3be25db393d93a1cefe80e3214 --- /dev/null +++ b/precise_coder/4b_rl_bcbfix_eagrpo/global_step_100/actor/huggingface/tokenizer_config.json @@ -0,0 +1,33 @@ +{ + "add_prefix_space": false, + "audio_bos_token": "<|audio_start|>", + "audio_eos_token": "<|audio_end|>", + "audio_token": "<|audio_pad|>", + "backend": "tokenizers", + "bos_token": null, + "clean_up_tokenization_spaces": false, + "eos_token": "<|im_end|>", + "errors": "replace", + "image_token": "<|image_pad|>", + "is_local": true, + "local_files_only": false, + "model_max_length": 262144, + "model_specific_special_tokens": { + "audio_bos_token": "<|audio_start|>", + "audio_eos_token": "<|audio_end|>", + "audio_token": "<|audio_pad|>", + "image_token": "<|image_pad|>", + "video_token": "<|video_pad|>", + "vision_bos_token": "<|vision_start|>", + "vision_eos_token": "<|vision_end|>" + }, + "pad_token": "<|endoftext|>", + "pretokenize_regex": "(?i:'s|'t|'re|'ve|'m|'ll|'d)|[^\\r\\n\\p{L}\\p{N}]?[\\p{L}\\p{M}]+|\\p{N}| ?[^\\s\\p{L}\\p{M}\\p{N}]+[\\r\\n]*|\\s*[\\r\\n]+|\\s+(?!\\S)|\\s+", + "processor_class": "Qwen3VLProcessor", + "split_special_tokens": false, + "tokenizer_class": "Qwen2Tokenizer", + "unk_token": null, + "video_token": "<|video_pad|>", + "vision_bos_token": "<|vision_start|>", + "vision_eos_token": "<|vision_end|>" +} diff --git a/precise_coder/4b_rl_bcbfix_eagrpo/latest_checkpointed_iteration.txt b/precise_coder/4b_rl_bcbfix_eagrpo/latest_checkpointed_iteration.txt new file mode 100644 index 0000000000000000000000000000000000000000..41a4a819ada66b2e8f7fea82f094eb1314f2e9ca --- /dev/null +++ b/precise_coder/4b_rl_bcbfix_eagrpo/latest_checkpointed_iteration.txt @@ -0,0 +1 @@ +328 \ No newline at end of file diff --git a/precise_coder/4b_rl_bcbfix_k0.0/best_ckpt_state.json b/precise_coder/4b_rl_bcbfix_k0.0/best_ckpt_state.json new file mode 100644 index 0000000000000000000000000000000000000000..6fd52f5e4fe0924b661e0d1202fb70269d12ddfe --- /dev/null +++ b/precise_coder/4b_rl_bcbfix_k0.0/best_ckpt_state.json @@ -0,0 +1 @@ +{"best_val_score": 0.7822484076611114, "best_global_step": 225, "no_improve_rounds": 5} \ No newline at end of file diff --git a/precise_coder/4b_rl_bcbfix_k0.0/latest_checkpointed_iteration.txt b/precise_coder/4b_rl_bcbfix_k0.0/latest_checkpointed_iteration.txt new file mode 100644 index 0000000000000000000000000000000000000000..41a4a819ada66b2e8f7fea82f094eb1314f2e9ca --- /dev/null +++ b/precise_coder/4b_rl_bcbfix_k0.0/latest_checkpointed_iteration.txt @@ -0,0 +1 @@ +328 \ No newline at end of file diff --git a/precise_coder/4b_rl_bcbfix_k0.05_f1ur/best_ckpt_state.json b/precise_coder/4b_rl_bcbfix_k0.05_f1ur/best_ckpt_state.json new file mode 100644 index 0000000000000000000000000000000000000000..5fce86dda9d322bca39316980a38ea8c9e15e11b --- /dev/null +++ b/precise_coder/4b_rl_bcbfix_k0.05_f1ur/best_ckpt_state.json @@ -0,0 +1 @@ +{"best_val_score": 1.2187284271267704, "best_global_step": 325, "no_improve_rounds": 1} \ No newline at end of file diff --git a/precise_coder/4b_rl_bcbfix_k0.05_f1ur/global_step_325/actor/fsdp_config.json b/precise_coder/4b_rl_bcbfix_k0.05_f1ur/global_step_325/actor/fsdp_config.json new file mode 100644 index 0000000000000000000000000000000000000000..17ff55630675ec23d6a1d79ec7a480aa25faa5de --- /dev/null +++ b/precise_coder/4b_rl_bcbfix_k0.05_f1ur/global_step_325/actor/fsdp_config.json @@ -0,0 +1,4 @@ +{ + "FSDP_version": 2, + "world_size": 4 +} \ No newline at end of file diff --git a/precise_coder/4b_rl_bcbfix_k0.05_f1ur/global_step_325/actor/huggingface/chat_template.jinja b/precise_coder/4b_rl_bcbfix_k0.05_f1ur/global_step_325/actor/huggingface/chat_template.jinja new file mode 100644 index 0000000000000000000000000000000000000000..a585dec894e63da457d9440ec6aa7caa16d20860 --- /dev/null +++ b/precise_coder/4b_rl_bcbfix_k0.05_f1ur/global_step_325/actor/huggingface/chat_template.jinja @@ -0,0 +1,154 @@ +{%- set image_count = namespace(value=0) %} +{%- set video_count = namespace(value=0) %} +{%- macro render_content(content, do_vision_count, is_system_content=false) %} + {%- if content is string %} + {{- content }} + {%- elif content is iterable and content is not mapping %} + {%- for item in content %} + {%- if 'image' in item or 'image_url' in item or item.type == 'image' %} + {%- if is_system_content %} + {{- raise_exception('System message cannot contain images.') }} + {%- endif %} + {%- if do_vision_count %} + {%- set image_count.value = image_count.value + 1 %} + {%- endif %} + {%- if add_vision_id %} + {{- 'Picture ' ~ image_count.value ~ ': ' }} + {%- endif %} + {{- '<|vision_start|><|image_pad|><|vision_end|>' }} + {%- elif 'video' in item or item.type == 'video' %} + {%- if is_system_content %} + {{- raise_exception('System message cannot contain videos.') }} + {%- endif %} + {%- if do_vision_count %} + {%- set video_count.value = video_count.value + 1 %} + {%- endif %} + {%- if add_vision_id %} + {{- 'Video ' ~ video_count.value ~ ': ' }} + {%- endif %} + {{- '<|vision_start|><|video_pad|><|vision_end|>' }} + {%- elif 'text' in item %} + {{- item.text }} + {%- else %} + {{- raise_exception('Unexpected item type in content.') }} + {%- endif %} + {%- endfor %} + {%- elif content is none or content is undefined %} + {{- '' }} + {%- else %} + {{- raise_exception('Unexpected content type.') }} + {%- endif %} +{%- endmacro %} +{%- if not messages %} + {{- raise_exception('No messages provided.') }} +{%- endif %} +{%- if tools and tools is iterable and tools is not mapping %} + {{- '<|im_start|>system\n' }} + {{- "# Tools\n\nYou have access to the following functions:\n\n" }} + {%- for tool in tools %} + {{- "\n" }} + {{- tool | tojson }} + {%- endfor %} + {{- "\n" }} + {{- '\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n\n\n\nvalue_1\n\n\nThis is the value for the second parameter\nthat can span\nmultiple lines\n\n\n\n\n\nReminder:\n- Function calls MUST follow the specified format: an inner block must be nested within XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls\n' }} + {%- if messages[0].role == 'system' %} + {%- set content = render_content(messages[0].content, false, true)|trim %} + {%- if content %} + {{- '\n\n' + content }} + {%- endif %} + {%- endif %} + {{- '<|im_end|>\n' }} +{%- else %} + {%- if messages[0].role == 'system' %} + {%- set content = render_content(messages[0].content, false, true)|trim %} + {{- '<|im_start|>system\n' + 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" %} + {%- set content = render_content(message.content, false)|trim %} + {%- if not(content.startswith('') and content.endswith('')) %} + {%- set ns.multi_step_tool = false %} + {%- set ns.last_query_index = index %} + {%- endif %} + {%- endif %} +{%- endfor %} +{%- if ns.multi_step_tool %} + {{- raise_exception('No user query found in messages.') }} +{%- endif %} +{%- for message in messages %} + {%- set content = render_content(message.content, true)|trim %} + {%- if message.role == "system" %} + {%- if not loop.first %} + {{- raise_exception('System message must be at the beginning.') }} + {%- endif %} + {%- elif message.role == "user" %} + {{- '<|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 %} + {%- set reasoning_content = reasoning_content|trim %} + {%- if loop.index0 > ns.last_query_index %} + {{- '<|im_start|>' + message.role + '\n\n' + reasoning_content + '\n\n\n' + content }} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- if message.tool_calls and message.tool_calls is iterable and message.tool_calls is not mapping %} + {%- for tool_call in message.tool_calls %} + {%- if tool_call.function is defined %} + {%- set tool_call = tool_call.function %} + {%- endif %} + {%- if loop.first %} + {%- if content|trim %} + {{- '\n\n\n\n' }} + {%- else %} + {{- '\n\n' }} + {%- endif %} + {%- else %} + {{- '\n\n\n' }} + {%- endif %} + {%- if tool_call.arguments is defined %} + {%- for args_name, args_value in tool_call.arguments|items %} + {{- '\n' }} + {%- set args_value = args_value | tojson | safe if args_value is mapping or (args_value is sequence and args_value is not string) else args_value | string %} + {{- args_value }} + {{- '\n\n' }} + {%- endfor %} + {%- endif %} + {{- '\n' }} + {%- endfor %} + {%- endif %} + {{- '<|im_end|>\n' }} + {%- elif message.role == "tool" %} + {%- if loop.previtem and loop.previtem.role != "tool" %} + {{- '<|im_start|>user' }} + {%- endif %} + {{- '\n\n' }} + {{- content }} + {{- '\n' }} + {%- if not loop.last and loop.nextitem.role != "tool" %} + {{- '<|im_end|>\n' }} + {%- elif loop.last %} + {{- '<|im_end|>\n' }} + {%- endif %} + {%- else %} + {{- raise_exception('Unexpected message role.') }} + {%- endif %} +{%- endfor %} +{%- if add_generation_prompt %} + {{- '<|im_start|>assistant\n' }} + {%- if enable_thinking is defined and enable_thinking is false %} + {{- '\n\n\n\n' }} + {%- else %} + {{- '\n' }} + {%- endif %} +{%- endif %} \ No newline at end of file diff --git a/precise_coder/4b_rl_bcbfix_k0.05_f1ur/global_step_325/actor/huggingface/config.json b/precise_coder/4b_rl_bcbfix_k0.05_f1ur/global_step_325/actor/huggingface/config.json new file mode 100644 index 0000000000000000000000000000000000000000..0e8cd2d6f8b5c82e83b6479da2639aa4f7f24473 --- /dev/null +++ b/precise_coder/4b_rl_bcbfix_k0.05_f1ur/global_step_325/actor/huggingface/config.json @@ -0,0 +1,112 @@ +{ + "architectures": [ + "Qwen3_5ForConditionalGeneration" + ], + "bos_token_id": null, + "dtype": "bfloat16", + "eos_token_id": 248046, + "image_token_id": 248056, + "model_type": "qwen3_5", + "pad_token_id": 248044, + "text_config": { + "attention_bias": false, + "attention_dropout": 0.0, + "attn_output_gate": true, + "bos_token_id": null, + "dtype": "bfloat16", + "eos_token_id": 248044, + "full_attention_interval": 4, + "head_dim": 256, + "hidden_act": "silu", + "hidden_size": 2560, + "initializer_range": 0.02, + "intermediate_size": 9216, + "layer_types": [ + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention" + ], + "linear_conv_kernel_dim": 4, + "linear_key_head_dim": 128, + "linear_num_key_heads": 16, + "linear_num_value_heads": 32, + "linear_value_head_dim": 128, + "mamba_ssm_dtype": "float32", + "max_position_embeddings": 262144, + "mlp_only_layers": [], + "model_type": "qwen3_5_text", + "mtp_num_hidden_layers": 0, + "mtp_use_dedicated_embeddings": false, + "num_attention_heads": 16, + "num_hidden_layers": 32, + "num_key_value_heads": 4, + "pad_token_id": null, + "partial_rotary_factor": 0.25, + "rms_norm_eps": 1e-06, + "rope_parameters": { + "mrope_interleaved": true, + "mrope_section": [ + 11, + 11, + 10 + ], + "partial_rotary_factor": 0.25, + "rope_theta": 10000000, + "rope_type": "default" + }, + "tie_word_embeddings": true, + "use_cache": true, + "vocab_size": 248320 + }, + "tie_word_embeddings": true, + "transformers_version": "5.10.2", + "video_token_id": 248057, + "vision_config": { + "deepstack_visual_indexes": [], + "depth": 24, + "dtype": "bfloat16", + "hidden_act": "gelu_pytorch_tanh", + "hidden_size": 1024, + "in_channels": 3, + "initializer_range": 0.02, + "intermediate_size": 4096, + "model_type": "qwen3_5_vision", + "num_heads": 16, + "num_position_embeddings": 2304, + "out_hidden_size": 2560, + "patch_size": 16, + "spatial_merge_size": 2, + "temporal_patch_size": 2 + }, + "vision_end_token_id": 248054, + "vision_start_token_id": 248053 +} diff --git a/precise_coder/4b_rl_bcbfix_k0.05_f1ur/global_step_325/actor/huggingface/generation_config.json b/precise_coder/4b_rl_bcbfix_k0.05_f1ur/global_step_325/actor/huggingface/generation_config.json new file mode 100644 index 0000000000000000000000000000000000000000..a8f50cfe9f041954a2175966a9ef6f88480f4769 --- /dev/null +++ b/precise_coder/4b_rl_bcbfix_k0.05_f1ur/global_step_325/actor/huggingface/generation_config.json @@ -0,0 +1,9 @@ +{ + "_from_model_config": true, + "eos_token_id": 248046, + "output_attentions": false, + "output_hidden_states": false, + "pad_token_id": 248044, + "transformers_version": "5.10.2", + "use_cache": true +} diff --git a/precise_coder/4b_rl_bcbfix_k0.05_f1ur/global_step_325/actor/huggingface/processor_config.json b/precise_coder/4b_rl_bcbfix_k0.05_f1ur/global_step_325/actor/huggingface/processor_config.json new file mode 100644 index 0000000000000000000000000000000000000000..33818c7f9e991ad735fd240209f4fa73e6c28c50 --- /dev/null +++ b/precise_coder/4b_rl_bcbfix_k0.05_f1ur/global_step_325/actor/huggingface/processor_config.json @@ -0,0 +1,60 @@ +{ + "image_processor": { + "do_convert_rgb": true, + "do_normalize": true, + "do_rescale": true, + "do_resize": true, + "image_mean": [ + 0.5, + 0.5, + 0.5 + ], + "image_processor_type": "Qwen2VLImageProcessor", + "image_std": [ + 0.5, + 0.5, + 0.5 + ], + "merge_size": 2, + "patch_size": 16, + "resample": 3, + "rescale_factor": 0.00392156862745098, + "size": { + "longest_edge": 16777216, + "shortest_edge": 65536 + }, + "temporal_patch_size": 2 + }, + "processor_class": "Qwen3VLProcessor", + "video_processor": { + "do_convert_rgb": true, + "do_normalize": true, + "do_rescale": true, + "do_resize": true, + "do_sample_frames": true, + "fps": 2, + "image_mean": [ + 0.5, + 0.5, + 0.5 + ], + "image_std": [ + 0.5, + 0.5, + 0.5 + ], + "max_frames": 768, + "merge_size": 2, + "min_frames": 4, + "patch_size": 16, + "resample": 3, + "rescale_factor": 0.00392156862745098, + "return_metadata": false, + "size": { + "longest_edge": 25165824, + "shortest_edge": 4096 + }, + "temporal_patch_size": 2, + "video_processor_type": "Qwen3VLVideoProcessor" + } +} diff --git a/precise_coder/4b_rl_bcbfix_k0.05_f1ur/global_step_325/actor/huggingface/tokenizer_config.json b/precise_coder/4b_rl_bcbfix_k0.05_f1ur/global_step_325/actor/huggingface/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..1d134cd298be1e3be25db393d93a1cefe80e3214 --- /dev/null +++ b/precise_coder/4b_rl_bcbfix_k0.05_f1ur/global_step_325/actor/huggingface/tokenizer_config.json @@ -0,0 +1,33 @@ +{ + "add_prefix_space": false, + "audio_bos_token": "<|audio_start|>", + "audio_eos_token": "<|audio_end|>", + "audio_token": "<|audio_pad|>", + "backend": "tokenizers", + "bos_token": null, + "clean_up_tokenization_spaces": false, + "eos_token": "<|im_end|>", + "errors": "replace", + "image_token": "<|image_pad|>", + "is_local": true, + "local_files_only": false, + "model_max_length": 262144, + "model_specific_special_tokens": { + "audio_bos_token": "<|audio_start|>", + "audio_eos_token": "<|audio_end|>", + "audio_token": "<|audio_pad|>", + "image_token": "<|image_pad|>", + "video_token": "<|video_pad|>", + "vision_bos_token": "<|vision_start|>", + "vision_eos_token": "<|vision_end|>" + }, + "pad_token": "<|endoftext|>", + "pretokenize_regex": "(?i:'s|'t|'re|'ve|'m|'ll|'d)|[^\\r\\n\\p{L}\\p{N}]?[\\p{L}\\p{M}]+|\\p{N}| ?[^\\s\\p{L}\\p{M}\\p{N}]+[\\r\\n]*|\\s*[\\r\\n]+|\\s+(?!\\S)|\\s+", + "processor_class": "Qwen3VLProcessor", + "split_special_tokens": false, + "tokenizer_class": "Qwen2Tokenizer", + "unk_token": null, + "video_token": "<|video_pad|>", + "vision_bos_token": "<|vision_start|>", + "vision_eos_token": "<|vision_end|>" +} diff --git a/precise_coder/4b_rl_bcbfix_k0.05_f1ur/latest_checkpointed_iteration.txt b/precise_coder/4b_rl_bcbfix_k0.05_f1ur/latest_checkpointed_iteration.txt new file mode 100644 index 0000000000000000000000000000000000000000..41a4a819ada66b2e8f7fea82f094eb1314f2e9ca --- /dev/null +++ b/precise_coder/4b_rl_bcbfix_k0.05_f1ur/latest_checkpointed_iteration.txt @@ -0,0 +1 @@ +328 \ No newline at end of file diff --git a/precise_coder/4b_rl_bcbfix_ugr/best_ckpt_state.json b/precise_coder/4b_rl_bcbfix_ugr/best_ckpt_state.json new file mode 100644 index 0000000000000000000000000000000000000000..21e36235c2e44ff0f03d89d4529e8533afa74831 --- /dev/null +++ b/precise_coder/4b_rl_bcbfix_ugr/best_ckpt_state.json @@ -0,0 +1 @@ +{"best_val_score": 1.0261778943542508, "best_global_step": 328, "no_improve_rounds": 0} \ No newline at end of file diff --git a/precise_coder/4b_rl_bcbfix_ugr/global_step_328/actor/fsdp_config.json b/precise_coder/4b_rl_bcbfix_ugr/global_step_328/actor/fsdp_config.json new file mode 100644 index 0000000000000000000000000000000000000000..17ff55630675ec23d6a1d79ec7a480aa25faa5de --- /dev/null +++ b/precise_coder/4b_rl_bcbfix_ugr/global_step_328/actor/fsdp_config.json @@ -0,0 +1,4 @@ +{ + "FSDP_version": 2, + "world_size": 4 +} \ No newline at end of file diff --git a/precise_coder/4b_rl_bcbfix_ugr/global_step_328/actor/huggingface/chat_template.jinja b/precise_coder/4b_rl_bcbfix_ugr/global_step_328/actor/huggingface/chat_template.jinja new file mode 100644 index 0000000000000000000000000000000000000000..a585dec894e63da457d9440ec6aa7caa16d20860 --- /dev/null +++ b/precise_coder/4b_rl_bcbfix_ugr/global_step_328/actor/huggingface/chat_template.jinja @@ -0,0 +1,154 @@ +{%- set image_count = namespace(value=0) %} +{%- set video_count = namespace(value=0) %} +{%- macro render_content(content, do_vision_count, is_system_content=false) %} + {%- if content is string %} + {{- content }} + {%- elif content is iterable and content is not mapping %} + {%- for item in content %} + {%- if 'image' in item or 'image_url' in item or item.type == 'image' %} + {%- if is_system_content %} + {{- raise_exception('System message cannot contain images.') }} + {%- endif %} + {%- if do_vision_count %} + {%- set image_count.value = image_count.value + 1 %} + {%- endif %} + {%- if add_vision_id %} + {{- 'Picture ' ~ image_count.value ~ ': ' }} + {%- endif %} + {{- '<|vision_start|><|image_pad|><|vision_end|>' }} + {%- elif 'video' in item or item.type == 'video' %} + {%- if is_system_content %} + {{- raise_exception('System message cannot contain videos.') }} + {%- endif %} + {%- if do_vision_count %} + {%- set video_count.value = video_count.value + 1 %} + {%- endif %} + {%- if add_vision_id %} + {{- 'Video ' ~ video_count.value ~ ': ' }} + {%- endif %} + {{- '<|vision_start|><|video_pad|><|vision_end|>' }} + {%- elif 'text' in item %} + {{- item.text }} + {%- else %} + {{- raise_exception('Unexpected item type in content.') }} + {%- endif %} + {%- endfor %} + {%- elif content is none or content is undefined %} + {{- '' }} + {%- else %} + {{- raise_exception('Unexpected content type.') }} + {%- endif %} +{%- endmacro %} +{%- if not messages %} + {{- raise_exception('No messages provided.') }} +{%- endif %} +{%- if tools and tools is iterable and tools is not mapping %} + {{- '<|im_start|>system\n' }} + {{- "# Tools\n\nYou have access to the following functions:\n\n" }} + {%- for tool in tools %} + {{- "\n" }} + {{- tool | tojson }} + {%- endfor %} + {{- "\n" }} + {{- '\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n\n\n\nvalue_1\n\n\nThis is the value for the second parameter\nthat can span\nmultiple lines\n\n\n\n\n\nReminder:\n- Function calls MUST follow the specified format: an inner block must be nested within XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls\n' }} + {%- if messages[0].role == 'system' %} + {%- set content = render_content(messages[0].content, false, true)|trim %} + {%- if content %} + {{- '\n\n' + content }} + {%- endif %} + {%- endif %} + {{- '<|im_end|>\n' }} +{%- else %} + {%- if messages[0].role == 'system' %} + {%- set content = render_content(messages[0].content, false, true)|trim %} + {{- '<|im_start|>system\n' + 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" %} + {%- set content = render_content(message.content, false)|trim %} + {%- if not(content.startswith('') and content.endswith('')) %} + {%- set ns.multi_step_tool = false %} + {%- set ns.last_query_index = index %} + {%- endif %} + {%- endif %} +{%- endfor %} +{%- if ns.multi_step_tool %} + {{- raise_exception('No user query found in messages.') }} +{%- endif %} +{%- for message in messages %} + {%- set content = render_content(message.content, true)|trim %} + {%- if message.role == "system" %} + {%- if not loop.first %} + {{- raise_exception('System message must be at the beginning.') }} + {%- endif %} + {%- elif message.role == "user" %} + {{- '<|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 %} + {%- set reasoning_content = reasoning_content|trim %} + {%- if loop.index0 > ns.last_query_index %} + {{- '<|im_start|>' + message.role + '\n\n' + reasoning_content + '\n\n\n' + content }} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- if message.tool_calls and message.tool_calls is iterable and message.tool_calls is not mapping %} + {%- for tool_call in message.tool_calls %} + {%- if tool_call.function is defined %} + {%- set tool_call = tool_call.function %} + {%- endif %} + {%- if loop.first %} + {%- if content|trim %} + {{- '\n\n\n\n' }} + {%- else %} + {{- '\n\n' }} + {%- endif %} + {%- else %} + {{- '\n\n\n' }} + {%- endif %} + {%- if tool_call.arguments is defined %} + {%- for args_name, args_value in tool_call.arguments|items %} + {{- '\n' }} + {%- set args_value = args_value | tojson | safe if args_value is mapping or (args_value is sequence and args_value is not string) else args_value | string %} + {{- args_value }} + {{- '\n\n' }} + {%- endfor %} + {%- endif %} + {{- '\n' }} + {%- endfor %} + {%- endif %} + {{- '<|im_end|>\n' }} + {%- elif message.role == "tool" %} + {%- if loop.previtem and loop.previtem.role != "tool" %} + {{- '<|im_start|>user' }} + {%- endif %} + {{- '\n\n' }} + {{- content }} + {{- '\n' }} + {%- if not loop.last and loop.nextitem.role != "tool" %} + {{- '<|im_end|>\n' }} + {%- elif loop.last %} + {{- '<|im_end|>\n' }} + {%- endif %} + {%- else %} + {{- raise_exception('Unexpected message role.') }} + {%- endif %} +{%- endfor %} +{%- if add_generation_prompt %} + {{- '<|im_start|>assistant\n' }} + {%- if enable_thinking is defined and enable_thinking is false %} + {{- '\n\n\n\n' }} + {%- else %} + {{- '\n' }} + {%- endif %} +{%- endif %} \ No newline at end of file diff --git a/precise_coder/4b_rl_bcbfix_ugr/global_step_328/actor/huggingface/config.json b/precise_coder/4b_rl_bcbfix_ugr/global_step_328/actor/huggingface/config.json new file mode 100644 index 0000000000000000000000000000000000000000..0e8cd2d6f8b5c82e83b6479da2639aa4f7f24473 --- /dev/null +++ b/precise_coder/4b_rl_bcbfix_ugr/global_step_328/actor/huggingface/config.json @@ -0,0 +1,112 @@ +{ + "architectures": [ + "Qwen3_5ForConditionalGeneration" + ], + "bos_token_id": null, + "dtype": "bfloat16", + "eos_token_id": 248046, + "image_token_id": 248056, + "model_type": "qwen3_5", + "pad_token_id": 248044, + "text_config": { + "attention_bias": false, + "attention_dropout": 0.0, + "attn_output_gate": true, + "bos_token_id": null, + "dtype": "bfloat16", + "eos_token_id": 248044, + "full_attention_interval": 4, + "head_dim": 256, + "hidden_act": "silu", + "hidden_size": 2560, + "initializer_range": 0.02, + "intermediate_size": 9216, + "layer_types": [ + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention" + ], + "linear_conv_kernel_dim": 4, + "linear_key_head_dim": 128, + "linear_num_key_heads": 16, + "linear_num_value_heads": 32, + "linear_value_head_dim": 128, + "mamba_ssm_dtype": "float32", + "max_position_embeddings": 262144, + "mlp_only_layers": [], + "model_type": "qwen3_5_text", + "mtp_num_hidden_layers": 0, + "mtp_use_dedicated_embeddings": false, + "num_attention_heads": 16, + "num_hidden_layers": 32, + "num_key_value_heads": 4, + "pad_token_id": null, + "partial_rotary_factor": 0.25, + "rms_norm_eps": 1e-06, + "rope_parameters": { + "mrope_interleaved": true, + "mrope_section": [ + 11, + 11, + 10 + ], + "partial_rotary_factor": 0.25, + "rope_theta": 10000000, + "rope_type": "default" + }, + "tie_word_embeddings": true, + "use_cache": true, + "vocab_size": 248320 + }, + "tie_word_embeddings": true, + "transformers_version": "5.10.2", + "video_token_id": 248057, + "vision_config": { + "deepstack_visual_indexes": [], + "depth": 24, + "dtype": "bfloat16", + "hidden_act": "gelu_pytorch_tanh", + "hidden_size": 1024, + "in_channels": 3, + "initializer_range": 0.02, + "intermediate_size": 4096, + "model_type": "qwen3_5_vision", + "num_heads": 16, + "num_position_embeddings": 2304, + "out_hidden_size": 2560, + "patch_size": 16, + "spatial_merge_size": 2, + "temporal_patch_size": 2 + }, + "vision_end_token_id": 248054, + "vision_start_token_id": 248053 +} diff --git a/precise_coder/4b_rl_bcbfix_ugr/global_step_328/actor/huggingface/generation_config.json b/precise_coder/4b_rl_bcbfix_ugr/global_step_328/actor/huggingface/generation_config.json new file mode 100644 index 0000000000000000000000000000000000000000..a8f50cfe9f041954a2175966a9ef6f88480f4769 --- /dev/null +++ b/precise_coder/4b_rl_bcbfix_ugr/global_step_328/actor/huggingface/generation_config.json @@ -0,0 +1,9 @@ +{ + "_from_model_config": true, + "eos_token_id": 248046, + "output_attentions": false, + "output_hidden_states": false, + "pad_token_id": 248044, + "transformers_version": "5.10.2", + "use_cache": true +} diff --git a/precise_coder/4b_rl_bcbfix_ugr/global_step_328/actor/huggingface/processor_config.json b/precise_coder/4b_rl_bcbfix_ugr/global_step_328/actor/huggingface/processor_config.json new file mode 100644 index 0000000000000000000000000000000000000000..33818c7f9e991ad735fd240209f4fa73e6c28c50 --- /dev/null +++ b/precise_coder/4b_rl_bcbfix_ugr/global_step_328/actor/huggingface/processor_config.json @@ -0,0 +1,60 @@ +{ + "image_processor": { + "do_convert_rgb": true, + "do_normalize": true, + "do_rescale": true, + "do_resize": true, + "image_mean": [ + 0.5, + 0.5, + 0.5 + ], + "image_processor_type": "Qwen2VLImageProcessor", + "image_std": [ + 0.5, + 0.5, + 0.5 + ], + "merge_size": 2, + "patch_size": 16, + "resample": 3, + "rescale_factor": 0.00392156862745098, + "size": { + "longest_edge": 16777216, + "shortest_edge": 65536 + }, + "temporal_patch_size": 2 + }, + "processor_class": "Qwen3VLProcessor", + "video_processor": { + "do_convert_rgb": true, + "do_normalize": true, + "do_rescale": true, + "do_resize": true, + "do_sample_frames": true, + "fps": 2, + "image_mean": [ + 0.5, + 0.5, + 0.5 + ], + "image_std": [ + 0.5, + 0.5, + 0.5 + ], + "max_frames": 768, + "merge_size": 2, + "min_frames": 4, + "patch_size": 16, + "resample": 3, + "rescale_factor": 0.00392156862745098, + "return_metadata": false, + "size": { + "longest_edge": 25165824, + "shortest_edge": 4096 + }, + "temporal_patch_size": 2, + "video_processor_type": "Qwen3VLVideoProcessor" + } +} diff --git a/precise_coder/4b_rl_bcbfix_ugr/global_step_328/actor/huggingface/tokenizer_config.json b/precise_coder/4b_rl_bcbfix_ugr/global_step_328/actor/huggingface/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..1d134cd298be1e3be25db393d93a1cefe80e3214 --- /dev/null +++ b/precise_coder/4b_rl_bcbfix_ugr/global_step_328/actor/huggingface/tokenizer_config.json @@ -0,0 +1,33 @@ +{ + "add_prefix_space": false, + "audio_bos_token": "<|audio_start|>", + "audio_eos_token": "<|audio_end|>", + "audio_token": "<|audio_pad|>", + "backend": "tokenizers", + "bos_token": null, + "clean_up_tokenization_spaces": false, + "eos_token": "<|im_end|>", + "errors": "replace", + "image_token": "<|image_pad|>", + "is_local": true, + "local_files_only": false, + "model_max_length": 262144, + "model_specific_special_tokens": { + "audio_bos_token": "<|audio_start|>", + "audio_eos_token": "<|audio_end|>", + "audio_token": "<|audio_pad|>", + "image_token": "<|image_pad|>", + "video_token": "<|video_pad|>", + "vision_bos_token": "<|vision_start|>", + "vision_eos_token": "<|vision_end|>" + }, + "pad_token": "<|endoftext|>", + "pretokenize_regex": "(?i:'s|'t|'re|'ve|'m|'ll|'d)|[^\\r\\n\\p{L}\\p{N}]?[\\p{L}\\p{M}]+|\\p{N}| ?[^\\s\\p{L}\\p{M}\\p{N}]+[\\r\\n]*|\\s*[\\r\\n]+|\\s+(?!\\S)|\\s+", + "processor_class": "Qwen3VLProcessor", + "split_special_tokens": false, + "tokenizer_class": "Qwen2Tokenizer", + "unk_token": null, + "video_token": "<|video_pad|>", + "vision_bos_token": "<|vision_start|>", + "vision_eos_token": "<|vision_end|>" +} diff --git a/precise_coder/4b_rl_bcbfix_ugr/latest_checkpointed_iteration.txt b/precise_coder/4b_rl_bcbfix_ugr/latest_checkpointed_iteration.txt new file mode 100644 index 0000000000000000000000000000000000000000..41a4a819ada66b2e8f7fea82f094eb1314f2e9ca --- /dev/null +++ b/precise_coder/4b_rl_bcbfix_ugr/latest_checkpointed_iteration.txt @@ -0,0 +1 @@ +328 \ No newline at end of file diff --git a/precise_coder/4b_rl_k0.0/best_ckpt_state.json b/precise_coder/4b_rl_k0.0/best_ckpt_state.json new file mode 100644 index 0000000000000000000000000000000000000000..083a9150df7569039287c5814eaebf6608934de0 --- /dev/null +++ b/precise_coder/4b_rl_k0.0/best_ckpt_state.json @@ -0,0 +1 @@ +{"best_val_score": 0.7177518544843662, "best_global_step": 325, "no_improve_rounds": 1} \ No newline at end of file diff --git a/precise_coder/4b_rl_k0.0/latest_checkpointed_iteration.txt b/precise_coder/4b_rl_k0.0/latest_checkpointed_iteration.txt new file mode 100644 index 0000000000000000000000000000000000000000..41a4a819ada66b2e8f7fea82f094eb1314f2e9ca --- /dev/null +++ b/precise_coder/4b_rl_k0.0/latest_checkpointed_iteration.txt @@ -0,0 +1 @@ +328 \ No newline at end of file diff --git a/precise_coder/4b_rl_k0.17/latest_checkpointed_iteration.txt b/precise_coder/4b_rl_k0.17/latest_checkpointed_iteration.txt new file mode 100644 index 0000000000000000000000000000000000000000..41a4a819ada66b2e8f7fea82f094eb1314f2e9ca --- /dev/null +++ b/precise_coder/4b_rl_k0.17/latest_checkpointed_iteration.txt @@ -0,0 +1 @@ +328 \ No newline at end of file diff --git a/precise_coder/4b_rl_k0.17_run2/best_ckpt_state.json b/precise_coder/4b_rl_k0.17_run2/best_ckpt_state.json new file mode 100644 index 0000000000000000000000000000000000000000..4dea4c34c2d37d080f2ab39710ff4eba03039a86 --- /dev/null +++ b/precise_coder/4b_rl_k0.17_run2/best_ckpt_state.json @@ -0,0 +1 @@ +{"best_val_score": 1.0844896856454753, "best_global_step": 250, "no_improve_rounds": 4} \ No newline at end of file diff --git a/precise_coder/4b_rl_k0.17_run2/latest_checkpointed_iteration.txt b/precise_coder/4b_rl_k0.17_run2/latest_checkpointed_iteration.txt new file mode 100644 index 0000000000000000000000000000000000000000..41a4a819ada66b2e8f7fea82f094eb1314f2e9ca --- /dev/null +++ b/precise_coder/4b_rl_k0.17_run2/latest_checkpointed_iteration.txt @@ -0,0 +1 @@ +328 \ No newline at end of file diff --git a/precise_coder/4b_rl_k0.17_run3/best_ckpt_state.json b/precise_coder/4b_rl_k0.17_run3/best_ckpt_state.json new file mode 100644 index 0000000000000000000000000000000000000000..3ad385055194660a209063947c78e6778d3cd24f --- /dev/null +++ b/precise_coder/4b_rl_k0.17_run3/best_ckpt_state.json @@ -0,0 +1 @@ +{"best_val_score": 1.1432207269245411, "best_global_step": 328, "no_improve_rounds": 0} \ No newline at end of file diff --git a/precise_coder/4b_rl_k0.17_run3/latest_checkpointed_iteration.txt b/precise_coder/4b_rl_k0.17_run3/latest_checkpointed_iteration.txt new file mode 100644 index 0000000000000000000000000000000000000000..41a4a819ada66b2e8f7fea82f094eb1314f2e9ca --- /dev/null +++ b/precise_coder/4b_rl_k0.17_run3/latest_checkpointed_iteration.txt @@ -0,0 +1 @@ +328 \ No newline at end of file diff --git a/precise_coder/4b_rl_k0.33/best_ckpt_state.json b/precise_coder/4b_rl_k0.33/best_ckpt_state.json new file mode 100644 index 0000000000000000000000000000000000000000..ae0304b7bab76be2b2189853dbfb30af897ccd5e --- /dev/null +++ b/precise_coder/4b_rl_k0.33/best_ckpt_state.json @@ -0,0 +1 @@ +{"best_val_score": 0.5789085270364593, "best_global_step": 328, "no_improve_rounds": 0} \ No newline at end of file diff --git a/precise_coder/4b_rl_k0.33/global_step_328/actor/fsdp_config.json b/precise_coder/4b_rl_k0.33/global_step_328/actor/fsdp_config.json new file mode 100644 index 0000000000000000000000000000000000000000..17ff55630675ec23d6a1d79ec7a480aa25faa5de --- /dev/null +++ b/precise_coder/4b_rl_k0.33/global_step_328/actor/fsdp_config.json @@ -0,0 +1,4 @@ +{ + "FSDP_version": 2, + "world_size": 4 +} \ No newline at end of file diff --git a/precise_coder/4b_rl_k0.33/global_step_328/actor/huggingface/config.json b/precise_coder/4b_rl_k0.33/global_step_328/actor/huggingface/config.json new file mode 100644 index 0000000000000000000000000000000000000000..0e8cd2d6f8b5c82e83b6479da2639aa4f7f24473 --- /dev/null +++ b/precise_coder/4b_rl_k0.33/global_step_328/actor/huggingface/config.json @@ -0,0 +1,112 @@ +{ + "architectures": [ + "Qwen3_5ForConditionalGeneration" + ], + "bos_token_id": null, + "dtype": "bfloat16", + "eos_token_id": 248046, + "image_token_id": 248056, + "model_type": "qwen3_5", + "pad_token_id": 248044, + "text_config": { + "attention_bias": false, + "attention_dropout": 0.0, + "attn_output_gate": true, + "bos_token_id": null, + "dtype": "bfloat16", + "eos_token_id": 248044, + "full_attention_interval": 4, + "head_dim": 256, + "hidden_act": "silu", + "hidden_size": 2560, + "initializer_range": 0.02, + "intermediate_size": 9216, + "layer_types": [ + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention" + ], + "linear_conv_kernel_dim": 4, + "linear_key_head_dim": 128, + "linear_num_key_heads": 16, + "linear_num_value_heads": 32, + "linear_value_head_dim": 128, + "mamba_ssm_dtype": "float32", + "max_position_embeddings": 262144, + "mlp_only_layers": [], + "model_type": "qwen3_5_text", + "mtp_num_hidden_layers": 0, + "mtp_use_dedicated_embeddings": false, + "num_attention_heads": 16, + "num_hidden_layers": 32, + "num_key_value_heads": 4, + "pad_token_id": null, + "partial_rotary_factor": 0.25, + "rms_norm_eps": 1e-06, + "rope_parameters": { + "mrope_interleaved": true, + "mrope_section": [ + 11, + 11, + 10 + ], + "partial_rotary_factor": 0.25, + "rope_theta": 10000000, + "rope_type": "default" + }, + "tie_word_embeddings": true, + "use_cache": true, + "vocab_size": 248320 + }, + "tie_word_embeddings": true, + "transformers_version": "5.10.2", + "video_token_id": 248057, + "vision_config": { + "deepstack_visual_indexes": [], + "depth": 24, + "dtype": "bfloat16", + "hidden_act": "gelu_pytorch_tanh", + "hidden_size": 1024, + "in_channels": 3, + "initializer_range": 0.02, + "intermediate_size": 4096, + "model_type": "qwen3_5_vision", + "num_heads": 16, + "num_position_embeddings": 2304, + "out_hidden_size": 2560, + "patch_size": 16, + "spatial_merge_size": 2, + "temporal_patch_size": 2 + }, + "vision_end_token_id": 248054, + "vision_start_token_id": 248053 +} diff --git a/precise_coder/4b_rl_k0.33/global_step_328/actor/huggingface/generation_config.json b/precise_coder/4b_rl_k0.33/global_step_328/actor/huggingface/generation_config.json new file mode 100644 index 0000000000000000000000000000000000000000..a8f50cfe9f041954a2175966a9ef6f88480f4769 --- /dev/null +++ b/precise_coder/4b_rl_k0.33/global_step_328/actor/huggingface/generation_config.json @@ -0,0 +1,9 @@ +{ + "_from_model_config": true, + "eos_token_id": 248046, + "output_attentions": false, + "output_hidden_states": false, + "pad_token_id": 248044, + "transformers_version": "5.10.2", + "use_cache": true +} diff --git a/precise_coder/4b_rl_k0.33/global_step_328/actor/huggingface/processor_config.json b/precise_coder/4b_rl_k0.33/global_step_328/actor/huggingface/processor_config.json new file mode 100644 index 0000000000000000000000000000000000000000..33818c7f9e991ad735fd240209f4fa73e6c28c50 --- /dev/null +++ b/precise_coder/4b_rl_k0.33/global_step_328/actor/huggingface/processor_config.json @@ -0,0 +1,60 @@ +{ + "image_processor": { + "do_convert_rgb": true, + "do_normalize": true, + "do_rescale": true, + "do_resize": true, + "image_mean": [ + 0.5, + 0.5, + 0.5 + ], + "image_processor_type": "Qwen2VLImageProcessor", + "image_std": [ + 0.5, + 0.5, + 0.5 + ], + "merge_size": 2, + "patch_size": 16, + "resample": 3, + "rescale_factor": 0.00392156862745098, + "size": { + "longest_edge": 16777216, + "shortest_edge": 65536 + }, + "temporal_patch_size": 2 + }, + "processor_class": "Qwen3VLProcessor", + "video_processor": { + "do_convert_rgb": true, + "do_normalize": true, + "do_rescale": true, + "do_resize": true, + "do_sample_frames": true, + "fps": 2, + "image_mean": [ + 0.5, + 0.5, + 0.5 + ], + "image_std": [ + 0.5, + 0.5, + 0.5 + ], + "max_frames": 768, + "merge_size": 2, + "min_frames": 4, + "patch_size": 16, + "resample": 3, + "rescale_factor": 0.00392156862745098, + "return_metadata": false, + "size": { + "longest_edge": 25165824, + "shortest_edge": 4096 + }, + "temporal_patch_size": 2, + "video_processor_type": "Qwen3VLVideoProcessor" + } +} diff --git a/precise_coder/4b_rl_k0.33/global_step_328/actor/huggingface/tokenizer_config.json b/precise_coder/4b_rl_k0.33/global_step_328/actor/huggingface/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..1d134cd298be1e3be25db393d93a1cefe80e3214 --- /dev/null +++ b/precise_coder/4b_rl_k0.33/global_step_328/actor/huggingface/tokenizer_config.json @@ -0,0 +1,33 @@ +{ + "add_prefix_space": false, + "audio_bos_token": "<|audio_start|>", + "audio_eos_token": "<|audio_end|>", + "audio_token": "<|audio_pad|>", + "backend": "tokenizers", + "bos_token": null, + "clean_up_tokenization_spaces": false, + "eos_token": "<|im_end|>", + "errors": "replace", + "image_token": "<|image_pad|>", + "is_local": true, + "local_files_only": false, + "model_max_length": 262144, + "model_specific_special_tokens": { + "audio_bos_token": "<|audio_start|>", + "audio_eos_token": "<|audio_end|>", + "audio_token": "<|audio_pad|>", + "image_token": "<|image_pad|>", + "video_token": "<|video_pad|>", + "vision_bos_token": "<|vision_start|>", + "vision_eos_token": "<|vision_end|>" + }, + "pad_token": "<|endoftext|>", + "pretokenize_regex": "(?i:'s|'t|'re|'ve|'m|'ll|'d)|[^\\r\\n\\p{L}\\p{N}]?[\\p{L}\\p{M}]+|\\p{N}| ?[^\\s\\p{L}\\p{M}\\p{N}]+[\\r\\n]*|\\s*[\\r\\n]+|\\s+(?!\\S)|\\s+", + "processor_class": "Qwen3VLProcessor", + "split_special_tokens": false, + "tokenizer_class": "Qwen2Tokenizer", + "unk_token": null, + "video_token": "<|video_pad|>", + "vision_bos_token": "<|vision_start|>", + "vision_eos_token": "<|vision_end|>" +} diff --git a/precise_coder/4b_rl_k0.33/latest_checkpointed_iteration.txt b/precise_coder/4b_rl_k0.33/latest_checkpointed_iteration.txt new file mode 100644 index 0000000000000000000000000000000000000000..41a4a819ada66b2e8f7fea82f094eb1314f2e9ca --- /dev/null +++ b/precise_coder/4b_rl_k0.33/latest_checkpointed_iteration.txt @@ -0,0 +1 @@ +328 \ No newline at end of file diff --git a/precise_coder/4b_rl_k0.33_f1ur/global_step_328/actor/fsdp_config.json b/precise_coder/4b_rl_k0.33_f1ur/global_step_328/actor/fsdp_config.json new file mode 100644 index 0000000000000000000000000000000000000000..17ff55630675ec23d6a1d79ec7a480aa25faa5de --- /dev/null +++ b/precise_coder/4b_rl_k0.33_f1ur/global_step_328/actor/fsdp_config.json @@ -0,0 +1,4 @@ +{ + "FSDP_version": 2, + "world_size": 4 +} \ No newline at end of file diff --git a/precise_coder/4b_rl_k0.33_f1ur/global_step_328/actor/huggingface/config.json b/precise_coder/4b_rl_k0.33_f1ur/global_step_328/actor/huggingface/config.json new file mode 100644 index 0000000000000000000000000000000000000000..0e8cd2d6f8b5c82e83b6479da2639aa4f7f24473 --- /dev/null +++ b/precise_coder/4b_rl_k0.33_f1ur/global_step_328/actor/huggingface/config.json @@ -0,0 +1,112 @@ +{ + "architectures": [ + "Qwen3_5ForConditionalGeneration" + ], + "bos_token_id": null, + "dtype": "bfloat16", + "eos_token_id": 248046, + "image_token_id": 248056, + "model_type": "qwen3_5", + "pad_token_id": 248044, + "text_config": { + "attention_bias": false, + "attention_dropout": 0.0, + "attn_output_gate": true, + "bos_token_id": null, + "dtype": "bfloat16", + "eos_token_id": 248044, + "full_attention_interval": 4, + "head_dim": 256, + "hidden_act": "silu", + "hidden_size": 2560, + "initializer_range": 0.02, + "intermediate_size": 9216, + "layer_types": [ + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention" + ], + "linear_conv_kernel_dim": 4, + "linear_key_head_dim": 128, + "linear_num_key_heads": 16, + "linear_num_value_heads": 32, + "linear_value_head_dim": 128, + "mamba_ssm_dtype": "float32", + "max_position_embeddings": 262144, + "mlp_only_layers": [], + "model_type": "qwen3_5_text", + "mtp_num_hidden_layers": 0, + "mtp_use_dedicated_embeddings": false, + "num_attention_heads": 16, + "num_hidden_layers": 32, + "num_key_value_heads": 4, + "pad_token_id": null, + "partial_rotary_factor": 0.25, + "rms_norm_eps": 1e-06, + "rope_parameters": { + "mrope_interleaved": true, + "mrope_section": [ + 11, + 11, + 10 + ], + "partial_rotary_factor": 0.25, + "rope_theta": 10000000, + "rope_type": "default" + }, + "tie_word_embeddings": true, + "use_cache": true, + "vocab_size": 248320 + }, + "tie_word_embeddings": true, + "transformers_version": "5.10.2", + "video_token_id": 248057, + "vision_config": { + "deepstack_visual_indexes": [], + "depth": 24, + "dtype": "bfloat16", + "hidden_act": "gelu_pytorch_tanh", + "hidden_size": 1024, + "in_channels": 3, + "initializer_range": 0.02, + "intermediate_size": 4096, + "model_type": "qwen3_5_vision", + "num_heads": 16, + "num_position_embeddings": 2304, + "out_hidden_size": 2560, + "patch_size": 16, + "spatial_merge_size": 2, + "temporal_patch_size": 2 + }, + "vision_end_token_id": 248054, + "vision_start_token_id": 248053 +} diff --git a/precise_coder/4b_rl_k0.33_f1ur/global_step_328/actor/huggingface/processor_config.json b/precise_coder/4b_rl_k0.33_f1ur/global_step_328/actor/huggingface/processor_config.json new file mode 100644 index 0000000000000000000000000000000000000000..33818c7f9e991ad735fd240209f4fa73e6c28c50 --- /dev/null +++ b/precise_coder/4b_rl_k0.33_f1ur/global_step_328/actor/huggingface/processor_config.json @@ -0,0 +1,60 @@ +{ + "image_processor": { + "do_convert_rgb": true, + "do_normalize": true, + "do_rescale": true, + "do_resize": true, + "image_mean": [ + 0.5, + 0.5, + 0.5 + ], + "image_processor_type": "Qwen2VLImageProcessor", + "image_std": [ + 0.5, + 0.5, + 0.5 + ], + "merge_size": 2, + "patch_size": 16, + "resample": 3, + "rescale_factor": 0.00392156862745098, + "size": { + "longest_edge": 16777216, + "shortest_edge": 65536 + }, + "temporal_patch_size": 2 + }, + "processor_class": "Qwen3VLProcessor", + "video_processor": { + "do_convert_rgb": true, + "do_normalize": true, + "do_rescale": true, + "do_resize": true, + "do_sample_frames": true, + "fps": 2, + "image_mean": [ + 0.5, + 0.5, + 0.5 + ], + "image_std": [ + 0.5, + 0.5, + 0.5 + ], + "max_frames": 768, + "merge_size": 2, + "min_frames": 4, + "patch_size": 16, + "resample": 3, + "rescale_factor": 0.00392156862745098, + "return_metadata": false, + "size": { + "longest_edge": 25165824, + "shortest_edge": 4096 + }, + "temporal_patch_size": 2, + "video_processor_type": "Qwen3VLVideoProcessor" + } +} diff --git a/precise_coder/4b_rl_k0.33_f1ur/latest_checkpointed_iteration.txt b/precise_coder/4b_rl_k0.33_f1ur/latest_checkpointed_iteration.txt new file mode 100644 index 0000000000000000000000000000000000000000..41a4a819ada66b2e8f7fea82f094eb1314f2e9ca --- /dev/null +++ b/precise_coder/4b_rl_k0.33_f1ur/latest_checkpointed_iteration.txt @@ -0,0 +1 @@ +328 \ No newline at end of file diff --git a/precise_coder/4b_rl_k0.33_f1ur_think8k/best_ckpt_state.json b/precise_coder/4b_rl_k0.33_f1ur_think8k/best_ckpt_state.json new file mode 100644 index 0000000000000000000000000000000000000000..0883342a662216a05ec75aec82b019cc5ee1da70 --- /dev/null +++ b/precise_coder/4b_rl_k0.33_f1ur_think8k/best_ckpt_state.json @@ -0,0 +1 @@ +{"best_val_score": 1.263481237271613, "best_global_step": 328, "no_improve_rounds": 0} \ No newline at end of file diff --git a/precise_coder/4b_rl_k0.33_f1ur_think8k/global_step_328/actor/fsdp_config.json b/precise_coder/4b_rl_k0.33_f1ur_think8k/global_step_328/actor/fsdp_config.json new file mode 100644 index 0000000000000000000000000000000000000000..17ff55630675ec23d6a1d79ec7a480aa25faa5de --- /dev/null +++ b/precise_coder/4b_rl_k0.33_f1ur_think8k/global_step_328/actor/fsdp_config.json @@ -0,0 +1,4 @@ +{ + "FSDP_version": 2, + "world_size": 4 +} \ No newline at end of file diff --git a/precise_coder/4b_rl_k0.33_f1ur_think8k/global_step_328/actor/huggingface/chat_template.jinja b/precise_coder/4b_rl_k0.33_f1ur_think8k/global_step_328/actor/huggingface/chat_template.jinja new file mode 100644 index 0000000000000000000000000000000000000000..a585dec894e63da457d9440ec6aa7caa16d20860 --- /dev/null +++ b/precise_coder/4b_rl_k0.33_f1ur_think8k/global_step_328/actor/huggingface/chat_template.jinja @@ -0,0 +1,154 @@ +{%- set image_count = namespace(value=0) %} +{%- set video_count = namespace(value=0) %} +{%- macro render_content(content, do_vision_count, is_system_content=false) %} + {%- if content is string %} + {{- content }} + {%- elif content is iterable and content is not mapping %} + {%- for item in content %} + {%- if 'image' in item or 'image_url' in item or item.type == 'image' %} + {%- if is_system_content %} + {{- raise_exception('System message cannot contain images.') }} + {%- endif %} + {%- if do_vision_count %} + {%- set image_count.value = image_count.value + 1 %} + {%- endif %} + {%- if add_vision_id %} + {{- 'Picture ' ~ image_count.value ~ ': ' }} + {%- endif %} + {{- '<|vision_start|><|image_pad|><|vision_end|>' }} + {%- elif 'video' in item or item.type == 'video' %} + {%- if is_system_content %} + {{- raise_exception('System message cannot contain videos.') }} + {%- endif %} + {%- if do_vision_count %} + {%- set video_count.value = video_count.value + 1 %} + {%- endif %} + {%- if add_vision_id %} + {{- 'Video ' ~ video_count.value ~ ': ' }} + {%- endif %} + {{- '<|vision_start|><|video_pad|><|vision_end|>' }} + {%- elif 'text' in item %} + {{- item.text }} + {%- else %} + {{- raise_exception('Unexpected item type in content.') }} + {%- endif %} + {%- endfor %} + {%- elif content is none or content is undefined %} + {{- '' }} + {%- else %} + {{- raise_exception('Unexpected content type.') }} + {%- endif %} +{%- endmacro %} +{%- if not messages %} + {{- raise_exception('No messages provided.') }} +{%- endif %} +{%- if tools and tools is iterable and tools is not mapping %} + {{- '<|im_start|>system\n' }} + {{- "# Tools\n\nYou have access to the following functions:\n\n" }} + {%- for tool in tools %} + {{- "\n" }} + {{- tool | tojson }} + {%- endfor %} + {{- "\n" }} + {{- '\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n\n\n\nvalue_1\n\n\nThis is the value for the second parameter\nthat can span\nmultiple lines\n\n\n\n\n\nReminder:\n- Function calls MUST follow the specified format: an inner block must be nested within XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls\n' }} + {%- if messages[0].role == 'system' %} + {%- set content = render_content(messages[0].content, false, true)|trim %} + {%- if content %} + {{- '\n\n' + content }} + {%- endif %} + {%- endif %} + {{- '<|im_end|>\n' }} +{%- else %} + {%- if messages[0].role == 'system' %} + {%- set content = render_content(messages[0].content, false, true)|trim %} + {{- '<|im_start|>system\n' + 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" %} + {%- set content = render_content(message.content, false)|trim %} + {%- if not(content.startswith('') and content.endswith('')) %} + {%- set ns.multi_step_tool = false %} + {%- set ns.last_query_index = index %} + {%- endif %} + {%- endif %} +{%- endfor %} +{%- if ns.multi_step_tool %} + {{- raise_exception('No user query found in messages.') }} +{%- endif %} +{%- for message in messages %} + {%- set content = render_content(message.content, true)|trim %} + {%- if message.role == "system" %} + {%- if not loop.first %} + {{- raise_exception('System message must be at the beginning.') }} + {%- endif %} + {%- elif message.role == "user" %} + {{- '<|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 %} + {%- set reasoning_content = reasoning_content|trim %} + {%- if loop.index0 > ns.last_query_index %} + {{- '<|im_start|>' + message.role + '\n\n' + reasoning_content + '\n\n\n' + content }} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- if message.tool_calls and message.tool_calls is iterable and message.tool_calls is not mapping %} + {%- for tool_call in message.tool_calls %} + {%- if tool_call.function is defined %} + {%- set tool_call = tool_call.function %} + {%- endif %} + {%- if loop.first %} + {%- if content|trim %} + {{- '\n\n\n\n' }} + {%- else %} + {{- '\n\n' }} + {%- endif %} + {%- else %} + {{- '\n\n\n' }} + {%- endif %} + {%- if tool_call.arguments is defined %} + {%- for args_name, args_value in tool_call.arguments|items %} + {{- '\n' }} + {%- set args_value = args_value | tojson | safe if args_value is mapping or (args_value is sequence and args_value is not string) else args_value | string %} + {{- args_value }} + {{- '\n\n' }} + {%- endfor %} + {%- endif %} + {{- '\n' }} + {%- endfor %} + {%- endif %} + {{- '<|im_end|>\n' }} + {%- elif message.role == "tool" %} + {%- if loop.previtem and loop.previtem.role != "tool" %} + {{- '<|im_start|>user' }} + {%- endif %} + {{- '\n\n' }} + {{- content }} + {{- '\n' }} + {%- if not loop.last and loop.nextitem.role != "tool" %} + {{- '<|im_end|>\n' }} + {%- elif loop.last %} + {{- '<|im_end|>\n' }} + {%- endif %} + {%- else %} + {{- raise_exception('Unexpected message role.') }} + {%- endif %} +{%- endfor %} +{%- if add_generation_prompt %} + {{- '<|im_start|>assistant\n' }} + {%- if enable_thinking is defined and enable_thinking is false %} + {{- '\n\n\n\n' }} + {%- else %} + {{- '\n' }} + {%- endif %} +{%- endif %} \ No newline at end of file diff --git a/precise_coder/4b_rl_k0.33_f1ur_think8k/global_step_328/actor/huggingface/config.json b/precise_coder/4b_rl_k0.33_f1ur_think8k/global_step_328/actor/huggingface/config.json new file mode 100644 index 0000000000000000000000000000000000000000..0e8cd2d6f8b5c82e83b6479da2639aa4f7f24473 --- /dev/null +++ b/precise_coder/4b_rl_k0.33_f1ur_think8k/global_step_328/actor/huggingface/config.json @@ -0,0 +1,112 @@ +{ + "architectures": [ + "Qwen3_5ForConditionalGeneration" + ], + "bos_token_id": null, + "dtype": "bfloat16", + "eos_token_id": 248046, + "image_token_id": 248056, + "model_type": "qwen3_5", + "pad_token_id": 248044, + "text_config": { + "attention_bias": false, + "attention_dropout": 0.0, + "attn_output_gate": true, + "bos_token_id": null, + "dtype": "bfloat16", + "eos_token_id": 248044, + "full_attention_interval": 4, + "head_dim": 256, + "hidden_act": "silu", + "hidden_size": 2560, + "initializer_range": 0.02, + "intermediate_size": 9216, + "layer_types": [ + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention" + ], + "linear_conv_kernel_dim": 4, + "linear_key_head_dim": 128, + "linear_num_key_heads": 16, + "linear_num_value_heads": 32, + "linear_value_head_dim": 128, + "mamba_ssm_dtype": "float32", + "max_position_embeddings": 262144, + "mlp_only_layers": [], + "model_type": "qwen3_5_text", + "mtp_num_hidden_layers": 0, + "mtp_use_dedicated_embeddings": false, + "num_attention_heads": 16, + "num_hidden_layers": 32, + "num_key_value_heads": 4, + "pad_token_id": null, + "partial_rotary_factor": 0.25, + "rms_norm_eps": 1e-06, + "rope_parameters": { + "mrope_interleaved": true, + "mrope_section": [ + 11, + 11, + 10 + ], + "partial_rotary_factor": 0.25, + "rope_theta": 10000000, + "rope_type": "default" + }, + "tie_word_embeddings": true, + "use_cache": true, + "vocab_size": 248320 + }, + "tie_word_embeddings": true, + "transformers_version": "5.10.2", + "video_token_id": 248057, + "vision_config": { + "deepstack_visual_indexes": [], + "depth": 24, + "dtype": "bfloat16", + "hidden_act": "gelu_pytorch_tanh", + "hidden_size": 1024, + "in_channels": 3, + "initializer_range": 0.02, + "intermediate_size": 4096, + "model_type": "qwen3_5_vision", + "num_heads": 16, + "num_position_embeddings": 2304, + "out_hidden_size": 2560, + "patch_size": 16, + "spatial_merge_size": 2, + "temporal_patch_size": 2 + }, + "vision_end_token_id": 248054, + "vision_start_token_id": 248053 +} diff --git a/precise_coder/4b_rl_k0.33_f1ur_think8k/global_step_328/actor/huggingface/generation_config.json b/precise_coder/4b_rl_k0.33_f1ur_think8k/global_step_328/actor/huggingface/generation_config.json new file mode 100644 index 0000000000000000000000000000000000000000..a8f50cfe9f041954a2175966a9ef6f88480f4769 --- /dev/null +++ b/precise_coder/4b_rl_k0.33_f1ur_think8k/global_step_328/actor/huggingface/generation_config.json @@ -0,0 +1,9 @@ +{ + "_from_model_config": true, + "eos_token_id": 248046, + "output_attentions": false, + "output_hidden_states": false, + "pad_token_id": 248044, + "transformers_version": "5.10.2", + "use_cache": true +} diff --git a/precise_coder/4b_rl_k0.33_f1ur_think8k/global_step_328/actor/huggingface/processor_config.json b/precise_coder/4b_rl_k0.33_f1ur_think8k/global_step_328/actor/huggingface/processor_config.json new file mode 100644 index 0000000000000000000000000000000000000000..33818c7f9e991ad735fd240209f4fa73e6c28c50 --- /dev/null +++ b/precise_coder/4b_rl_k0.33_f1ur_think8k/global_step_328/actor/huggingface/processor_config.json @@ -0,0 +1,60 @@ +{ + "image_processor": { + "do_convert_rgb": true, + "do_normalize": true, + "do_rescale": true, + "do_resize": true, + "image_mean": [ + 0.5, + 0.5, + 0.5 + ], + "image_processor_type": "Qwen2VLImageProcessor", + "image_std": [ + 0.5, + 0.5, + 0.5 + ], + "merge_size": 2, + "patch_size": 16, + "resample": 3, + "rescale_factor": 0.00392156862745098, + "size": { + "longest_edge": 16777216, + "shortest_edge": 65536 + }, + "temporal_patch_size": 2 + }, + "processor_class": "Qwen3VLProcessor", + "video_processor": { + "do_convert_rgb": true, + "do_normalize": true, + "do_rescale": true, + "do_resize": true, + "do_sample_frames": true, + "fps": 2, + "image_mean": [ + 0.5, + 0.5, + 0.5 + ], + "image_std": [ + 0.5, + 0.5, + 0.5 + ], + "max_frames": 768, + "merge_size": 2, + "min_frames": 4, + "patch_size": 16, + "resample": 3, + "rescale_factor": 0.00392156862745098, + "return_metadata": false, + "size": { + "longest_edge": 25165824, + "shortest_edge": 4096 + }, + "temporal_patch_size": 2, + "video_processor_type": "Qwen3VLVideoProcessor" + } +} diff --git a/precise_coder/4b_rl_k0.33_f1ur_think8k/global_step_328/actor/huggingface/tokenizer_config.json b/precise_coder/4b_rl_k0.33_f1ur_think8k/global_step_328/actor/huggingface/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..1d134cd298be1e3be25db393d93a1cefe80e3214 --- /dev/null +++ b/precise_coder/4b_rl_k0.33_f1ur_think8k/global_step_328/actor/huggingface/tokenizer_config.json @@ -0,0 +1,33 @@ +{ + "add_prefix_space": false, + "audio_bos_token": "<|audio_start|>", + "audio_eos_token": "<|audio_end|>", + "audio_token": "<|audio_pad|>", + "backend": "tokenizers", + "bos_token": null, + "clean_up_tokenization_spaces": false, + "eos_token": "<|im_end|>", + "errors": "replace", + "image_token": "<|image_pad|>", + "is_local": true, + "local_files_only": false, + "model_max_length": 262144, + "model_specific_special_tokens": { + "audio_bos_token": "<|audio_start|>", + "audio_eos_token": "<|audio_end|>", + "audio_token": "<|audio_pad|>", + "image_token": "<|image_pad|>", + "video_token": "<|video_pad|>", + "vision_bos_token": "<|vision_start|>", + "vision_eos_token": "<|vision_end|>" + }, + "pad_token": "<|endoftext|>", + "pretokenize_regex": "(?i:'s|'t|'re|'ve|'m|'ll|'d)|[^\\r\\n\\p{L}\\p{N}]?[\\p{L}\\p{M}]+|\\p{N}| ?[^\\s\\p{L}\\p{M}\\p{N}]+[\\r\\n]*|\\s*[\\r\\n]+|\\s+(?!\\S)|\\s+", + "processor_class": "Qwen3VLProcessor", + "split_special_tokens": false, + "tokenizer_class": "Qwen2Tokenizer", + "unk_token": null, + "video_token": "<|video_pad|>", + "vision_bos_token": "<|vision_start|>", + "vision_eos_token": "<|vision_end|>" +} diff --git a/precise_coder/4b_rl_k0.33_f1ur_think8k/latest_checkpointed_iteration.txt b/precise_coder/4b_rl_k0.33_f1ur_think8k/latest_checkpointed_iteration.txt new file mode 100644 index 0000000000000000000000000000000000000000..41a4a819ada66b2e8f7fea82f094eb1314f2e9ca --- /dev/null +++ b/precise_coder/4b_rl_k0.33_f1ur_think8k/latest_checkpointed_iteration.txt @@ -0,0 +1 @@ +328 \ No newline at end of file diff --git a/precise_coder/4b_rl_k0.33_gdpo/best_ckpt_state.json b/precise_coder/4b_rl_k0.33_gdpo/best_ckpt_state.json new file mode 100644 index 0000000000000000000000000000000000000000..80ab3e5f5b2851dc5a433ea8bd05a5e49e3c7490 --- /dev/null +++ b/precise_coder/4b_rl_k0.33_gdpo/best_ckpt_state.json @@ -0,0 +1 @@ +{"best_val_score": 1.1735443816853084, "best_global_step": 328, "no_improve_rounds": 0} \ No newline at end of file diff --git a/precise_coder/4b_rl_k0.33_gdpo/global_step_328/actor/fsdp_config.json b/precise_coder/4b_rl_k0.33_gdpo/global_step_328/actor/fsdp_config.json new file mode 100644 index 0000000000000000000000000000000000000000..17ff55630675ec23d6a1d79ec7a480aa25faa5de --- /dev/null +++ b/precise_coder/4b_rl_k0.33_gdpo/global_step_328/actor/fsdp_config.json @@ -0,0 +1,4 @@ +{ + "FSDP_version": 2, + "world_size": 4 +} \ No newline at end of file diff --git a/precise_coder/4b_rl_k0.33_gdpo/global_step_328/actor/huggingface/processor_config.json b/precise_coder/4b_rl_k0.33_gdpo/global_step_328/actor/huggingface/processor_config.json new file mode 100644 index 0000000000000000000000000000000000000000..33818c7f9e991ad735fd240209f4fa73e6c28c50 --- /dev/null +++ b/precise_coder/4b_rl_k0.33_gdpo/global_step_328/actor/huggingface/processor_config.json @@ -0,0 +1,60 @@ +{ + "image_processor": { + "do_convert_rgb": true, + "do_normalize": true, + "do_rescale": true, + "do_resize": true, + "image_mean": [ + 0.5, + 0.5, + 0.5 + ], + "image_processor_type": "Qwen2VLImageProcessor", + "image_std": [ + 0.5, + 0.5, + 0.5 + ], + "merge_size": 2, + "patch_size": 16, + "resample": 3, + "rescale_factor": 0.00392156862745098, + "size": { + "longest_edge": 16777216, + "shortest_edge": 65536 + }, + "temporal_patch_size": 2 + }, + "processor_class": "Qwen3VLProcessor", + "video_processor": { + "do_convert_rgb": true, + "do_normalize": true, + "do_rescale": true, + "do_resize": true, + "do_sample_frames": true, + "fps": 2, + "image_mean": [ + 0.5, + 0.5, + 0.5 + ], + "image_std": [ + 0.5, + 0.5, + 0.5 + ], + "max_frames": 768, + "merge_size": 2, + "min_frames": 4, + "patch_size": 16, + "resample": 3, + "rescale_factor": 0.00392156862745098, + "return_metadata": false, + "size": { + "longest_edge": 25165824, + "shortest_edge": 4096 + }, + "temporal_patch_size": 2, + "video_processor_type": "Qwen3VLVideoProcessor" + } +} diff --git a/precise_coder/4b_rl_k0.33_gdpo/latest_checkpointed_iteration.txt b/precise_coder/4b_rl_k0.33_gdpo/latest_checkpointed_iteration.txt new file mode 100644 index 0000000000000000000000000000000000000000..41a4a819ada66b2e8f7fea82f094eb1314f2e9ca --- /dev/null +++ b/precise_coder/4b_rl_k0.33_gdpo/latest_checkpointed_iteration.txt @@ -0,0 +1 @@ +328 \ No newline at end of file diff --git a/precise_coder/4b_rl_k0.33_prec/best_ckpt_state.json b/precise_coder/4b_rl_k0.33_prec/best_ckpt_state.json new file mode 100644 index 0000000000000000000000000000000000000000..ab41c8292171956cca1357af4a2243e5f7983b17 --- /dev/null +++ b/precise_coder/4b_rl_k0.33_prec/best_ckpt_state.json @@ -0,0 +1 @@ +{"best_val_score": 1.1876730943938265, "best_global_step": 328, "no_improve_rounds": 0} \ No newline at end of file diff --git a/precise_coder/4b_rl_k0.33_prec/latest_checkpointed_iteration.txt b/precise_coder/4b_rl_k0.33_prec/latest_checkpointed_iteration.txt new file mode 100644 index 0000000000000000000000000000000000000000..41a4a819ada66b2e8f7fea82f094eb1314f2e9ca --- /dev/null +++ b/precise_coder/4b_rl_k0.33_prec/latest_checkpointed_iteration.txt @@ -0,0 +1 @@ +328 \ No newline at end of file diff --git a/precise_coder/4b_rl_k0.33_rec/best_ckpt_state.json b/precise_coder/4b_rl_k0.33_rec/best_ckpt_state.json new file mode 100644 index 0000000000000000000000000000000000000000..325568b23cb9378c7e458459aa0daa99e61351cf --- /dev/null +++ b/precise_coder/4b_rl_k0.33_rec/best_ckpt_state.json @@ -0,0 +1 @@ +{"best_val_score": 1.0551165471427275, "best_global_step": 250, "no_improve_rounds": 4} \ No newline at end of file diff --git a/precise_coder/4b_rl_k0.33_rec/latest_checkpointed_iteration.txt b/precise_coder/4b_rl_k0.33_rec/latest_checkpointed_iteration.txt new file mode 100644 index 0000000000000000000000000000000000000000..41a4a819ada66b2e8f7fea82f094eb1314f2e9ca --- /dev/null +++ b/precise_coder/4b_rl_k0.33_rec/latest_checkpointed_iteration.txt @@ -0,0 +1 @@ +328 \ No newline at end of file diff --git a/precise_coder/4b_rl_k0.33_run2/best_ckpt_state.json b/precise_coder/4b_rl_k0.33_run2/best_ckpt_state.json new file mode 100644 index 0000000000000000000000000000000000000000..bf88d7248513fdf03fd222c69917cbabc708fc69 --- /dev/null +++ b/precise_coder/4b_rl_k0.33_run2/best_ckpt_state.json @@ -0,0 +1 @@ +{"best_val_score": 1.1555584782157178, "best_global_step": 328, "no_improve_rounds": 0} \ No newline at end of file diff --git a/precise_coder/4b_rl_k0.33_run2/global_step_328/actor/fsdp_config.json b/precise_coder/4b_rl_k0.33_run2/global_step_328/actor/fsdp_config.json new file mode 100644 index 0000000000000000000000000000000000000000..17ff55630675ec23d6a1d79ec7a480aa25faa5de --- /dev/null +++ b/precise_coder/4b_rl_k0.33_run2/global_step_328/actor/fsdp_config.json @@ -0,0 +1,4 @@ +{ + "FSDP_version": 2, + "world_size": 4 +} \ No newline at end of file diff --git a/precise_coder/4b_rl_k0.33_run2/global_step_328/actor/huggingface/chat_template.jinja b/precise_coder/4b_rl_k0.33_run2/global_step_328/actor/huggingface/chat_template.jinja new file mode 100644 index 0000000000000000000000000000000000000000..a585dec894e63da457d9440ec6aa7caa16d20860 --- /dev/null +++ b/precise_coder/4b_rl_k0.33_run2/global_step_328/actor/huggingface/chat_template.jinja @@ -0,0 +1,154 @@ +{%- set image_count = namespace(value=0) %} +{%- set video_count = namespace(value=0) %} +{%- macro render_content(content, do_vision_count, is_system_content=false) %} + {%- if content is string %} + {{- content }} + {%- elif content is iterable and content is not mapping %} + {%- for item in content %} + {%- if 'image' in item or 'image_url' in item or item.type == 'image' %} + {%- if is_system_content %} + {{- raise_exception('System message cannot contain images.') }} + {%- endif %} + {%- if do_vision_count %} + {%- set image_count.value = image_count.value + 1 %} + {%- endif %} + {%- if add_vision_id %} + {{- 'Picture ' ~ image_count.value ~ ': ' }} + {%- endif %} + {{- '<|vision_start|><|image_pad|><|vision_end|>' }} + {%- elif 'video' in item or item.type == 'video' %} + {%- if is_system_content %} + {{- raise_exception('System message cannot contain videos.') }} + {%- endif %} + {%- if do_vision_count %} + {%- set video_count.value = video_count.value + 1 %} + {%- endif %} + {%- if add_vision_id %} + {{- 'Video ' ~ video_count.value ~ ': ' }} + {%- endif %} + {{- '<|vision_start|><|video_pad|><|vision_end|>' }} + {%- elif 'text' in item %} + {{- item.text }} + {%- else %} + {{- raise_exception('Unexpected item type in content.') }} + {%- endif %} + {%- endfor %} + {%- elif content is none or content is undefined %} + {{- '' }} + {%- else %} + {{- raise_exception('Unexpected content type.') }} + {%- endif %} +{%- endmacro %} +{%- if not messages %} + {{- raise_exception('No messages provided.') }} +{%- endif %} +{%- if tools and tools is iterable and tools is not mapping %} + {{- '<|im_start|>system\n' }} + {{- "# Tools\n\nYou have access to the following functions:\n\n" }} + {%- for tool in tools %} + {{- "\n" }} + {{- tool | tojson }} + {%- endfor %} + {{- "\n" }} + {{- '\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n\n\n\nvalue_1\n\n\nThis is the value for the second parameter\nthat can span\nmultiple lines\n\n\n\n\n\nReminder:\n- Function calls MUST follow the specified format: an inner block must be nested within XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls\n' }} + {%- if messages[0].role == 'system' %} + {%- set content = render_content(messages[0].content, false, true)|trim %} + {%- if content %} + {{- '\n\n' + content }} + {%- endif %} + {%- endif %} + {{- '<|im_end|>\n' }} +{%- else %} + {%- if messages[0].role == 'system' %} + {%- set content = render_content(messages[0].content, false, true)|trim %} + {{- '<|im_start|>system\n' + 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" %} + {%- set content = render_content(message.content, false)|trim %} + {%- if not(content.startswith('') and content.endswith('')) %} + {%- set ns.multi_step_tool = false %} + {%- set ns.last_query_index = index %} + {%- endif %} + {%- endif %} +{%- endfor %} +{%- if ns.multi_step_tool %} + {{- raise_exception('No user query found in messages.') }} +{%- endif %} +{%- for message in messages %} + {%- set content = render_content(message.content, true)|trim %} + {%- if message.role == "system" %} + {%- if not loop.first %} + {{- raise_exception('System message must be at the beginning.') }} + {%- endif %} + {%- elif message.role == "user" %} + {{- '<|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 %} + {%- set reasoning_content = reasoning_content|trim %} + {%- if loop.index0 > ns.last_query_index %} + {{- '<|im_start|>' + message.role + '\n\n' + reasoning_content + '\n\n\n' + content }} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- if message.tool_calls and message.tool_calls is iterable and message.tool_calls is not mapping %} + {%- for tool_call in message.tool_calls %} + {%- if tool_call.function is defined %} + {%- set tool_call = tool_call.function %} + {%- endif %} + {%- if loop.first %} + {%- if content|trim %} + {{- '\n\n\n\n' }} + {%- else %} + {{- '\n\n' }} + {%- endif %} + {%- else %} + {{- '\n\n\n' }} + {%- endif %} + {%- if tool_call.arguments is defined %} + {%- for args_name, args_value in tool_call.arguments|items %} + {{- '\n' }} + {%- set args_value = args_value | tojson | safe if args_value is mapping or (args_value is sequence and args_value is not string) else args_value | string %} + {{- args_value }} + {{- '\n\n' }} + {%- endfor %} + {%- endif %} + {{- '\n' }} + {%- endfor %} + {%- endif %} + {{- '<|im_end|>\n' }} + {%- elif message.role == "tool" %} + {%- if loop.previtem and loop.previtem.role != "tool" %} + {{- '<|im_start|>user' }} + {%- endif %} + {{- '\n\n' }} + {{- content }} + {{- '\n' }} + {%- if not loop.last and loop.nextitem.role != "tool" %} + {{- '<|im_end|>\n' }} + {%- elif loop.last %} + {{- '<|im_end|>\n' }} + {%- endif %} + {%- else %} + {{- raise_exception('Unexpected message role.') }} + {%- endif %} +{%- endfor %} +{%- if add_generation_prompt %} + {{- '<|im_start|>assistant\n' }} + {%- if enable_thinking is defined and enable_thinking is false %} + {{- '\n\n\n\n' }} + {%- else %} + {{- '\n' }} + {%- endif %} +{%- endif %} \ No newline at end of file diff --git a/precise_coder/4b_rl_k0.33_run2/global_step_328/actor/huggingface/config.json b/precise_coder/4b_rl_k0.33_run2/global_step_328/actor/huggingface/config.json new file mode 100644 index 0000000000000000000000000000000000000000..0e8cd2d6f8b5c82e83b6479da2639aa4f7f24473 --- /dev/null +++ b/precise_coder/4b_rl_k0.33_run2/global_step_328/actor/huggingface/config.json @@ -0,0 +1,112 @@ +{ + "architectures": [ + "Qwen3_5ForConditionalGeneration" + ], + "bos_token_id": null, + "dtype": "bfloat16", + "eos_token_id": 248046, + "image_token_id": 248056, + "model_type": "qwen3_5", + "pad_token_id": 248044, + "text_config": { + "attention_bias": false, + "attention_dropout": 0.0, + "attn_output_gate": true, + "bos_token_id": null, + "dtype": "bfloat16", + "eos_token_id": 248044, + "full_attention_interval": 4, + "head_dim": 256, + "hidden_act": "silu", + "hidden_size": 2560, + "initializer_range": 0.02, + "intermediate_size": 9216, + "layer_types": [ + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention" + ], + "linear_conv_kernel_dim": 4, + "linear_key_head_dim": 128, + "linear_num_key_heads": 16, + "linear_num_value_heads": 32, + "linear_value_head_dim": 128, + "mamba_ssm_dtype": "float32", + "max_position_embeddings": 262144, + "mlp_only_layers": [], + "model_type": "qwen3_5_text", + "mtp_num_hidden_layers": 0, + "mtp_use_dedicated_embeddings": false, + "num_attention_heads": 16, + "num_hidden_layers": 32, + "num_key_value_heads": 4, + "pad_token_id": null, + "partial_rotary_factor": 0.25, + "rms_norm_eps": 1e-06, + "rope_parameters": { + "mrope_interleaved": true, + "mrope_section": [ + 11, + 11, + 10 + ], + "partial_rotary_factor": 0.25, + "rope_theta": 10000000, + "rope_type": "default" + }, + "tie_word_embeddings": true, + "use_cache": true, + "vocab_size": 248320 + }, + "tie_word_embeddings": true, + "transformers_version": "5.10.2", + "video_token_id": 248057, + "vision_config": { + "deepstack_visual_indexes": [], + "depth": 24, + "dtype": "bfloat16", + "hidden_act": "gelu_pytorch_tanh", + "hidden_size": 1024, + "in_channels": 3, + "initializer_range": 0.02, + "intermediate_size": 4096, + "model_type": "qwen3_5_vision", + "num_heads": 16, + "num_position_embeddings": 2304, + "out_hidden_size": 2560, + "patch_size": 16, + "spatial_merge_size": 2, + "temporal_patch_size": 2 + }, + "vision_end_token_id": 248054, + "vision_start_token_id": 248053 +} diff --git a/precise_coder/4b_rl_k0.33_run2/global_step_328/actor/huggingface/tokenizer_config.json b/precise_coder/4b_rl_k0.33_run2/global_step_328/actor/huggingface/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..1d134cd298be1e3be25db393d93a1cefe80e3214 --- /dev/null +++ b/precise_coder/4b_rl_k0.33_run2/global_step_328/actor/huggingface/tokenizer_config.json @@ -0,0 +1,33 @@ +{ + "add_prefix_space": false, + "audio_bos_token": "<|audio_start|>", + "audio_eos_token": "<|audio_end|>", + "audio_token": "<|audio_pad|>", + "backend": "tokenizers", + "bos_token": null, + "clean_up_tokenization_spaces": false, + "eos_token": "<|im_end|>", + "errors": "replace", + "image_token": "<|image_pad|>", + "is_local": true, + "local_files_only": false, + "model_max_length": 262144, + "model_specific_special_tokens": { + "audio_bos_token": "<|audio_start|>", + "audio_eos_token": "<|audio_end|>", + "audio_token": "<|audio_pad|>", + "image_token": "<|image_pad|>", + "video_token": "<|video_pad|>", + "vision_bos_token": "<|vision_start|>", + "vision_eos_token": "<|vision_end|>" + }, + "pad_token": "<|endoftext|>", + "pretokenize_regex": "(?i:'s|'t|'re|'ve|'m|'ll|'d)|[^\\r\\n\\p{L}\\p{N}]?[\\p{L}\\p{M}]+|\\p{N}| ?[^\\s\\p{L}\\p{M}\\p{N}]+[\\r\\n]*|\\s*[\\r\\n]+|\\s+(?!\\S)|\\s+", + "processor_class": "Qwen3VLProcessor", + "split_special_tokens": false, + "tokenizer_class": "Qwen2Tokenizer", + "unk_token": null, + "video_token": "<|video_pad|>", + "vision_bos_token": "<|vision_start|>", + "vision_eos_token": "<|vision_end|>" +} diff --git a/precise_coder/4b_rl_k0.33_run2/latest_checkpointed_iteration.txt b/precise_coder/4b_rl_k0.33_run2/latest_checkpointed_iteration.txt new file mode 100644 index 0000000000000000000000000000000000000000..41a4a819ada66b2e8f7fea82f094eb1314f2e9ca --- /dev/null +++ b/precise_coder/4b_rl_k0.33_run2/latest_checkpointed_iteration.txt @@ -0,0 +1 @@ +328 \ No newline at end of file diff --git a/precise_coder/4b_rl_k0.33_run3/best_ckpt_state.json b/precise_coder/4b_rl_k0.33_run3/best_ckpt_state.json new file mode 100644 index 0000000000000000000000000000000000000000..904e4bc6fc3f7231cc2056aac5eec183ca3d102e --- /dev/null +++ b/precise_coder/4b_rl_k0.33_run3/best_ckpt_state.json @@ -0,0 +1 @@ +{"best_val_score": 1.1406082161629556, "best_global_step": 175, "no_improve_rounds": 6} \ No newline at end of file diff --git a/precise_coder/4b_rl_k0.33_run3/latest_checkpointed_iteration.txt b/precise_coder/4b_rl_k0.33_run3/latest_checkpointed_iteration.txt new file mode 100644 index 0000000000000000000000000000000000000000..f9c94c8318066ba562fd1ce1e14753071396ea54 --- /dev/null +++ b/precise_coder/4b_rl_k0.33_run3/latest_checkpointed_iteration.txt @@ -0,0 +1 @@ +325 \ No newline at end of file diff --git a/precise_coder/4b_rl_k0.5/best_ckpt_state.json b/precise_coder/4b_rl_k0.5/best_ckpt_state.json new file mode 100644 index 0000000000000000000000000000000000000000..b28b176213c1748efb44d54463de2d4bfd1dd8a1 --- /dev/null +++ b/precise_coder/4b_rl_k0.5/best_ckpt_state.json @@ -0,0 +1 @@ +{"best_val_score": 1.203300881491349, "best_global_step": 275, "no_improve_rounds": 3} \ No newline at end of file diff --git a/precise_coder/4b_rl_k0.5/latest_checkpointed_iteration.txt b/precise_coder/4b_rl_k0.5/latest_checkpointed_iteration.txt new file mode 100644 index 0000000000000000000000000000000000000000..41a4a819ada66b2e8f7fea82f094eb1314f2e9ca --- /dev/null +++ b/precise_coder/4b_rl_k0.5/latest_checkpointed_iteration.txt @@ -0,0 +1 @@ +328 \ No newline at end of file diff --git a/precise_coder/4b_rl_k0.5_run2/best_ckpt_state.json b/precise_coder/4b_rl_k0.5_run2/best_ckpt_state.json new file mode 100644 index 0000000000000000000000000000000000000000..15c2156a58e09236cb73c99ad80485956b2920b7 --- /dev/null +++ b/precise_coder/4b_rl_k0.5_run2/best_ckpt_state.json @@ -0,0 +1 @@ +{"best_val_score": 1.1356306920615173, "best_global_step": 325, "no_improve_rounds": 1} \ No newline at end of file diff --git a/precise_coder/4b_rl_k0.5_run3/best_ckpt_state.json b/precise_coder/4b_rl_k0.5_run3/best_ckpt_state.json new file mode 100644 index 0000000000000000000000000000000000000000..b9fc529e623b574a33e5e8a022fe632757b4e815 --- /dev/null +++ b/precise_coder/4b_rl_k0.5_run3/best_ckpt_state.json @@ -0,0 +1 @@ +{"best_val_score": 1.1200003112269694, "best_global_step": 200, "no_improve_rounds": 6} \ No newline at end of file diff --git a/precise_coder/4b_rl_k0.5_run3/latest_checkpointed_iteration.txt b/precise_coder/4b_rl_k0.5_run3/latest_checkpointed_iteration.txt new file mode 100644 index 0000000000000000000000000000000000000000..41a4a819ada66b2e8f7fea82f094eb1314f2e9ca --- /dev/null +++ b/precise_coder/4b_rl_k0.5_run3/latest_checkpointed_iteration.txt @@ -0,0 +1 @@ +328 \ No newline at end of file diff --git a/precise_coder/4b_rl_k0.67/best_ckpt_state.json b/precise_coder/4b_rl_k0.67/best_ckpt_state.json new file mode 100644 index 0000000000000000000000000000000000000000..20a1d3e9c0226be0694a40f3cfb243e6f356689c --- /dev/null +++ b/precise_coder/4b_rl_k0.67/best_ckpt_state.json @@ -0,0 +1 @@ +{"best_val_score": 1.1545182328645538, "best_global_step": 325, "no_improve_rounds": 1} \ No newline at end of file diff --git a/precise_coder/4b_rl_k0.83/best_ckpt_state.json b/precise_coder/4b_rl_k0.83/best_ckpt_state.json new file mode 100644 index 0000000000000000000000000000000000000000..24f652f3b911e81c46d43f0ae025012384fd322a --- /dev/null +++ b/precise_coder/4b_rl_k0.83/best_ckpt_state.json @@ -0,0 +1 @@ +{"best_val_score": 1.139228941194807, "best_global_step": 275, "no_improve_rounds": 3} \ No newline at end of file diff --git a/precise_coder/4b_rl_k0.83/latest_checkpointed_iteration.txt b/precise_coder/4b_rl_k0.83/latest_checkpointed_iteration.txt new file mode 100644 index 0000000000000000000000000000000000000000..41a4a819ada66b2e8f7fea82f094eb1314f2e9ca --- /dev/null +++ b/precise_coder/4b_rl_k0.83/latest_checkpointed_iteration.txt @@ -0,0 +1 @@ +328 \ No newline at end of file diff --git a/precise_coder/4b_rl_k1.0/best_ckpt_state.json b/precise_coder/4b_rl_k1.0/best_ckpt_state.json new file mode 100644 index 0000000000000000000000000000000000000000..210dbc6d808e42b67bc8c375539064ff078090f4 --- /dev/null +++ b/precise_coder/4b_rl_k1.0/best_ckpt_state.json @@ -0,0 +1 @@ +{"best_val_score": 1.165107915221181, "best_global_step": 328, "no_improve_rounds": 0} \ No newline at end of file diff --git a/precise_coder/4b_rl_k1.0_f1ur/best_ckpt_state.json b/precise_coder/4b_rl_k1.0_f1ur/best_ckpt_state.json new file mode 100644 index 0000000000000000000000000000000000000000..36f0f7a944855d66bf1e92ea5ef3a24cf636a51d --- /dev/null +++ b/precise_coder/4b_rl_k1.0_f1ur/best_ckpt_state.json @@ -0,0 +1 @@ +{"best_val_score": 1.185731770691112, "best_global_step": 328, "no_improve_rounds": 0} \ No newline at end of file diff --git a/precise_coder/4b_rl_k1.0_f1ur/global_step_328/actor/fsdp_config.json b/precise_coder/4b_rl_k1.0_f1ur/global_step_328/actor/fsdp_config.json new file mode 100644 index 0000000000000000000000000000000000000000..17ff55630675ec23d6a1d79ec7a480aa25faa5de --- /dev/null +++ b/precise_coder/4b_rl_k1.0_f1ur/global_step_328/actor/fsdp_config.json @@ -0,0 +1,4 @@ +{ + "FSDP_version": 2, + "world_size": 4 +} \ No newline at end of file diff --git a/precise_coder/4b_rl_k1.0_f1ur/global_step_328/actor/huggingface/chat_template.jinja b/precise_coder/4b_rl_k1.0_f1ur/global_step_328/actor/huggingface/chat_template.jinja new file mode 100644 index 0000000000000000000000000000000000000000..a585dec894e63da457d9440ec6aa7caa16d20860 --- /dev/null +++ b/precise_coder/4b_rl_k1.0_f1ur/global_step_328/actor/huggingface/chat_template.jinja @@ -0,0 +1,154 @@ +{%- set image_count = namespace(value=0) %} +{%- set video_count = namespace(value=0) %} +{%- macro render_content(content, do_vision_count, is_system_content=false) %} + {%- if content is string %} + {{- content }} + {%- elif content is iterable and content is not mapping %} + {%- for item in content %} + {%- if 'image' in item or 'image_url' in item or item.type == 'image' %} + {%- if is_system_content %} + {{- raise_exception('System message cannot contain images.') }} + {%- endif %} + {%- if do_vision_count %} + {%- set image_count.value = image_count.value + 1 %} + {%- endif %} + {%- if add_vision_id %} + {{- 'Picture ' ~ image_count.value ~ ': ' }} + {%- endif %} + {{- '<|vision_start|><|image_pad|><|vision_end|>' }} + {%- elif 'video' in item or item.type == 'video' %} + {%- if is_system_content %} + {{- raise_exception('System message cannot contain videos.') }} + {%- endif %} + {%- if do_vision_count %} + {%- set video_count.value = video_count.value + 1 %} + {%- endif %} + {%- if add_vision_id %} + {{- 'Video ' ~ video_count.value ~ ': ' }} + {%- endif %} + {{- '<|vision_start|><|video_pad|><|vision_end|>' }} + {%- elif 'text' in item %} + {{- item.text }} + {%- else %} + {{- raise_exception('Unexpected item type in content.') }} + {%- endif %} + {%- endfor %} + {%- elif content is none or content is undefined %} + {{- '' }} + {%- else %} + {{- raise_exception('Unexpected content type.') }} + {%- endif %} +{%- endmacro %} +{%- if not messages %} + {{- raise_exception('No messages provided.') }} +{%- endif %} +{%- if tools and tools is iterable and tools is not mapping %} + {{- '<|im_start|>system\n' }} + {{- "# Tools\n\nYou have access to the following functions:\n\n" }} + {%- for tool in tools %} + {{- "\n" }} + {{- tool | tojson }} + {%- endfor %} + {{- "\n" }} + {{- '\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n\n\n\nvalue_1\n\n\nThis is the value for the second parameter\nthat can span\nmultiple lines\n\n\n\n\n\nReminder:\n- Function calls MUST follow the specified format: an inner block must be nested within XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls\n' }} + {%- if messages[0].role == 'system' %} + {%- set content = render_content(messages[0].content, false, true)|trim %} + {%- if content %} + {{- '\n\n' + content }} + {%- endif %} + {%- endif %} + {{- '<|im_end|>\n' }} +{%- else %} + {%- if messages[0].role == 'system' %} + {%- set content = render_content(messages[0].content, false, true)|trim %} + {{- '<|im_start|>system\n' + 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" %} + {%- set content = render_content(message.content, false)|trim %} + {%- if not(content.startswith('') and content.endswith('')) %} + {%- set ns.multi_step_tool = false %} + {%- set ns.last_query_index = index %} + {%- endif %} + {%- endif %} +{%- endfor %} +{%- if ns.multi_step_tool %} + {{- raise_exception('No user query found in messages.') }} +{%- endif %} +{%- for message in messages %} + {%- set content = render_content(message.content, true)|trim %} + {%- if message.role == "system" %} + {%- if not loop.first %} + {{- raise_exception('System message must be at the beginning.') }} + {%- endif %} + {%- elif message.role == "user" %} + {{- '<|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 %} + {%- set reasoning_content = reasoning_content|trim %} + {%- if loop.index0 > ns.last_query_index %} + {{- '<|im_start|>' + message.role + '\n\n' + reasoning_content + '\n\n\n' + content }} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- if message.tool_calls and message.tool_calls is iterable and message.tool_calls is not mapping %} + {%- for tool_call in message.tool_calls %} + {%- if tool_call.function is defined %} + {%- set tool_call = tool_call.function %} + {%- endif %} + {%- if loop.first %} + {%- if content|trim %} + {{- '\n\n\n\n' }} + {%- else %} + {{- '\n\n' }} + {%- endif %} + {%- else %} + {{- '\n\n\n' }} + {%- endif %} + {%- if tool_call.arguments is defined %} + {%- for args_name, args_value in tool_call.arguments|items %} + {{- '\n' }} + {%- set args_value = args_value | tojson | safe if args_value is mapping or (args_value is sequence and args_value is not string) else args_value | string %} + {{- args_value }} + {{- '\n\n' }} + {%- endfor %} + {%- endif %} + {{- '\n' }} + {%- endfor %} + {%- endif %} + {{- '<|im_end|>\n' }} + {%- elif message.role == "tool" %} + {%- if loop.previtem and loop.previtem.role != "tool" %} + {{- '<|im_start|>user' }} + {%- endif %} + {{- '\n\n' }} + {{- content }} + {{- '\n' }} + {%- if not loop.last and loop.nextitem.role != "tool" %} + {{- '<|im_end|>\n' }} + {%- elif loop.last %} + {{- '<|im_end|>\n' }} + {%- endif %} + {%- else %} + {{- raise_exception('Unexpected message role.') }} + {%- endif %} +{%- endfor %} +{%- if add_generation_prompt %} + {{- '<|im_start|>assistant\n' }} + {%- if enable_thinking is defined and enable_thinking is false %} + {{- '\n\n\n\n' }} + {%- else %} + {{- '\n' }} + {%- endif %} +{%- endif %} \ No newline at end of file diff --git a/precise_coder/4b_rl_k1.0_f1ur/global_step_328/actor/huggingface/config.json b/precise_coder/4b_rl_k1.0_f1ur/global_step_328/actor/huggingface/config.json new file mode 100644 index 0000000000000000000000000000000000000000..0e8cd2d6f8b5c82e83b6479da2639aa4f7f24473 --- /dev/null +++ b/precise_coder/4b_rl_k1.0_f1ur/global_step_328/actor/huggingface/config.json @@ -0,0 +1,112 @@ +{ + "architectures": [ + "Qwen3_5ForConditionalGeneration" + ], + "bos_token_id": null, + "dtype": "bfloat16", + "eos_token_id": 248046, + "image_token_id": 248056, + "model_type": "qwen3_5", + "pad_token_id": 248044, + "text_config": { + "attention_bias": false, + "attention_dropout": 0.0, + "attn_output_gate": true, + "bos_token_id": null, + "dtype": "bfloat16", + "eos_token_id": 248044, + "full_attention_interval": 4, + "head_dim": 256, + "hidden_act": "silu", + "hidden_size": 2560, + "initializer_range": 0.02, + "intermediate_size": 9216, + "layer_types": [ + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention" + ], + "linear_conv_kernel_dim": 4, + "linear_key_head_dim": 128, + "linear_num_key_heads": 16, + "linear_num_value_heads": 32, + "linear_value_head_dim": 128, + "mamba_ssm_dtype": "float32", + "max_position_embeddings": 262144, + "mlp_only_layers": [], + "model_type": "qwen3_5_text", + "mtp_num_hidden_layers": 0, + "mtp_use_dedicated_embeddings": false, + "num_attention_heads": 16, + "num_hidden_layers": 32, + "num_key_value_heads": 4, + "pad_token_id": null, + "partial_rotary_factor": 0.25, + "rms_norm_eps": 1e-06, + "rope_parameters": { + "mrope_interleaved": true, + "mrope_section": [ + 11, + 11, + 10 + ], + "partial_rotary_factor": 0.25, + "rope_theta": 10000000, + "rope_type": "default" + }, + "tie_word_embeddings": true, + "use_cache": true, + "vocab_size": 248320 + }, + "tie_word_embeddings": true, + "transformers_version": "5.10.2", + "video_token_id": 248057, + "vision_config": { + "deepstack_visual_indexes": [], + "depth": 24, + "dtype": "bfloat16", + "hidden_act": "gelu_pytorch_tanh", + "hidden_size": 1024, + "in_channels": 3, + "initializer_range": 0.02, + "intermediate_size": 4096, + "model_type": "qwen3_5_vision", + "num_heads": 16, + "num_position_embeddings": 2304, + "out_hidden_size": 2560, + "patch_size": 16, + "spatial_merge_size": 2, + "temporal_patch_size": 2 + }, + "vision_end_token_id": 248054, + "vision_start_token_id": 248053 +} diff --git a/precise_coder/4b_rl_k1.0_f1ur/global_step_328/actor/huggingface/generation_config.json b/precise_coder/4b_rl_k1.0_f1ur/global_step_328/actor/huggingface/generation_config.json new file mode 100644 index 0000000000000000000000000000000000000000..a8f50cfe9f041954a2175966a9ef6f88480f4769 --- /dev/null +++ b/precise_coder/4b_rl_k1.0_f1ur/global_step_328/actor/huggingface/generation_config.json @@ -0,0 +1,9 @@ +{ + "_from_model_config": true, + "eos_token_id": 248046, + "output_attentions": false, + "output_hidden_states": false, + "pad_token_id": 248044, + "transformers_version": "5.10.2", + "use_cache": true +} diff --git a/precise_coder/4b_rl_k1.0_f1ur/global_step_328/actor/huggingface/processor_config.json b/precise_coder/4b_rl_k1.0_f1ur/global_step_328/actor/huggingface/processor_config.json new file mode 100644 index 0000000000000000000000000000000000000000..33818c7f9e991ad735fd240209f4fa73e6c28c50 --- /dev/null +++ b/precise_coder/4b_rl_k1.0_f1ur/global_step_328/actor/huggingface/processor_config.json @@ -0,0 +1,60 @@ +{ + "image_processor": { + "do_convert_rgb": true, + "do_normalize": true, + "do_rescale": true, + "do_resize": true, + "image_mean": [ + 0.5, + 0.5, + 0.5 + ], + "image_processor_type": "Qwen2VLImageProcessor", + "image_std": [ + 0.5, + 0.5, + 0.5 + ], + "merge_size": 2, + "patch_size": 16, + "resample": 3, + "rescale_factor": 0.00392156862745098, + "size": { + "longest_edge": 16777216, + "shortest_edge": 65536 + }, + "temporal_patch_size": 2 + }, + "processor_class": "Qwen3VLProcessor", + "video_processor": { + "do_convert_rgb": true, + "do_normalize": true, + "do_rescale": true, + "do_resize": true, + "do_sample_frames": true, + "fps": 2, + "image_mean": [ + 0.5, + 0.5, + 0.5 + ], + "image_std": [ + 0.5, + 0.5, + 0.5 + ], + "max_frames": 768, + "merge_size": 2, + "min_frames": 4, + "patch_size": 16, + "resample": 3, + "rescale_factor": 0.00392156862745098, + "return_metadata": false, + "size": { + "longest_edge": 25165824, + "shortest_edge": 4096 + }, + "temporal_patch_size": 2, + "video_processor_type": "Qwen3VLVideoProcessor" + } +} diff --git a/precise_coder/4b_rl_k1.0_f1ur/global_step_328/actor/huggingface/tokenizer_config.json b/precise_coder/4b_rl_k1.0_f1ur/global_step_328/actor/huggingface/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..1d134cd298be1e3be25db393d93a1cefe80e3214 --- /dev/null +++ b/precise_coder/4b_rl_k1.0_f1ur/global_step_328/actor/huggingface/tokenizer_config.json @@ -0,0 +1,33 @@ +{ + "add_prefix_space": false, + "audio_bos_token": "<|audio_start|>", + "audio_eos_token": "<|audio_end|>", + "audio_token": "<|audio_pad|>", + "backend": "tokenizers", + "bos_token": null, + "clean_up_tokenization_spaces": false, + "eos_token": "<|im_end|>", + "errors": "replace", + "image_token": "<|image_pad|>", + "is_local": true, + "local_files_only": false, + "model_max_length": 262144, + "model_specific_special_tokens": { + "audio_bos_token": "<|audio_start|>", + "audio_eos_token": "<|audio_end|>", + "audio_token": "<|audio_pad|>", + "image_token": "<|image_pad|>", + "video_token": "<|video_pad|>", + "vision_bos_token": "<|vision_start|>", + "vision_eos_token": "<|vision_end|>" + }, + "pad_token": "<|endoftext|>", + "pretokenize_regex": "(?i:'s|'t|'re|'ve|'m|'ll|'d)|[^\\r\\n\\p{L}\\p{N}]?[\\p{L}\\p{M}]+|\\p{N}| ?[^\\s\\p{L}\\p{M}\\p{N}]+[\\r\\n]*|\\s*[\\r\\n]+|\\s+(?!\\S)|\\s+", + "processor_class": "Qwen3VLProcessor", + "split_special_tokens": false, + "tokenizer_class": "Qwen2Tokenizer", + "unk_token": null, + "video_token": "<|video_pad|>", + "vision_bos_token": "<|vision_start|>", + "vision_eos_token": "<|vision_end|>" +} diff --git a/precise_coder/4b_rl_k1.0_f1ur/latest_checkpointed_iteration.txt b/precise_coder/4b_rl_k1.0_f1ur/latest_checkpointed_iteration.txt new file mode 100644 index 0000000000000000000000000000000000000000..41a4a819ada66b2e8f7fea82f094eb1314f2e9ca --- /dev/null +++ b/precise_coder/4b_rl_k1.0_f1ur/latest_checkpointed_iteration.txt @@ -0,0 +1 @@ +328 \ No newline at end of file diff --git a/precise_coder/4b_rl_up/best_ckpt_state.json b/precise_coder/4b_rl_up/best_ckpt_state.json new file mode 100644 index 0000000000000000000000000000000000000000..c668981d2d8fab39c263e74b1dcdfaa5024565bd --- /dev/null +++ b/precise_coder/4b_rl_up/best_ckpt_state.json @@ -0,0 +1 @@ +{"best_val_score": 1.1583187833941826, "best_global_step": 225, "no_improve_rounds": 5} \ No newline at end of file diff --git a/precise_coder/4b_rl_up/latest_checkpointed_iteration.txt b/precise_coder/4b_rl_up/latest_checkpointed_iteration.txt new file mode 100644 index 0000000000000000000000000000000000000000..41a4a819ada66b2e8f7fea82f094eb1314f2e9ca --- /dev/null +++ b/precise_coder/4b_rl_up/latest_checkpointed_iteration.txt @@ -0,0 +1 @@ +328 \ No newline at end of file diff --git a/precise_coder/qwen35-4b-GRPO_unit_bs96_bypass/best_ckpt_state.json b/precise_coder/qwen35-4b-GRPO_unit_bs96_bypass/best_ckpt_state.json new file mode 100644 index 0000000000000000000000000000000000000000..064c48f552d895461413f20522618231fb33d1d7 --- /dev/null +++ b/precise_coder/qwen35-4b-GRPO_unit_bs96_bypass/best_ckpt_state.json @@ -0,0 +1 @@ +{"best_val_score": 0.6490495204388015, "best_global_step": 108, "no_improve_rounds": 0} \ No newline at end of file diff --git a/precise_coder/qwen35-4b-GRPO_unit_bs96_bypass/global_step_108/actor/fsdp_config.json b/precise_coder/qwen35-4b-GRPO_unit_bs96_bypass/global_step_108/actor/fsdp_config.json new file mode 100644 index 0000000000000000000000000000000000000000..17ff55630675ec23d6a1d79ec7a480aa25faa5de --- /dev/null +++ b/precise_coder/qwen35-4b-GRPO_unit_bs96_bypass/global_step_108/actor/fsdp_config.json @@ -0,0 +1,4 @@ +{ + "FSDP_version": 2, + "world_size": 4 +} \ No newline at end of file diff --git a/precise_coder/qwen35-4b-GRPO_unit_bs96_bypass/global_step_108/actor/huggingface/config.json b/precise_coder/qwen35-4b-GRPO_unit_bs96_bypass/global_step_108/actor/huggingface/config.json new file mode 100644 index 0000000000000000000000000000000000000000..0e8cd2d6f8b5c82e83b6479da2639aa4f7f24473 --- /dev/null +++ b/precise_coder/qwen35-4b-GRPO_unit_bs96_bypass/global_step_108/actor/huggingface/config.json @@ -0,0 +1,112 @@ +{ + "architectures": [ + "Qwen3_5ForConditionalGeneration" + ], + "bos_token_id": null, + "dtype": "bfloat16", + "eos_token_id": 248046, + "image_token_id": 248056, + "model_type": "qwen3_5", + "pad_token_id": 248044, + "text_config": { + "attention_bias": false, + "attention_dropout": 0.0, + "attn_output_gate": true, + "bos_token_id": null, + "dtype": "bfloat16", + "eos_token_id": 248044, + "full_attention_interval": 4, + "head_dim": 256, + "hidden_act": "silu", + "hidden_size": 2560, + "initializer_range": 0.02, + "intermediate_size": 9216, + "layer_types": [ + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention" + ], + "linear_conv_kernel_dim": 4, + "linear_key_head_dim": 128, + "linear_num_key_heads": 16, + "linear_num_value_heads": 32, + "linear_value_head_dim": 128, + "mamba_ssm_dtype": "float32", + "max_position_embeddings": 262144, + "mlp_only_layers": [], + "model_type": "qwen3_5_text", + "mtp_num_hidden_layers": 0, + "mtp_use_dedicated_embeddings": false, + "num_attention_heads": 16, + "num_hidden_layers": 32, + "num_key_value_heads": 4, + "pad_token_id": null, + "partial_rotary_factor": 0.25, + "rms_norm_eps": 1e-06, + "rope_parameters": { + "mrope_interleaved": true, + "mrope_section": [ + 11, + 11, + 10 + ], + "partial_rotary_factor": 0.25, + "rope_theta": 10000000, + "rope_type": "default" + }, + "tie_word_embeddings": true, + "use_cache": true, + "vocab_size": 248320 + }, + "tie_word_embeddings": true, + "transformers_version": "5.10.2", + "video_token_id": 248057, + "vision_config": { + "deepstack_visual_indexes": [], + "depth": 24, + "dtype": "bfloat16", + "hidden_act": "gelu_pytorch_tanh", + "hidden_size": 1024, + "in_channels": 3, + "initializer_range": 0.02, + "intermediate_size": 4096, + "model_type": "qwen3_5_vision", + "num_heads": 16, + "num_position_embeddings": 2304, + "out_hidden_size": 2560, + "patch_size": 16, + "spatial_merge_size": 2, + "temporal_patch_size": 2 + }, + "vision_end_token_id": 248054, + "vision_start_token_id": 248053 +} diff --git a/precise_coder/qwen35-4b-GRPO_unit_bs96_bypass/global_step_108/actor/huggingface/generation_config.json b/precise_coder/qwen35-4b-GRPO_unit_bs96_bypass/global_step_108/actor/huggingface/generation_config.json new file mode 100644 index 0000000000000000000000000000000000000000..a8f50cfe9f041954a2175966a9ef6f88480f4769 --- /dev/null +++ b/precise_coder/qwen35-4b-GRPO_unit_bs96_bypass/global_step_108/actor/huggingface/generation_config.json @@ -0,0 +1,9 @@ +{ + "_from_model_config": true, + "eos_token_id": 248046, + "output_attentions": false, + "output_hidden_states": false, + "pad_token_id": 248044, + "transformers_version": "5.10.2", + "use_cache": true +} diff --git a/precise_coder/qwen35-4b-GRPO_unit_bs96_bypass/global_step_108/actor/huggingface/processor_config.json b/precise_coder/qwen35-4b-GRPO_unit_bs96_bypass/global_step_108/actor/huggingface/processor_config.json new file mode 100644 index 0000000000000000000000000000000000000000..33818c7f9e991ad735fd240209f4fa73e6c28c50 --- /dev/null +++ b/precise_coder/qwen35-4b-GRPO_unit_bs96_bypass/global_step_108/actor/huggingface/processor_config.json @@ -0,0 +1,60 @@ +{ + "image_processor": { + "do_convert_rgb": true, + "do_normalize": true, + "do_rescale": true, + "do_resize": true, + "image_mean": [ + 0.5, + 0.5, + 0.5 + ], + "image_processor_type": "Qwen2VLImageProcessor", + "image_std": [ + 0.5, + 0.5, + 0.5 + ], + "merge_size": 2, + "patch_size": 16, + "resample": 3, + "rescale_factor": 0.00392156862745098, + "size": { + "longest_edge": 16777216, + "shortest_edge": 65536 + }, + "temporal_patch_size": 2 + }, + "processor_class": "Qwen3VLProcessor", + "video_processor": { + "do_convert_rgb": true, + "do_normalize": true, + "do_rescale": true, + "do_resize": true, + "do_sample_frames": true, + "fps": 2, + "image_mean": [ + 0.5, + 0.5, + 0.5 + ], + "image_std": [ + 0.5, + 0.5, + 0.5 + ], + "max_frames": 768, + "merge_size": 2, + "min_frames": 4, + "patch_size": 16, + "resample": 3, + "rescale_factor": 0.00392156862745098, + "return_metadata": false, + "size": { + "longest_edge": 25165824, + "shortest_edge": 4096 + }, + "temporal_patch_size": 2, + "video_processor_type": "Qwen3VLVideoProcessor" + } +} diff --git a/precise_coder/qwen35-4b-GRPO_unit_bs96_bypass/latest_checkpointed_iteration.txt b/precise_coder/qwen35-4b-GRPO_unit_bs96_bypass/latest_checkpointed_iteration.txt new file mode 100644 index 0000000000000000000000000000000000000000..615088b548a173a5102a2accdb3bfc18588f1752 --- /dev/null +++ b/precise_coder/qwen35-4b-GRPO_unit_bs96_bypass/latest_checkpointed_iteration.txt @@ -0,0 +1 @@ +108 \ No newline at end of file diff --git a/precise_coder_sft/4b-SFT-glm-1ep/global_step_31/huggingface/chat_template.jinja b/precise_coder_sft/4b-SFT-glm-1ep/global_step_31/huggingface/chat_template.jinja new file mode 100644 index 0000000000000000000000000000000000000000..a585dec894e63da457d9440ec6aa7caa16d20860 --- /dev/null +++ b/precise_coder_sft/4b-SFT-glm-1ep/global_step_31/huggingface/chat_template.jinja @@ -0,0 +1,154 @@ +{%- set image_count = namespace(value=0) %} +{%- set video_count = namespace(value=0) %} +{%- macro render_content(content, do_vision_count, is_system_content=false) %} + {%- if content is string %} + {{- content }} + {%- elif content is iterable and content is not mapping %} + {%- for item in content %} + {%- if 'image' in item or 'image_url' in item or item.type == 'image' %} + {%- if is_system_content %} + {{- raise_exception('System message cannot contain images.') }} + {%- endif %} + {%- if do_vision_count %} + {%- set image_count.value = image_count.value + 1 %} + {%- endif %} + {%- if add_vision_id %} + {{- 'Picture ' ~ image_count.value ~ ': ' }} + {%- endif %} + {{- '<|vision_start|><|image_pad|><|vision_end|>' }} + {%- elif 'video' in item or item.type == 'video' %} + {%- if is_system_content %} + {{- raise_exception('System message cannot contain videos.') }} + {%- endif %} + {%- if do_vision_count %} + {%- set video_count.value = video_count.value + 1 %} + {%- endif %} + {%- if add_vision_id %} + {{- 'Video ' ~ video_count.value ~ ': ' }} + {%- endif %} + {{- '<|vision_start|><|video_pad|><|vision_end|>' }} + {%- elif 'text' in item %} + {{- item.text }} + {%- else %} + {{- raise_exception('Unexpected item type in content.') }} + {%- endif %} + {%- endfor %} + {%- elif content is none or content is undefined %} + {{- '' }} + {%- else %} + {{- raise_exception('Unexpected content type.') }} + {%- endif %} +{%- endmacro %} +{%- if not messages %} + {{- raise_exception('No messages provided.') }} +{%- endif %} +{%- if tools and tools is iterable and tools is not mapping %} + {{- '<|im_start|>system\n' }} + {{- "# Tools\n\nYou have access to the following functions:\n\n" }} + {%- for tool in tools %} + {{- "\n" }} + {{- tool | tojson }} + {%- endfor %} + {{- "\n" }} + {{- '\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n\n\n\nvalue_1\n\n\nThis is the value for the second parameter\nthat can span\nmultiple lines\n\n\n\n\n\nReminder:\n- Function calls MUST follow the specified format: an inner block must be nested within XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls\n' }} + {%- if messages[0].role == 'system' %} + {%- set content = render_content(messages[0].content, false, true)|trim %} + {%- if content %} + {{- '\n\n' + content }} + {%- endif %} + {%- endif %} + {{- '<|im_end|>\n' }} +{%- else %} + {%- if messages[0].role == 'system' %} + {%- set content = render_content(messages[0].content, false, true)|trim %} + {{- '<|im_start|>system\n' + 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" %} + {%- set content = render_content(message.content, false)|trim %} + {%- if not(content.startswith('') and content.endswith('')) %} + {%- set ns.multi_step_tool = false %} + {%- set ns.last_query_index = index %} + {%- endif %} + {%- endif %} +{%- endfor %} +{%- if ns.multi_step_tool %} + {{- raise_exception('No user query found in messages.') }} +{%- endif %} +{%- for message in messages %} + {%- set content = render_content(message.content, true)|trim %} + {%- if message.role == "system" %} + {%- if not loop.first %} + {{- raise_exception('System message must be at the beginning.') }} + {%- endif %} + {%- elif message.role == "user" %} + {{- '<|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 %} + {%- set reasoning_content = reasoning_content|trim %} + {%- if loop.index0 > ns.last_query_index %} + {{- '<|im_start|>' + message.role + '\n\n' + reasoning_content + '\n\n\n' + content }} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- if message.tool_calls and message.tool_calls is iterable and message.tool_calls is not mapping %} + {%- for tool_call in message.tool_calls %} + {%- if tool_call.function is defined %} + {%- set tool_call = tool_call.function %} + {%- endif %} + {%- if loop.first %} + {%- if content|trim %} + {{- '\n\n\n\n' }} + {%- else %} + {{- '\n\n' }} + {%- endif %} + {%- else %} + {{- '\n\n\n' }} + {%- endif %} + {%- if tool_call.arguments is defined %} + {%- for args_name, args_value in tool_call.arguments|items %} + {{- '\n' }} + {%- set args_value = args_value | tojson | safe if args_value is mapping or (args_value is sequence and args_value is not string) else args_value | string %} + {{- args_value }} + {{- '\n\n' }} + {%- endfor %} + {%- endif %} + {{- '\n' }} + {%- endfor %} + {%- endif %} + {{- '<|im_end|>\n' }} + {%- elif message.role == "tool" %} + {%- if loop.previtem and loop.previtem.role != "tool" %} + {{- '<|im_start|>user' }} + {%- endif %} + {{- '\n\n' }} + {{- content }} + {{- '\n' }} + {%- if not loop.last and loop.nextitem.role != "tool" %} + {{- '<|im_end|>\n' }} + {%- elif loop.last %} + {{- '<|im_end|>\n' }} + {%- endif %} + {%- else %} + {{- raise_exception('Unexpected message role.') }} + {%- endif %} +{%- endfor %} +{%- if add_generation_prompt %} + {{- '<|im_start|>assistant\n' }} + {%- if enable_thinking is defined and enable_thinking is false %} + {{- '\n\n\n\n' }} + {%- else %} + {{- '\n' }} + {%- endif %} +{%- endif %} \ No newline at end of file diff --git a/precise_coder_sft/4b-SFT-glm-1ep/global_step_31/huggingface/processor_config.json b/precise_coder_sft/4b-SFT-glm-1ep/global_step_31/huggingface/processor_config.json new file mode 100644 index 0000000000000000000000000000000000000000..33818c7f9e991ad735fd240209f4fa73e6c28c50 --- /dev/null +++ b/precise_coder_sft/4b-SFT-glm-1ep/global_step_31/huggingface/processor_config.json @@ -0,0 +1,60 @@ +{ + "image_processor": { + "do_convert_rgb": true, + "do_normalize": true, + "do_rescale": true, + "do_resize": true, + "image_mean": [ + 0.5, + 0.5, + 0.5 + ], + "image_processor_type": "Qwen2VLImageProcessor", + "image_std": [ + 0.5, + 0.5, + 0.5 + ], + "merge_size": 2, + "patch_size": 16, + "resample": 3, + "rescale_factor": 0.00392156862745098, + "size": { + "longest_edge": 16777216, + "shortest_edge": 65536 + }, + "temporal_patch_size": 2 + }, + "processor_class": "Qwen3VLProcessor", + "video_processor": { + "do_convert_rgb": true, + "do_normalize": true, + "do_rescale": true, + "do_resize": true, + "do_sample_frames": true, + "fps": 2, + "image_mean": [ + 0.5, + 0.5, + 0.5 + ], + "image_std": [ + 0.5, + 0.5, + 0.5 + ], + "max_frames": 768, + "merge_size": 2, + "min_frames": 4, + "patch_size": 16, + "resample": 3, + "rescale_factor": 0.00392156862745098, + "return_metadata": false, + "size": { + "longest_edge": 25165824, + "shortest_edge": 4096 + }, + "temporal_patch_size": 2, + "video_processor_type": "Qwen3VLVideoProcessor" + } +} diff --git a/precise_coder_sft/4b-SFT-rej32-trackA/global_step_28/huggingface/chat_template.jinja b/precise_coder_sft/4b-SFT-rej32-trackA/global_step_28/huggingface/chat_template.jinja new file mode 100644 index 0000000000000000000000000000000000000000..a585dec894e63da457d9440ec6aa7caa16d20860 --- /dev/null +++ b/precise_coder_sft/4b-SFT-rej32-trackA/global_step_28/huggingface/chat_template.jinja @@ -0,0 +1,154 @@ +{%- set image_count = namespace(value=0) %} +{%- set video_count = namespace(value=0) %} +{%- macro render_content(content, do_vision_count, is_system_content=false) %} + {%- if content is string %} + {{- content }} + {%- elif content is iterable and content is not mapping %} + {%- for item in content %} + {%- if 'image' in item or 'image_url' in item or item.type == 'image' %} + {%- if is_system_content %} + {{- raise_exception('System message cannot contain images.') }} + {%- endif %} + {%- if do_vision_count %} + {%- set image_count.value = image_count.value + 1 %} + {%- endif %} + {%- if add_vision_id %} + {{- 'Picture ' ~ image_count.value ~ ': ' }} + {%- endif %} + {{- '<|vision_start|><|image_pad|><|vision_end|>' }} + {%- elif 'video' in item or item.type == 'video' %} + {%- if is_system_content %} + {{- raise_exception('System message cannot contain videos.') }} + {%- endif %} + {%- if do_vision_count %} + {%- set video_count.value = video_count.value + 1 %} + {%- endif %} + {%- if add_vision_id %} + {{- 'Video ' ~ video_count.value ~ ': ' }} + {%- endif %} + {{- '<|vision_start|><|video_pad|><|vision_end|>' }} + {%- elif 'text' in item %} + {{- item.text }} + {%- else %} + {{- raise_exception('Unexpected item type in content.') }} + {%- endif %} + {%- endfor %} + {%- elif content is none or content is undefined %} + {{- '' }} + {%- else %} + {{- raise_exception('Unexpected content type.') }} + {%- endif %} +{%- endmacro %} +{%- if not messages %} + {{- raise_exception('No messages provided.') }} +{%- endif %} +{%- if tools and tools is iterable and tools is not mapping %} + {{- '<|im_start|>system\n' }} + {{- "# Tools\n\nYou have access to the following functions:\n\n" }} + {%- for tool in tools %} + {{- "\n" }} + {{- tool | tojson }} + {%- endfor %} + {{- "\n" }} + {{- '\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n\n\n\nvalue_1\n\n\nThis is the value for the second parameter\nthat can span\nmultiple lines\n\n\n\n\n\nReminder:\n- Function calls MUST follow the specified format: an inner block must be nested within XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls\n' }} + {%- if messages[0].role == 'system' %} + {%- set content = render_content(messages[0].content, false, true)|trim %} + {%- if content %} + {{- '\n\n' + content }} + {%- endif %} + {%- endif %} + {{- '<|im_end|>\n' }} +{%- else %} + {%- if messages[0].role == 'system' %} + {%- set content = render_content(messages[0].content, false, true)|trim %} + {{- '<|im_start|>system\n' + 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" %} + {%- set content = render_content(message.content, false)|trim %} + {%- if not(content.startswith('') and content.endswith('')) %} + {%- set ns.multi_step_tool = false %} + {%- set ns.last_query_index = index %} + {%- endif %} + {%- endif %} +{%- endfor %} +{%- if ns.multi_step_tool %} + {{- raise_exception('No user query found in messages.') }} +{%- endif %} +{%- for message in messages %} + {%- set content = render_content(message.content, true)|trim %} + {%- if message.role == "system" %} + {%- if not loop.first %} + {{- raise_exception('System message must be at the beginning.') }} + {%- endif %} + {%- elif message.role == "user" %} + {{- '<|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 %} + {%- set reasoning_content = reasoning_content|trim %} + {%- if loop.index0 > ns.last_query_index %} + {{- '<|im_start|>' + message.role + '\n\n' + reasoning_content + '\n\n\n' + content }} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- if message.tool_calls and message.tool_calls is iterable and message.tool_calls is not mapping %} + {%- for tool_call in message.tool_calls %} + {%- if tool_call.function is defined %} + {%- set tool_call = tool_call.function %} + {%- endif %} + {%- if loop.first %} + {%- if content|trim %} + {{- '\n\n\n\n' }} + {%- else %} + {{- '\n\n' }} + {%- endif %} + {%- else %} + {{- '\n\n\n' }} + {%- endif %} + {%- if tool_call.arguments is defined %} + {%- for args_name, args_value in tool_call.arguments|items %} + {{- '\n' }} + {%- set args_value = args_value | tojson | safe if args_value is mapping or (args_value is sequence and args_value is not string) else args_value | string %} + {{- args_value }} + {{- '\n\n' }} + {%- endfor %} + {%- endif %} + {{- '\n' }} + {%- endfor %} + {%- endif %} + {{- '<|im_end|>\n' }} + {%- elif message.role == "tool" %} + {%- if loop.previtem and loop.previtem.role != "tool" %} + {{- '<|im_start|>user' }} + {%- endif %} + {{- '\n\n' }} + {{- content }} + {{- '\n' }} + {%- if not loop.last and loop.nextitem.role != "tool" %} + {{- '<|im_end|>\n' }} + {%- elif loop.last %} + {{- '<|im_end|>\n' }} + {%- endif %} + {%- else %} + {{- raise_exception('Unexpected message role.') }} + {%- endif %} +{%- endfor %} +{%- if add_generation_prompt %} + {{- '<|im_start|>assistant\n' }} + {%- if enable_thinking is defined and enable_thinking is false %} + {{- '\n\n\n\n' }} + {%- else %} + {{- '\n' }} + {%- endif %} +{%- endif %} \ No newline at end of file diff --git a/precise_coder_sft/4b-SFT-rej32-trackA/global_step_28/huggingface/config.json b/precise_coder_sft/4b-SFT-rej32-trackA/global_step_28/huggingface/config.json new file mode 100644 index 0000000000000000000000000000000000000000..0e8cd2d6f8b5c82e83b6479da2639aa4f7f24473 --- /dev/null +++ b/precise_coder_sft/4b-SFT-rej32-trackA/global_step_28/huggingface/config.json @@ -0,0 +1,112 @@ +{ + "architectures": [ + "Qwen3_5ForConditionalGeneration" + ], + "bos_token_id": null, + "dtype": "bfloat16", + "eos_token_id": 248046, + "image_token_id": 248056, + "model_type": "qwen3_5", + "pad_token_id": 248044, + "text_config": { + "attention_bias": false, + "attention_dropout": 0.0, + "attn_output_gate": true, + "bos_token_id": null, + "dtype": "bfloat16", + "eos_token_id": 248044, + "full_attention_interval": 4, + "head_dim": 256, + "hidden_act": "silu", + "hidden_size": 2560, + "initializer_range": 0.02, + "intermediate_size": 9216, + "layer_types": [ + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention" + ], + "linear_conv_kernel_dim": 4, + "linear_key_head_dim": 128, + "linear_num_key_heads": 16, + "linear_num_value_heads": 32, + "linear_value_head_dim": 128, + "mamba_ssm_dtype": "float32", + "max_position_embeddings": 262144, + "mlp_only_layers": [], + "model_type": "qwen3_5_text", + "mtp_num_hidden_layers": 0, + "mtp_use_dedicated_embeddings": false, + "num_attention_heads": 16, + "num_hidden_layers": 32, + "num_key_value_heads": 4, + "pad_token_id": null, + "partial_rotary_factor": 0.25, + "rms_norm_eps": 1e-06, + "rope_parameters": { + "mrope_interleaved": true, + "mrope_section": [ + 11, + 11, + 10 + ], + "partial_rotary_factor": 0.25, + "rope_theta": 10000000, + "rope_type": "default" + }, + "tie_word_embeddings": true, + "use_cache": true, + "vocab_size": 248320 + }, + "tie_word_embeddings": true, + "transformers_version": "5.10.2", + "video_token_id": 248057, + "vision_config": { + "deepstack_visual_indexes": [], + "depth": 24, + "dtype": "bfloat16", + "hidden_act": "gelu_pytorch_tanh", + "hidden_size": 1024, + "in_channels": 3, + "initializer_range": 0.02, + "intermediate_size": 4096, + "model_type": "qwen3_5_vision", + "num_heads": 16, + "num_position_embeddings": 2304, + "out_hidden_size": 2560, + "patch_size": 16, + "spatial_merge_size": 2, + "temporal_patch_size": 2 + }, + "vision_end_token_id": 248054, + "vision_start_token_id": 248053 +} diff --git a/precise_coder_sft/4b-SFT-rej32-trackA/global_step_28/huggingface/tokenizer_config.json b/precise_coder_sft/4b-SFT-rej32-trackA/global_step_28/huggingface/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..1d134cd298be1e3be25db393d93a1cefe80e3214 --- /dev/null +++ b/precise_coder_sft/4b-SFT-rej32-trackA/global_step_28/huggingface/tokenizer_config.json @@ -0,0 +1,33 @@ +{ + "add_prefix_space": false, + "audio_bos_token": "<|audio_start|>", + "audio_eos_token": "<|audio_end|>", + "audio_token": "<|audio_pad|>", + "backend": "tokenizers", + "bos_token": null, + "clean_up_tokenization_spaces": false, + "eos_token": "<|im_end|>", + "errors": "replace", + "image_token": "<|image_pad|>", + "is_local": true, + "local_files_only": false, + "model_max_length": 262144, + "model_specific_special_tokens": { + "audio_bos_token": "<|audio_start|>", + "audio_eos_token": "<|audio_end|>", + "audio_token": "<|audio_pad|>", + "image_token": "<|image_pad|>", + "video_token": "<|video_pad|>", + "vision_bos_token": "<|vision_start|>", + "vision_eos_token": "<|vision_end|>" + }, + "pad_token": "<|endoftext|>", + "pretokenize_regex": "(?i:'s|'t|'re|'ve|'m|'ll|'d)|[^\\r\\n\\p{L}\\p{N}]?[\\p{L}\\p{M}]+|\\p{N}| ?[^\\s\\p{L}\\p{M}\\p{N}]+[\\r\\n]*|\\s*[\\r\\n]+|\\s+(?!\\S)|\\s+", + "processor_class": "Qwen3VLProcessor", + "split_special_tokens": false, + "tokenizer_class": "Qwen2Tokenizer", + "unk_token": null, + "video_token": "<|video_pad|>", + "vision_bos_token": "<|vision_start|>", + "vision_eos_token": "<|vision_end|>" +} diff --git a/precise_coder_sft/4b-SFT-rej32-trackC/global_step_18/huggingface/processor_config.json b/precise_coder_sft/4b-SFT-rej32-trackC/global_step_18/huggingface/processor_config.json new file mode 100644 index 0000000000000000000000000000000000000000..33818c7f9e991ad735fd240209f4fa73e6c28c50 --- /dev/null +++ b/precise_coder_sft/4b-SFT-rej32-trackC/global_step_18/huggingface/processor_config.json @@ -0,0 +1,60 @@ +{ + "image_processor": { + "do_convert_rgb": true, + "do_normalize": true, + "do_rescale": true, + "do_resize": true, + "image_mean": [ + 0.5, + 0.5, + 0.5 + ], + "image_processor_type": "Qwen2VLImageProcessor", + "image_std": [ + 0.5, + 0.5, + 0.5 + ], + "merge_size": 2, + "patch_size": 16, + "resample": 3, + "rescale_factor": 0.00392156862745098, + "size": { + "longest_edge": 16777216, + "shortest_edge": 65536 + }, + "temporal_patch_size": 2 + }, + "processor_class": "Qwen3VLProcessor", + "video_processor": { + "do_convert_rgb": true, + "do_normalize": true, + "do_rescale": true, + "do_resize": true, + "do_sample_frames": true, + "fps": 2, + "image_mean": [ + 0.5, + 0.5, + 0.5 + ], + "image_std": [ + 0.5, + 0.5, + 0.5 + ], + "max_frames": 768, + "merge_size": 2, + "min_frames": 4, + "patch_size": 16, + "resample": 3, + "rescale_factor": 0.00392156862745098, + "return_metadata": false, + "size": { + "longest_edge": 25165824, + "shortest_edge": 4096 + }, + "temporal_patch_size": 2, + "video_processor_type": "Qwen3VLVideoProcessor" + } +} diff --git a/precise_coder_sft/4b-SFT-rej32/global_step_32/huggingface/generation_config.json b/precise_coder_sft/4b-SFT-rej32/global_step_32/huggingface/generation_config.json new file mode 100644 index 0000000000000000000000000000000000000000..a8f50cfe9f041954a2175966a9ef6f88480f4769 --- /dev/null +++ b/precise_coder_sft/4b-SFT-rej32/global_step_32/huggingface/generation_config.json @@ -0,0 +1,9 @@ +{ + "_from_model_config": true, + "eos_token_id": 248046, + "output_attentions": false, + "output_hidden_states": false, + "pad_token_id": 248044, + "transformers_version": "5.10.2", + "use_cache": true +}