ur-dad-matt commited on
Commit
6aaf442
·
verified ·
1 Parent(s): b2d2fba

feat: v1.6 path-B code weights (text-only stripped)

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
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 (preserve_thinking is defined and preserve_thinking is true) or (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 | string if args_value is string else args_value | tojson | safe %}
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 %}
config.json ADDED
@@ -0,0 +1,244 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "Qwen3_5ForConditionalGeneration"
4
+ ],
5
+ "eos_token_id": [
6
+ 248046,
7
+ 248044
8
+ ],
9
+ "image_token_id": 248056,
10
+ "language_model_only": false,
11
+ "model_type": "qwen3_5",
12
+ "quantization": {
13
+ "group_size": 64,
14
+ "bits": 4,
15
+ "mode": "affine"
16
+ },
17
+ "quantization_config": {
18
+ "group_size": 64,
19
+ "bits": 4,
20
+ "mode": "affine"
21
+ },
22
+ "text_config": {
23
+ "attention_bias": false,
24
+ "attention_dropout": 0.0,
25
+ "attn_output_gate": true,
26
+ "bos_token_id": 248044,
27
+ "dtype": "bfloat16",
28
+ "eos_token_id": 248044,
29
+ "full_attention_interval": 4,
30
+ "head_dim": 256,
31
+ "hidden_act": "silu",
32
+ "hidden_size": 5120,
33
+ "initializer_range": 0.02,
34
+ "intermediate_size": 17408,
35
+ "layer_types": [
36
+ "linear_attention",
37
+ "linear_attention",
38
+ "linear_attention",
39
+ "full_attention",
40
+ "linear_attention",
41
+ "linear_attention",
42
+ "linear_attention",
43
+ "full_attention",
44
+ "linear_attention",
45
+ "linear_attention",
46
+ "linear_attention",
47
+ "full_attention",
48
+ "linear_attention",
49
+ "linear_attention",
50
+ "linear_attention",
51
+ "full_attention",
52
+ "linear_attention",
53
+ "linear_attention",
54
+ "linear_attention",
55
+ "full_attention",
56
+ "linear_attention",
57
+ "linear_attention",
58
+ "linear_attention",
59
+ "full_attention",
60
+ "linear_attention",
61
+ "linear_attention",
62
+ "linear_attention",
63
+ "full_attention",
64
+ "linear_attention",
65
+ "linear_attention",
66
+ "linear_attention",
67
+ "full_attention",
68
+ "linear_attention",
69
+ "linear_attention",
70
+ "linear_attention",
71
+ "full_attention",
72
+ "linear_attention",
73
+ "linear_attention",
74
+ "linear_attention",
75
+ "full_attention",
76
+ "linear_attention",
77
+ "linear_attention",
78
+ "linear_attention",
79
+ "full_attention",
80
+ "linear_attention",
81
+ "linear_attention",
82
+ "linear_attention",
83
+ "full_attention",
84
+ "linear_attention",
85
+ "linear_attention",
86
+ "linear_attention",
87
+ "full_attention",
88
+ "linear_attention",
89
+ "linear_attention",
90
+ "linear_attention",
91
+ "full_attention",
92
+ "linear_attention",
93
+ "linear_attention",
94
+ "linear_attention",
95
+ "full_attention",
96
+ "linear_attention",
97
+ "linear_attention",
98
+ "linear_attention",
99
+ "full_attention"
100
+ ],
101
+ "linear_conv_kernel_dim": 4,
102
+ "linear_key_head_dim": 128,
103
+ "linear_num_key_heads": 16,
104
+ "linear_num_value_heads": 48,
105
+ "linear_value_head_dim": 128,
106
+ "mamba_ssm_dtype": "float32",
107
+ "max_position_embeddings": 262144,
108
+ "model_type": "qwen3_5_text",
109
+ "mtp_num_hidden_layers": 1,
110
+ "mtp_use_dedicated_embeddings": false,
111
+ "num_attention_heads": 24,
112
+ "num_hidden_layers": 64,
113
+ "num_key_value_heads": 4,
114
+ "output_gate_type": "swish",
115
+ "pad_token_id": null,
116
+ "partial_rotary_factor": 0.25,
117
+ "rms_norm_eps": 1e-06,
118
+ "rope_parameters": {
119
+ "mrope_interleaved": true,
120
+ "mrope_section": [
121
+ 11,
122
+ 11,
123
+ 10
124
+ ],
125
+ "partial_rotary_factor": 0.25,
126
+ "rope_theta": 10000000,
127
+ "rope_type": "default"
128
+ },
129
+ "tie_word_embeddings": false,
130
+ "use_cache": true,
131
+ "vocab_size": 248320
132
+ },
133
+ "tie_word_embeddings": false,
134
+ "transformers_version": "4.57.1",
135
+ "video_token_id": 248057,
136
+ "vision_end_token_id": 248054,
137
+ "vision_start_token_id": 248053,
138
+ "attention_bias": false,
139
+ "attention_dropout": 0.0,
140
+ "attn_output_gate": true,
141
+ "bos_token_id": 248044,
142
+ "dtype": "bfloat16",
143
+ "full_attention_interval": 4,
144
+ "head_dim": 256,
145
+ "hidden_act": "silu",
146
+ "hidden_size": 5120,
147
+ "initializer_range": 0.02,
148
+ "intermediate_size": 17408,
149
+ "layer_types": [
150
+ "linear_attention",
151
+ "linear_attention",
152
+ "linear_attention",
153
+ "full_attention",
154
+ "linear_attention",
155
+ "linear_attention",
156
+ "linear_attention",
157
+ "full_attention",
158
+ "linear_attention",
159
+ "linear_attention",
160
+ "linear_attention",
161
+ "full_attention",
162
+ "linear_attention",
163
+ "linear_attention",
164
+ "linear_attention",
165
+ "full_attention",
166
+ "linear_attention",
167
+ "linear_attention",
168
+ "linear_attention",
169
+ "full_attention",
170
+ "linear_attention",
171
+ "linear_attention",
172
+ "linear_attention",
173
+ "full_attention",
174
+ "linear_attention",
175
+ "linear_attention",
176
+ "linear_attention",
177
+ "full_attention",
178
+ "linear_attention",
179
+ "linear_attention",
180
+ "linear_attention",
181
+ "full_attention",
182
+ "linear_attention",
183
+ "linear_attention",
184
+ "linear_attention",
185
+ "full_attention",
186
+ "linear_attention",
187
+ "linear_attention",
188
+ "linear_attention",
189
+ "full_attention",
190
+ "linear_attention",
191
+ "linear_attention",
192
+ "linear_attention",
193
+ "full_attention",
194
+ "linear_attention",
195
+ "linear_attention",
196
+ "linear_attention",
197
+ "full_attention",
198
+ "linear_attention",
199
+ "linear_attention",
200
+ "linear_attention",
201
+ "full_attention",
202
+ "linear_attention",
203
+ "linear_attention",
204
+ "linear_attention",
205
+ "full_attention",
206
+ "linear_attention",
207
+ "linear_attention",
208
+ "linear_attention",
209
+ "full_attention",
210
+ "linear_attention",
211
+ "linear_attention",
212
+ "linear_attention",
213
+ "full_attention"
214
+ ],
215
+ "linear_conv_kernel_dim": 4,
216
+ "linear_key_head_dim": 128,
217
+ "linear_num_key_heads": 16,
218
+ "linear_num_value_heads": 48,
219
+ "linear_value_head_dim": 128,
220
+ "mamba_ssm_dtype": "float32",
221
+ "max_position_embeddings": 262144,
222
+ "mtp_num_hidden_layers": 1,
223
+ "mtp_use_dedicated_embeddings": false,
224
+ "num_attention_heads": 24,
225
+ "num_hidden_layers": 64,
226
+ "num_key_value_heads": 4,
227
+ "output_gate_type": "swish",
228
+ "pad_token_id": null,
229
+ "partial_rotary_factor": 0.25,
230
+ "rms_norm_eps": 1e-06,
231
+ "rope_parameters": {
232
+ "mrope_interleaved": true,
233
+ "mrope_section": [
234
+ 11,
235
+ 11,
236
+ 10
237
+ ],
238
+ "partial_rotary_factor": 0.25,
239
+ "rope_theta": 10000000,
240
+ "rope_type": "default"
241
+ },
242
+ "use_cache": true,
243
+ "vocab_size": 248320
244
+ }
configuration.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"framework":"Pytorch","task":"image-text-to-text"}
generation_config.json ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "do_sample": true,
3
+ "temperature": 0.2,
4
+ "top_p": 0.95,
5
+ "top_k": 20,
6
+ "repetition_penalty": 1.0,
7
+ "pad_token_id": 151643,
8
+ "eos_token_id": [151645, 151643],
9
+ "_outlier_tier": "code",
10
+ "_outlier_note": "Code-tuned defaults: lower temperature for deterministic generation, top_p 0.95. The accompanying README has the recommended system prompt for code workflows."
11
+ }
model-00001-of-00003.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1cc590bd94f624543cd789a436fb3196dbb0659b291ef3ec252a74eae3d47d4f
3
+ size 4421770824
model-00002-of-00003.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bfd33da317db8686affffea5bec609ca1e0fe1d7def2783386327fb8ccbfd660
3
+ size 5354185122
model-00003-of-00003.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:455362c6ca92c111ef188024a1e43f46dd6d27c25c0b9039ee72445d2e3fd28c
3
+ size 5357087517
model.safetensors.index.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:87a7830d63fcf43bf241c3c5242e96e62dd3fdc29224ca26fed8ea333db72de4
3
+ size 19989343
tokenizer_config.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "audio_bos_token": "<|audio_start|>",
4
+ "audio_eos_token": "<|audio_end|>",
5
+ "audio_token": "<|audio_pad|>",
6
+ "backend": "tokenizers",
7
+ "bos_token": null,
8
+ "clean_up_tokenization_spaces": false,
9
+ "eos_token": "<|im_end|>",
10
+ "errors": "replace",
11
+ "image_token": "<|image_pad|>",
12
+ "is_local": true,
13
+ "model_max_length": 262144,
14
+ "model_specific_special_tokens": {
15
+ "audio_bos_token": "<|audio_start|>",
16
+ "audio_eos_token": "<|audio_end|>",
17
+ "audio_token": "<|audio_pad|>",
18
+ "image_token": "<|image_pad|>",
19
+ "video_token": "<|video_pad|>",
20
+ "vision_bos_token": "<|vision_start|>",
21
+ "vision_eos_token": "<|vision_end|>"
22
+ },
23
+ "pad_token": "<|endoftext|>",
24
+ "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+",
25
+ "processor_class": "Qwen3VLProcessor",
26
+ "split_special_tokens": false,
27
+ "tokenizer_class": "TokenizersBackend",
28
+ "unk_token": null,
29
+ "video_token": "<|video_pad|>",
30
+ "vision_bos_token": "<|vision_start|>",
31
+ "vision_eos_token": "<|vision_end|>"
32
+ }
vocab.json ADDED
The diff for this file is too large to render. See raw diff