nightmedia commited on
Commit
44958ea
·
verified ·
1 Parent(s): 23fa103

Add files using upload-large-folder tool

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
README.md ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ {}
3
+ ---
4
+
5
+ # Qwen3.6-27B-Architect-Polaris2-Fable-B-qx86-hi-mlx
6
+
7
+ ## Use with mlx
8
+
9
+ ```bash
10
+ pip install mlx-lm
11
+ ```
12
+
13
+ ```python
14
+ from mlx_lm import load, generate
15
+
16
+ model, tokenizer = load("Qwen3.6-27B-Architect-Polaris2-Fable-B-qx86-hi-mlx")
17
+
18
+ prompt = "hello"
19
+
20
+ if tokenizer.chat_template is not None:
21
+ messages = [{"role": "user", "content": prompt}]
22
+ prompt = tokenizer.apply_chat_template(
23
+ messages, add_generation_prompt=True, return_dict=False,
24
+ )
25
+
26
+ response = generate(model, tokenizer, prompt=prompt, verbose=True)
27
+ ```
chat_template.jinja ADDED
@@ -0,0 +1,236 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {%- set enable_thinking = false %}
2
+ {%- set preserve_thinking = true %}
3
+ {%- set image_count = namespace(value=0) %}
4
+ {%- set video_count = namespace(value=0) %}
5
+ {%- macro render_content(content, do_vision_count, is_system_content=false) %}
6
+ {%- if content is string %}
7
+ {{- content }}
8
+ {%- elif content is iterable and content is not mapping %}
9
+ {%- for item in content %}
10
+ {%- if 'image' in item or 'image_url' in item or item.type == 'image' %}
11
+ {%- if is_system_content %}
12
+ {{- raise_exception('System message cannot contain images.') }}
13
+ {%- endif %}
14
+ {%- if do_vision_count %}
15
+ {%- set image_count.value = image_count.value + 1 %}
16
+ {%- endif %}
17
+ {%- if add_vision_id is defined and add_vision_id %}
18
+ {{- 'Picture ' ~ image_count.value ~ ': ' }}
19
+ {%- endif %}
20
+ {{- '<|vision_start|><|image_pad|><|vision_end|>' }}
21
+ {%- elif 'video' in item or item.type == 'video' %}
22
+ {%- if is_system_content %}
23
+ {{- raise_exception('System message cannot contain videos.') }}
24
+ {%- endif %}
25
+ {%- if do_vision_count %}
26
+ {%- set video_count.value = video_count.value + 1 %}
27
+ {%- endif %}
28
+ {%- if add_vision_id is defined and add_vision_id %}
29
+ {{- 'Video ' ~ video_count.value ~ ': ' }}
30
+ {%- endif %}
31
+ {{- '<|vision_start|><|video_pad|><|vision_end|>' }}
32
+ {%- elif 'text' in item %}
33
+ {{- item.text }}
34
+ {%- else %}
35
+ {{- raise_exception('Unexpected item type in content.') }}
36
+ {%- endif %}
37
+ {%- endfor %}
38
+ {%- elif content is none or content is undefined %}
39
+ {{- '' }}
40
+ {%- else %}
41
+ {{- raise_exception('Unexpected content type.') }}
42
+ {%- endif %}
43
+ {%- endmacro %}
44
+ {%- set ns_flags = namespace(enable_thinking=true) %}
45
+ {%- if enable_thinking is defined %}
46
+ {%- set ns_flags.enable_thinking = enable_thinking %}
47
+ {%- endif %}
48
+ {%- if not messages %}
49
+ {{- raise_exception('No messages provided.') }}
50
+ {%- endif %}
51
+ {%- if tools and tools is iterable and tools is not mapping %}
52
+ {{- '<|im_start|>system\n' }}
53
+ {{- "# Tools\n\nYou have access to the following functions:\n\n<tools>" }}
54
+ {%- for tool in tools %}
55
+ {{- "\n" }}
56
+ {{- tool | tojson }}
57
+ {%- endfor %}
58
+ {{- "\n</tools>" }}
59
+ {{- '\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>' }}
60
+ {%- if messages[0].role == 'system' or messages[0].role == 'developer' %}
61
+ {%- set content = render_content(messages[0].content, false, true)|trim %}
62
+ {%- if '<|think_off|>' in content %}
63
+ {%- set ns_flags.enable_thinking = false %}
64
+ {%- set content = content.replace('<|think_off|>', '') %}
65
+ {%- endif %}
66
+ {%- if '<|think_on|>' in content %}
67
+ {%- set ns_flags.enable_thinking = true %}
68
+ {%- set content = content.replace('<|think_on|>', '') %}
69
+ {%- endif %}
70
+ {%- if '<|think_forget|>' in content %}
71
+ {%- set ns_flags.preserve_thinking = false %}
72
+ {%- set content = content.replace('<|think_forget|>', '') %}
73
+ {%- endif %}
74
+ {%- if '<|think_remember|>' in content %}
75
+ {%- set ns_flags.preserve_thinking = true %}
76
+ {%- set content = content.replace('<|think_remember|>', '') %}
77
+ {%- endif %}
78
+ {%- set content = content.strip() %}
79
+ {%- if content %}
80
+ {{- '\n\n' + content }}
81
+ {%- endif %}
82
+ {%- endif %}
83
+ {{- '<|im_end|>\n' }}
84
+ {%- else %}
85
+ {%- if messages[0].role == 'system' or messages[0].role == 'developer' %}
86
+ {%- set content = render_content(messages[0].content, false, true)|trim %}
87
+ {%- if '<|think_off|>' in content %}
88
+ {%- set ns_flags.enable_thinking = false %}
89
+ {%- set content = content.replace('<|think_off|>', '') %}
90
+ {%- endif %}
91
+ {%- if '<|think_on|>' in content %}
92
+ {%- set ns_flags.enable_thinking = true %}
93
+ {%- set content = content.replace('<|think_on|>', '') %}
94
+ {%- endif %}
95
+ {%- if '<|think_forget|>' in content %}
96
+ {%- set ns_flags.preserve_thinking = false %}
97
+ {%- set content = content.replace('<|think_forget|>', '') %}
98
+ {%- endif %}
99
+ {%- if '<|think_remember|>' in content %}
100
+ {%- set ns_flags.preserve_thinking = true %}
101
+ {%- set content = content.replace('<|think_remember|>', '') %}
102
+ {%- endif %}
103
+ {%- set content = content.strip() %}
104
+ {{- '<|im_start|>system\n' + content + '<|im_end|>\n' }}
105
+ {%- endif %}
106
+ {%- endif %}
107
+ {%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}
108
+ {%- for message in messages[::-1] %}
109
+ {%- set index = (messages|length - 1) - loop.index0 %}
110
+ {%- if ns.multi_step_tool and message.role == "user" %}
111
+ {%- set content = render_content(message.content, false)|trim %}
112
+ {%- if not(content.startswith('<tool_response>') and content.endswith('</tool_response>')) %}
113
+ {%- set ns.multi_step_tool = false %}
114
+ {%- set ns.last_query_index = index %}
115
+ {%- endif %}
116
+ {%- endif %}
117
+ {%- endfor %}
118
+ {%- if ns.multi_step_tool %}
119
+ {{- raise_exception('No user query found in messages.') }}
120
+ {%- endif %}
121
+ {%- for message in messages %}
122
+ {%- set content = render_content(message.content, true)|trim %}
123
+ {%- if '<|think_off|>' in content %}
124
+ {%- set ns_flags.enable_thinking = false %}
125
+ {%- set content = content.replace('<|think_off|>', '') %}
126
+ {%- endif %}
127
+ {%- if '<|think_on|>' in content %}
128
+ {%- set ns_flags.enable_thinking = true %}
129
+ {%- set content = content.replace('<|think_on|>', '') %}
130
+ {%- endif %}
131
+ {%- if '<|think_forget|>' in content %}
132
+ {%- set ns_flags.preserve_thinking = false %}
133
+ {%- set content = content.replace('<|think_forget|>', '') %}
134
+ {%- endif %}
135
+ {%- if '<|think_remember|>' in content %}
136
+ {%- set ns_flags.preserve_thinking = true %}
137
+ {%- set content = content.replace('<|think_remember|>', '') %}
138
+ {%- endif %}
139
+ {%- set content = content.strip() %}
140
+ {%- if message.role == "system" or message.role == "developer" %}
141
+ {%- if not loop.first %}
142
+ {{- raise_exception('System message must be at the beginning.') }}
143
+ {%- endif %}
144
+ {%- elif message.role == "user" %}
145
+ {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }}
146
+ {%- elif message.role == "assistant" %}
147
+ {%- set reasoning_content = '' %}
148
+ {%- if message.reasoning_content is string %}
149
+ {%- set reasoning_content = message.reasoning_content %}
150
+ {%- else %}
151
+ {%- set has_think_tag = false %}
152
+ {%- set think_end_token = '</think>' %}
153
+ {%- if '</think>' in content %}
154
+ {%- set has_think_tag = true %}
155
+ {%- elif '</thinking>' in content %}
156
+ {%- set has_think_tag = true %}
157
+ {%- set think_end_token = '</thinking>' %}
158
+ {%- elif '<think>' in content %}
159
+ {%- set reasoning_content = content.split('<think>')[-1].lstrip('\n') %}
160
+ {%- set content = '' %}
161
+ {%- endif %}
162
+ {%- if has_think_tag %}
163
+ {%- set reasoning_content = content.split(think_end_token)[0].rstrip('\n').split('<think>')[-1].lstrip('\n') %}
164
+ {%- set content = content.split(think_end_token)[-1].lstrip('\n') %}
165
+ {%- endif %}
166
+ {%- endif %}
167
+ {%- set reasoning_content = reasoning_content|trim %}
168
+ {%- set show_think = false %}
169
+ {%- if loop.index0 > ns.last_query_index %}
170
+ {%- set show_think = true %}
171
+ {%- elif ns_flags.enable_thinking and (preserve_thinking is undefined or preserve_thinking is true) and reasoning_content|length > 0 %}
172
+ {%- set show_think = true %}
173
+ {%- endif %}
174
+ {%- if show_think %}
175
+ {{- '<|im_start|>' + message.role + '\n<think>\n' + reasoning_content + '\n</think>\n\n' + content }}
176
+ {%- else %}
177
+ {{- '<|im_start|>' + message.role + '\n' + content }}
178
+ {%- endif %}
179
+ {%- if message.tool_calls and message.tool_calls is iterable and message.tool_calls is not mapping %}
180
+ {%- for tool_call in message.tool_calls %}
181
+ {%- if tool_call.function is defined %}
182
+ {%- set tool_call = tool_call.function %}
183
+ {%- endif %}
184
+ {%- if loop.first %}
185
+ {%- if content|trim %}
186
+ {{- '\n\n<tool_call>\n<function=' + tool_call.name + '>\n' }}
187
+ {%- else %}
188
+ {{- '<tool_call>\n<function=' + tool_call.name + '>\n' }}
189
+ {%- endif %}
190
+ {%- else %}
191
+ {{- '\n<tool_call>\n<function=' + tool_call.name + '>\n' }}
192
+ {%- endif %}
193
+ {%- if tool_call.arguments is defined and tool_call.arguments is mapping %}
194
+ {%- if tool_call.arguments|length > 0 %}
195
+ {%- for args_name in tool_call.arguments %}
196
+ {%- set args_value = tool_call.arguments[args_name] %}
197
+ {{- '<parameter=' + args_name + '>\n' }}
198
+ {%- set args_value = args_value | string if args_value is string else args_value | tojson %}
199
+ {{- args_value }}
200
+ {{- '\n</parameter>\n' }}
201
+ {%- endfor %}
202
+ {%- endif %}
203
+ {%- elif tool_call.arguments is defined and tool_call.arguments is string %}
204
+ {%- if tool_call.arguments|trim|length > 0 %}
205
+ {{- tool_call.arguments }}
206
+ {{- '\n' }}
207
+ {%- endif %}
208
+ {%- endif %}
209
+ {{- '</function>\n</tool_call>' }}
210
+ {%- endfor %}
211
+ {%- endif %}
212
+ {{- '<|im_end|>\n' }}
213
+ {%- elif message.role == "tool" %}
214
+ {%- if loop.previtem and loop.previtem.role != "tool" %}
215
+ {{- '<|im_start|>user' }}
216
+ {%- endif %}
217
+ {{- '\n<tool_response>\n' }}
218
+ {{- content }}
219
+ {{- '\n</tool_response>' }}
220
+ {%- if not loop.last and loop.nextitem.role != "tool" %}
221
+ {{- '<|im_end|>\n' }}
222
+ {%- elif loop.last %}
223
+ {{- '<|im_end|>\n' }}
224
+ {%- endif %}
225
+ {%- else %}
226
+ {{- raise_exception('Unexpected message role.') }}
227
+ {%- endif %}
228
+ {%- endfor %}
229
+ {%- if add_generation_prompt %}
230
+ {{- '<|im_start|>assistant\n' }}
231
+ {%- if ns_flags.enable_thinking is false %}
232
+ {{- '<think>\n\n</think>\n\n' }}
233
+ {%- else %}
234
+ {{- '<think>\n' }}
235
+ {%- endif %}
236
+ {%- endif %}
config.json ADDED
The diff for this file is too large to render. See raw diff
 
generation_config.json ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "do_sample": true,
3
+ "eos_token_id": [
4
+ 248046,
5
+ 248046,
6
+ 248044
7
+ ],
8
+ "pad_token_id": 248044,
9
+ "temperature": 1.0,
10
+ "top_k": 20,
11
+ "top_p": 0.95,
12
+ "transformers_version": "5.12.1"
13
+ }
model-00001-of-00006.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2a30f01bc4f4ec96d812f05b302fa21edf67c3863000b5f6b7dbbb6ea3ccac28
3
+ size 5297739625
model-00002-of-00006.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0980af9eb5940152f43f82cc0a2d2830fe02cd9b7b19f743ad05bc9cf3bd1260
3
+ size 5348192299
model-00003-of-00006.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:219ae90d89027187e9dbf85d204c799c95f5ff6991668305556af97e2616d1cb
3
+ size 5340676095
model-00004-of-00006.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:aea5076f8eae45884d9d6442d7fe7e54c8b5a560a9d8beaac8e1d532f95ff6aa
3
+ size 5340676091
model-00005-of-00006.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:714c0b4753b286b2b074a808bee4c8ba858e58ff3f4c6a4e5da18886aebce914
3
+ size 4413642520
model-00006-of-00006.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:383dcbc46d33fbfe6b557cb9646f216a94b836e8b333faa8fb0c6114f1d37efb
3
+ size 1430323553
model.safetensors.index.json ADDED
The diff for this file is too large to render. See raw diff
 
preprocessor_config.json ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "size": {
3
+ "longest_edge": 16777216,
4
+ "shortest_edge": 65536
5
+ },
6
+ "patch_size": 16,
7
+ "temporal_patch_size": 2,
8
+ "merge_size": 2,
9
+ "image_mean": [
10
+ 0.5,
11
+ 0.5,
12
+ 0.5
13
+ ],
14
+ "image_std": [
15
+ 0.5,
16
+ 0.5,
17
+ 0.5
18
+ ],
19
+ "processor_class": "Qwen3VLProcessor",
20
+ "image_processor_type": "Qwen2VLImageProcessorFast"
21
+ }
processor_config.json ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "image_processor": {
3
+ "do_convert_rgb": true,
4
+ "do_normalize": true,
5
+ "do_rescale": true,
6
+ "image_mean": [
7
+ 0.5,
8
+ 0.5,
9
+ 0.5
10
+ ],
11
+ "image_processor_type": "Qwen3VLImageProcessor",
12
+ "image_std": [
13
+ 0.5,
14
+ 0.5,
15
+ 0.5
16
+ ],
17
+ "max_pixels": 16777216,
18
+ "merge_size": 2,
19
+ "min_pixels": 65536,
20
+ "patch_size": 16,
21
+ "rescale_factor": 0.00392156862745098,
22
+ "temporal_patch_size": 2
23
+ },
24
+ "processor_class": "Qwen3VLProcessor",
25
+ "video_processor": {
26
+ "do_convert_rgb": true,
27
+ "do_normalize": true,
28
+ "do_rescale": true,
29
+ "fps": 2.0,
30
+ "image_mean": [
31
+ 0.5,
32
+ 0.5,
33
+ 0.5
34
+ ],
35
+ "image_std": [
36
+ 0.5,
37
+ 0.5,
38
+ 0.5
39
+ ],
40
+ "max_frames": 768,
41
+ "max_pixels": 25165824,
42
+ "merge_size": 2,
43
+ "min_frames": 4,
44
+ "min_pixels": 4096,
45
+ "patch_size": 16,
46
+ "rescale_factor": 0.00392156862745098,
47
+ "temporal_patch_size": 2,
48
+ "video_processor_type": "Qwen3VLVideoProcessor"
49
+ }
50
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:06b9509352d2af50381ab2247e083b80d32d5c0aba91c272ca9ff729b6a0e523
3
+ size 19989325
tokenizer_config.json ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "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
+ "padding_side": "right",
26
+ "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+",
27
+ "processor_class": "Qwen3VLProcessor",
28
+ "split_special_tokens": false,
29
+ "tokenizer_class": "Qwen2Tokenizer",
30
+ "unk_token": null,
31
+ "video_token": "<|video_pad|>",
32
+ "vision_bos_token": "<|vision_start|>",
33
+ "vision_eos_token": "<|vision_end|>"
34
+ }
video_preprocessor_config.json ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "size": {
3
+ "longest_edge": 25165824,
4
+ "shortest_edge": 4096
5
+ },
6
+ "patch_size": 16,
7
+ "temporal_patch_size": 2,
8
+ "merge_size": 2,
9
+ "image_mean": [
10
+ 0.5,
11
+ 0.5,
12
+ 0.5
13
+ ],
14
+ "image_std": [
15
+ 0.5,
16
+ 0.5,
17
+ 0.5
18
+ ],
19
+ "processor_class": "Qwen3VLProcessor",
20
+ "video_processor_type": "Qwen3VLVideoProcessor"
21
+ }
vocab.json ADDED
The diff for this file is too large to render. See raw diff