danym commited on
Commit
7428a38
·
verified ·
1 Parent(s): 28e299b

stage1 v3pf qwen3_5_9b

Browse files
.gitattributes CHANGED
@@ -44,3 +44,4 @@ qwen3_5_0_8b_stage2_v3/vllm_compat/tokenizer.json filter=lfs diff=lfs merge=lfs
44
  qwen3_5_2b_stage2_v3/vllm_compat/tokenizer.json filter=lfs diff=lfs merge=lfs -text
45
  qwen3_5_9b_stage2_v3/vllm_compat/tokenizer.json filter=lfs diff=lfs merge=lfs -text
46
  stage1_v3_qwen3_6_27b/tokenizer.json filter=lfs diff=lfs merge=lfs -text
 
 
44
  qwen3_5_2b_stage2_v3/vllm_compat/tokenizer.json filter=lfs diff=lfs merge=lfs -text
45
  qwen3_5_9b_stage2_v3/vllm_compat/tokenizer.json filter=lfs diff=lfs merge=lfs -text
46
  stage1_v3_qwen3_6_27b/tokenizer.json filter=lfs diff=lfs merge=lfs -text
47
+ stage1_v3pf_qwen3_5_9b/tokenizer.json filter=lfs diff=lfs merge=lfs -text
stage1_v3pf_qwen3_5_9b/chat_template.jinja ADDED
@@ -0,0 +1,154 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {%- set image_count = namespace(value=0) %}
2
+ {%- set video_count = namespace(value=0) %}
3
+ {%- macro render_content(content, do_vision_count, is_system_content=false) %}
4
+ {%- if content is string %}
5
+ {{- content }}
6
+ {%- elif content is iterable and content is not mapping %}
7
+ {%- for item in content %}
8
+ {%- if 'image' in item or 'image_url' in item or item.type == 'image' %}
9
+ {%- if is_system_content %}
10
+ {{- raise_exception('System message cannot contain images.') }}
11
+ {%- endif %}
12
+ {%- if do_vision_count %}
13
+ {%- set image_count.value = image_count.value + 1 %}
14
+ {%- endif %}
15
+ {%- if add_vision_id %}
16
+ {{- 'Picture ' ~ image_count.value ~ ': ' }}
17
+ {%- endif %}
18
+ {{- '<|vision_start|><|image_pad|><|vision_end|>' }}
19
+ {%- elif 'video' in item or item.type == 'video' %}
20
+ {%- if is_system_content %}
21
+ {{- raise_exception('System message cannot contain videos.') }}
22
+ {%- endif %}
23
+ {%- if do_vision_count %}
24
+ {%- set video_count.value = video_count.value + 1 %}
25
+ {%- endif %}
26
+ {%- if add_vision_id %}
27
+ {{- 'Video ' ~ video_count.value ~ ': ' }}
28
+ {%- endif %}
29
+ {{- '<|vision_start|><|video_pad|><|vision_end|>' }}
30
+ {%- elif 'text' in item %}
31
+ {{- item.text }}
32
+ {%- else %}
33
+ {{- raise_exception('Unexpected item type in content.') }}
34
+ {%- endif %}
35
+ {%- endfor %}
36
+ {%- elif content is none or content is undefined %}
37
+ {{- '' }}
38
+ {%- else %}
39
+ {{- raise_exception('Unexpected content type.') }}
40
+ {%- endif %}
41
+ {%- endmacro %}
42
+ {%- if not messages %}
43
+ {{- raise_exception('No messages provided.') }}
44
+ {%- endif %}
45
+ {%- if tools and tools is iterable and tools is not mapping %}
46
+ {{- '<|im_start|>system\n' }}
47
+ {{- "# Tools\n\nYou have access to the following functions:\n\n<tools>" }}
48
+ {%- for tool in tools %}
49
+ {{- "\n" }}
50
+ {{- tool | tojson }}
51
+ {%- endfor %}
52
+ {{- "\n</tools>" }}
53
+ {{- '\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n<tool_call>\n<function=example_function_name>\n<parameter=example_parameter_1>\nvalue_1\n</parameter>\n<parameter=example_parameter_2>\nThis is the value for the second parameter\nthat can span\nmultiple lines\n</parameter>\n</function>\n</tool_call>\n\n<IMPORTANT>\nReminder:\n- Function calls MUST follow the specified format: an inner <function=...></function> block must be nested within <tool_call></tool_call> XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls\n</IMPORTANT>' }}
54
+ {%- if messages[0].role == 'system' %}
55
+ {%- set content = render_content(messages[0].content, false, true)|trim %}
56
+ {%- if content %}
57
+ {{- '\n\n' + content }}
58
+ {%- endif %}
59
+ {%- endif %}
60
+ {{- '<|im_end|>\n' }}
61
+ {%- else %}
62
+ {%- if messages[0].role == 'system' %}
63
+ {%- set content = render_content(messages[0].content, false, true)|trim %}
64
+ {{- '<|im_start|>system\n' + content + '<|im_end|>\n' }}
65
+ {%- endif %}
66
+ {%- endif %}
67
+ {%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}
68
+ {%- for message in messages[::-1] %}
69
+ {%- set index = (messages|length - 1) - loop.index0 %}
70
+ {%- if ns.multi_step_tool and message.role == "user" %}
71
+ {%- set content = render_content(message.content, false)|trim %}
72
+ {%- if not(content.startswith('<tool_response>') and content.endswith('</tool_response>')) %}
73
+ {%- set ns.multi_step_tool = false %}
74
+ {%- set ns.last_query_index = index %}
75
+ {%- endif %}
76
+ {%- endif %}
77
+ {%- endfor %}
78
+ {%- if ns.multi_step_tool %}
79
+ {{- raise_exception('No user query found in messages.') }}
80
+ {%- endif %}
81
+ {%- for message in messages %}
82
+ {%- set content = render_content(message.content, true)|trim %}
83
+ {%- if message.role == "system" %}
84
+ {%- if not loop.first %}
85
+ {{- raise_exception('System message must be at the beginning.') }}
86
+ {%- endif %}
87
+ {%- elif message.role == "user" %}
88
+ {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }}
89
+ {%- elif message.role == "assistant" %}
90
+ {%- set reasoning_content = '' %}
91
+ {%- if message.reasoning_content is string %}
92
+ {%- set reasoning_content = message.reasoning_content %}
93
+ {%- else %}
94
+ {%- if '</think>' in content %}
95
+ {%- set reasoning_content = content.split('</think>')[0].rstrip('\n').split('<think>')[-1].lstrip('\n') %}
96
+ {%- set content = content.split('</think>')[-1].lstrip('\n') %}
97
+ {%- endif %}
98
+ {%- endif %}
99
+ {%- set reasoning_content = reasoning_content|trim %}
100
+ {%- if loop.index0 > ns.last_query_index %}
101
+ {{- '<|im_start|>' + message.role + '\n<think>\n' + reasoning_content + '\n</think>\n\n' + content }}
102
+ {%- else %}
103
+ {{- '<|im_start|>' + message.role + '\n' + content }}
104
+ {%- endif %}
105
+ {%- if message.tool_calls and message.tool_calls is iterable and message.tool_calls is not mapping %}
106
+ {%- for tool_call in message.tool_calls %}
107
+ {%- if tool_call.function is defined %}
108
+ {%- set tool_call = tool_call.function %}
109
+ {%- endif %}
110
+ {%- if loop.first %}
111
+ {%- if content|trim %}
112
+ {{- '\n\n<tool_call>\n<function=' + tool_call.name + '>\n' }}
113
+ {%- else %}
114
+ {{- '<tool_call>\n<function=' + tool_call.name + '>\n' }}
115
+ {%- endif %}
116
+ {%- else %}
117
+ {{- '\n<tool_call>\n<function=' + tool_call.name + '>\n' }}
118
+ {%- endif %}
119
+ {%- if tool_call.arguments is defined %}
120
+ {%- for args_name, args_value in tool_call.arguments|items %}
121
+ {{- '<parameter=' + args_name + '>\n' }}
122
+ {%- 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 %}
123
+ {{- args_value }}
124
+ {{- '\n</parameter>\n' }}
125
+ {%- endfor %}
126
+ {%- endif %}
127
+ {{- '</function>\n</tool_call>' }}
128
+ {%- endfor %}
129
+ {%- endif %}
130
+ {{- '<|im_end|>\n' }}
131
+ {%- elif message.role == "tool" %}
132
+ {%- if loop.previtem and loop.previtem.role != "tool" %}
133
+ {{- '<|im_start|>user' }}
134
+ {%- endif %}
135
+ {{- '\n<tool_response>\n' }}
136
+ {{- content }}
137
+ {{- '\n</tool_response>' }}
138
+ {%- if not loop.last and loop.nextitem.role != "tool" %}
139
+ {{- '<|im_end|>\n' }}
140
+ {%- elif loop.last %}
141
+ {{- '<|im_end|>\n' }}
142
+ {%- endif %}
143
+ {%- else %}
144
+ {{- raise_exception('Unexpected message role.') }}
145
+ {%- endif %}
146
+ {%- endfor %}
147
+ {%- if add_generation_prompt %}
148
+ {{- '<|im_start|>assistant\n' }}
149
+ {%- if enable_thinking is defined and enable_thinking is false %}
150
+ {{- '<think>\n\n</think>\n\n' }}
151
+ {%- else %}
152
+ {{- '<think>\n' }}
153
+ {%- endif %}
154
+ {%- endif %}
stage1_v3pf_qwen3_5_9b/loss_curve.csv ADDED
@@ -0,0 +1,122 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ step,loss,lr,tok_per_s
2
+ 0,4.040378,1.000e-05,325.0
3
+ 5,4.111278,6.000e-05,10930.3
4
+ 10,3.869833,1.100e-04,11729.9
5
+ 15,3.834497,1.600e-04,8877.6
6
+ 20,3.855317,2.100e-04,11108.2
7
+ 25,3.887257,2.600e-04,11784.7
8
+ 30,3.779253,3.100e-04,11828.4
9
+ 35,3.612720,3.600e-04,11847.5
10
+ 40,3.425594,4.100e-04,11831.8
11
+ 45,3.322668,4.600e-04,11849.1
12
+ 50,3.133181,5.100e-04,11845.3
13
+ 55,2.865881,5.600e-04,11850.6
14
+ 60,2.771411,6.100e-04,11843.7
15
+ 65,2.899855,6.600e-04,8523.1
16
+ 70,2.869309,7.100e-04,11846.5
17
+ 75,2.785730,7.600e-04,11850.0
18
+ 80,2.703507,8.100e-04,11848.0
19
+ 85,2.104745,8.600e-04,11861.8
20
+ 90,2.139479,9.100e-04,11849.3
21
+ 95,2.476314,9.600e-04,11866.9
22
+ 100,2.215527,1.000e-03,11853.4
23
+ 105,2.182172,9.998e-04,11855.8
24
+ 110,2.225345,9.990e-04,11854.8
25
+ 115,2.236989,9.978e-04,11841.7
26
+ 120,1.996411,9.961e-04,11854.6
27
+ 125,1.689849,9.938e-04,11861.2
28
+ 130,1.718480,9.911e-04,11857.9
29
+ 135,1.570013,9.880e-04,11862.8
30
+ 140,1.777773,9.843e-04,11854.1
31
+ 145,1.606067,9.801e-04,11863.0
32
+ 150,1.449982,9.755e-04,11854.9
33
+ 155,1.395623,9.704e-04,11845.3
34
+ 160,1.436482,9.649e-04,11854.8
35
+ 165,1.526646,9.589e-04,11859.0
36
+ 170,1.482958,9.524e-04,11858.3
37
+ 175,1.394650,9.455e-04,11860.4
38
+ 180,1.379590,9.382e-04,11857.6
39
+ 185,1.274665,9.304e-04,11865.2
40
+ 190,1.492298,9.222e-04,11855.5
41
+ 195,1.491493,9.135e-04,11861.5
42
+ 200,1.479487,9.045e-04,11106.1
43
+ 205,1.335710,8.951e-04,11861.0
44
+ 210,1.544783,8.853e-04,11859.1
45
+ 215,1.456074,8.751e-04,8680.3
46
+ 220,1.472516,8.645e-04,11836.3
47
+ 225,1.375135,8.536e-04,11847.9
48
+ 230,1.400707,8.423e-04,11853.0
49
+ 235,1.376647,8.307e-04,11853.1
50
+ 240,1.212857,8.187e-04,11081.5
51
+ 245,1.478824,8.065e-04,11841.7
52
+ 250,1.603603,7.939e-04,11843.9
53
+ 255,1.500814,7.810e-04,11840.0
54
+ 260,1.409045,7.679e-04,11840.7
55
+ 265,1.282132,7.545e-04,11850.1
56
+ 270,1.177373,7.409e-04,11845.6
57
+ 275,1.160959,7.270e-04,11850.9
58
+ 280,1.132518,7.129e-04,11851.6
59
+ 285,1.088371,6.986e-04,11845.0
60
+ 290,1.430400,6.841e-04,11842.8
61
+ 295,1.293683,6.694e-04,11850.8
62
+ 300,1.219701,6.545e-04,9854.4
63
+ 305,1.453785,6.395e-04,11802.2
64
+ 310,1.433822,6.243e-04,11843.2
65
+ 315,1.371349,6.091e-04,11854.1
66
+ 320,1.263873,5.937e-04,11845.5
67
+ 325,1.292316,5.782e-04,11852.1
68
+ 330,1.162319,5.627e-04,11852.5
69
+ 335,1.161981,5.471e-04,11851.1
70
+ 340,1.325282,5.314e-04,11848.0
71
+ 345,1.246090,5.157e-04,11847.3
72
+ 350,1.209881,5.000e-04,11848.5
73
+ 355,1.163959,4.843e-04,10070.7
74
+ 360,1.396391,4.686e-04,11848.4
75
+ 365,1.464400,4.529e-04,11848.6
76
+ 370,1.394919,4.373e-04,11846.4
77
+ 375,1.259350,4.218e-04,11849.1
78
+ 380,1.083231,4.063e-04,11848.7
79
+ 385,1.189685,3.909e-04,11842.5
80
+ 390,1.233931,3.757e-04,11843.6
81
+ 395,1.344021,3.605e-04,11850.7
82
+ 400,1.177833,3.455e-04,11851.4
83
+ 405,1.276042,3.306e-04,11848.7
84
+ 410,1.288682,3.159e-04,11844.4
85
+ 415,1.210146,3.014e-04,11851.9
86
+ 420,1.263751,2.871e-04,11844.9
87
+ 425,1.115266,2.730e-04,11849.6
88
+ 430,1.129994,2.591e-04,11840.8
89
+ 435,1.280874,2.455e-04,11843.7
90
+ 440,1.150072,2.321e-04,11851.3
91
+ 445,1.272855,2.190e-04,11856.1
92
+ 450,1.116954,2.061e-04,10048.0
93
+ 455,1.230477,1.935e-04,11825.0
94
+ 460,1.225651,1.813e-04,11816.6
95
+ 465,1.264480,1.693e-04,11831.6
96
+ 470,1.217883,1.577e-04,11826.0
97
+ 475,1.236631,1.464e-04,11838.2
98
+ 480,1.195988,1.355e-04,11834.4
99
+ 485,1.227494,1.249e-04,11840.4
100
+ 490,1.237088,1.147e-04,11833.3
101
+ 495,1.195743,1.049e-04,11851.1
102
+ 500,1.212842,9.549e-05,11844.0
103
+ 505,1.217877,8.646e-05,11851.8
104
+ 510,1.207031,7.784e-05,11848.4
105
+ 515,1.197403,6.963e-05,11847.0
106
+ 520,1.217326,6.185e-05,11850.3
107
+ 525,1.271957,5.450e-05,11854.0
108
+ 530,1.264466,4.759e-05,10826.6
109
+ 535,1.244463,4.112e-05,11853.2
110
+ 540,1.302761,3.511e-05,11316.5
111
+ 545,1.265297,2.956e-05,11846.7
112
+ 550,1.175814,2.447e-05,11845.9
113
+ 555,1.151829,1.985e-05,11850.5
114
+ 560,1.158942,1.571e-05,11842.8
115
+ 565,1.216073,1.204e-05,11851.9
116
+ 570,1.345215,8.856e-06,11843.6
117
+ 575,1.251737,6.156e-06,11854.2
118
+ 580,1.285080,3.943e-06,11838.9
119
+ 585,1.421452,2.219e-06,11841.8
120
+ 590,1.351571,9.866e-07,11838.7
121
+ 595,1.389049,2.467e-07,11843.2
122
+ 599,1.335247,9.870e-09,11849.9
stage1_v3pf_qwen3_5_9b/stage1_summary.json ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model": "Qwen/Qwen3.5-9B",
3
+ "probe": "probe_results/qwen3_5_9b_v3pf.json",
4
+ "steps": 600,
5
+ "lr": 0.001,
6
+ "seq_len": 4096,
7
+ "batch_size": 1,
8
+ "d_idx": 16,
9
+ "elapsed_min": 3.70496234225,
10
+ "final_per_head_kl": {
11
+ "3": [
12
+ 1.5307061672210693,
13
+ 1.4760429859161377
14
+ ],
15
+ "7": [
16
+ 1.4086997509002686
17
+ ],
18
+ "11": [
19
+ 1.6310946941375732
20
+ ],
21
+ "15": [
22
+ 1.5815995931625366
23
+ ],
24
+ "19": [
25
+ 1.0981472730636597,
26
+ 1.2471306324005127,
27
+ 1.3031089305877686,
28
+ 1.4784331321716309,
29
+ 1.6598527431488037,
30
+ 1.2980384826660156
31
+ ],
32
+ "23": [
33
+ 1.1785054206848145,
34
+ 1.1001001596450806,
35
+ 1.0274646282196045,
36
+ 1.2863967418670654
37
+ ],
38
+ "27": [
39
+ 1.225365400314331,
40
+ 1.213803768157959,
41
+ 1.4813830852508545
42
+ ],
43
+ "31": [
44
+ 0.7547898292541504
45
+ ]
46
+ },
47
+ "final_mean_kl": 1.3147717588826229,
48
+ "final_max_kl": 1.6598527431488037
49
+ }
stage1_v3pf_qwen3_5_9b/state_dict.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9ebd3a56711d914e594052d1a59a9425b73a531a2577c835dc5353544cec0e03
3
+ size 325045
stage1_v3pf_qwen3_5_9b/tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:06b9509352d2af50381ab2247e083b80d32d5c0aba91c272ca9ff729b6a0e523
3
+ size 19989325
stage1_v3pf_qwen3_5_9b/tokenizer_config.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "audio_bos_token": "<|audio_start|>",
4
+ "audio_eos_token": "<|audio_end|>",
5
+ "audio_token": "<|audio_pad|>",
6
+ "backend": "tokenizers",
7
+ "bos_token": null,
8
+ "clean_up_tokenization_spaces": false,
9
+ "eos_token": "<|im_end|>",
10
+ "errors": "replace",
11
+ "image_token": "<|image_pad|>",
12
+ "is_local": false,
13
+ "local_files_only": false,
14
+ "model_max_length": 262144,
15
+ "model_specific_special_tokens": {
16
+ "audio_bos_token": "<|audio_start|>",
17
+ "audio_eos_token": "<|audio_end|>",
18
+ "audio_token": "<|audio_pad|>",
19
+ "image_token": "<|image_pad|>",
20
+ "video_token": "<|video_pad|>",
21
+ "vision_bos_token": "<|vision_start|>",
22
+ "vision_eos_token": "<|vision_end|>"
23
+ },
24
+ "pad_token": "<|endoftext|>",
25
+ "pretokenize_regex": "(?i:'s|'t|'re|'ve|'m|'ll|'d)|[^\\r\\n\\p{L}\\p{N}]?[\\p{L}\\p{M}]+|\\p{N}| ?[^\\s\\p{L}\\p{M}\\p{N}]+[\\r\\n]*|\\s*[\\r\\n]+|\\s+(?!\\S)|\\s+",
26
+ "split_special_tokens": false,
27
+ "tokenizer_class": "Qwen2Tokenizer",
28
+ "unk_token": null,
29
+ "video_token": "<|video_pad|>",
30
+ "vision_bos_token": "<|vision_start|>",
31
+ "vision_eos_token": "<|vision_end|>"
32
+ }