Youssofal commited on
Commit
b8825d6
·
verified ·
1 Parent(s): 03acbe4

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,108 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ library_name: mlx
4
+ base_model:
5
+ - Qwen/Qwen3.5-4B
6
+ - mlx-community/Qwen3.5-4B-MLX-8bit
7
+ tags:
8
+ - mlx
9
+ - mtplx
10
+ - qwen3_5
11
+ - speculative-decoding
12
+ - mtp
13
+ - q8
14
+ - 8-bit
15
+ pipeline_tag: image-text-to-text
16
+ ---
17
+
18
+ # Qwen3.5-4B Optimized MTPLX
19
+
20
+ Q8-trunk MTPLX speed-test artifact for Apple Silicon.
21
+
22
+ This model uses the public `mlx-community/Qwen3.5-4B-MLX-8bit` MLX affine 8-bit trunk and grafts back
23
+ the official native MTP head from `Qwen/Qwen3.5-4B`.
24
+ The MTP head is stored as `mtp.safetensors`; layer-0 attention/MLP linears are quantized to 4-bit affine group64, while `mtp.fc` and the MTP norms stay BF16.
25
+
26
+ ## Intended Use
27
+
28
+ Use this as a quick MTPLX download/load/speed-path test model:
29
+
30
+ ```bash
31
+ mtplx start
32
+ ```
33
+
34
+ Choose `Custom Hugging Face repo`, then enter:
35
+
36
+ ```text
37
+ Youssofal/Qwen3.5-4B-Optimized-MTPLX
38
+ ```
39
+
40
+ ## Artifact Layout
41
+
42
+ - Trunk: MLX affine 8-bit, group size 64
43
+ - MTP sidecar: official Qwen3.5-4B MTP tensors
44
+ - MTP sidecar quantization: body-int4
45
+ - Runtime contract: `mtplx_runtime.json`
46
+ - MTPLX default: depth 2, target temperature 0.6, draft temperature 0.7
47
+
48
+ ## Local Smoke Result
49
+
50
+ On the local Apple Silicon MTPLX workstation, the depth-2 speed path measured
51
+ 105.21 tok/s versus 75.63 tok/s AR on the warm-code prompt
52
+ (`max_tokens=48`, `temperature=0.6`, `top_p=0.95`, `top_k=20`).
53
+
54
+ This Q8 artifact had the best multiplier in the local one-prompt matrix. The Q4
55
+ artifact remains faster in absolute tok/s because the 8-bit trunk has a slower
56
+ AR baseline.
57
+
58
+ ## Build Stats
59
+
60
+ ```json
61
+ {
62
+ "bits": 4,
63
+ "group_size": 64,
64
+ "mode": "affine",
65
+ "output_size_bytes": 86701040,
66
+ "output_tensor_count": 29,
67
+ "policy": "cyankiwi",
68
+ "quantization": "body-int4",
69
+ "quantized_linears": {
70
+ "mtp.layers.0.mlp.down_proj": {
71
+ "bits": 4,
72
+ "group_size": 64,
73
+ "mode": "affine"
74
+ },
75
+ "mtp.layers.0.mlp.gate_proj": {
76
+ "bits": 4,
77
+ "group_size": 64,
78
+ "mode": "affine"
79
+ },
80
+ "mtp.layers.0.mlp.up_proj": {
81
+ "bits": 4,
82
+ "group_size": 64,
83
+ "mode": "affine"
84
+ },
85
+ "mtp.layers.0.self_attn.k_proj": {
86
+ "bits": 4,
87
+ "group_size": 64,
88
+ "mode": "affine"
89
+ },
90
+ "mtp.layers.0.self_attn.o_proj": {
91
+ "bits": 4,
92
+ "group_size": 64,
93
+ "mode": "affine"
94
+ },
95
+ "mtp.layers.0.self_attn.q_proj": {
96
+ "bits": 4,
97
+ "group_size": 64,
98
+ "mode": "affine"
99
+ },
100
+ "mtp.layers.0.self_attn.v_proj": {
101
+ "bits": 4,
102
+ "group_size": 64,
103
+ "mode": "affine"
104
+ }
105
+ },
106
+ "source_tensor_count": 15
107
+ }
108
+ ```
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 %}
config.json ADDED
@@ -0,0 +1,156 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "Qwen3_5ForConditionalGeneration"
4
+ ],
5
+ "image_token_id": 248056,
6
+ "library_name": "mlx",
7
+ "mlx_lm_extra_tensors": {
8
+ "mtp_file": "mtp.safetensors",
9
+ "mtp_tensor_count": 29
10
+ },
11
+ "model_type": "qwen3_5",
12
+ "mtplx_mtp_quantization": {
13
+ "bits": 4,
14
+ "description": "Official Qwen3.5-4B MTP head with layer-0 attention/MLP linears quantized to MLX affine INT4 group64; mtp.fc and norms stay BF16.",
15
+ "group_size": 64,
16
+ "mode": "affine",
17
+ "policy": "cyankiwi",
18
+ "prequantized": true
19
+ },
20
+ "mtplx_policy": {
21
+ "description": "mlx-community/Qwen3.5-4B-MLX-8bit trunk plus official Qwen3.5-4B MTP sidecar stored as body-int4 for MTPLX speed testing.",
22
+ "local_official_source": "/Users/youssof/.mtplx/sources/Qwen--Qwen3.5-4B",
23
+ "local_trunk_source": "/Users/youssof/.mtplx/sources/mlx-community--Qwen3.5-4B-MLX-8bit",
24
+ "mtp_quantization": {
25
+ "bits": 4,
26
+ "group_size": 64,
27
+ "linears": [
28
+ "mtp.layers.0.mlp.down_proj",
29
+ "mtp.layers.0.mlp.gate_proj",
30
+ "mtp.layers.0.mlp.up_proj",
31
+ "mtp.layers.0.self_attn.k_proj",
32
+ "mtp.layers.0.self_attn.o_proj",
33
+ "mtp.layers.0.self_attn.q_proj",
34
+ "mtp.layers.0.self_attn.v_proj"
35
+ ],
36
+ "mode": "affine",
37
+ "norms": "bf16"
38
+ },
39
+ "name": "qwen35-4b-q8-official-mtp-body-int4-speed",
40
+ "quantization_family": "mlx-affine-q8",
41
+ "source": "Qwen/Qwen3.5-4B",
42
+ "trunk_quantization": {
43
+ "bits": 8,
44
+ "group_size": 64,
45
+ "mode": "affine"
46
+ },
47
+ "trunk_source": "mlx-community/Qwen3.5-4B-MLX-8bit"
48
+ },
49
+ "quantization": {
50
+ "bits": 8,
51
+ "group_size": 64,
52
+ "mode": "affine"
53
+ },
54
+ "quantization_config": {
55
+ "bits": 8,
56
+ "group_size": 64,
57
+ "mode": "affine"
58
+ },
59
+ "text_config": {
60
+ "attention_bias": false,
61
+ "attention_dropout": 0.0,
62
+ "attn_output_gate": true,
63
+ "dtype": "bfloat16",
64
+ "eos_token_id": 248044,
65
+ "full_attention_interval": 4,
66
+ "head_dim": 256,
67
+ "hidden_act": "silu",
68
+ "hidden_size": 2560,
69
+ "initializer_range": 0.02,
70
+ "intermediate_size": 9216,
71
+ "layer_types": [
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
+ "linear_attention",
101
+ "linear_attention",
102
+ "linear_attention",
103
+ "full_attention"
104
+ ],
105
+ "linear_conv_kernel_dim": 4,
106
+ "linear_key_head_dim": 128,
107
+ "linear_num_key_heads": 16,
108
+ "linear_num_value_heads": 32,
109
+ "linear_value_head_dim": 128,
110
+ "mamba_ssm_dtype": "float32",
111
+ "max_position_embeddings": 262144,
112
+ "mlp_only_layers": [],
113
+ "model_type": "qwen3_5_text",
114
+ "mtp_num_hidden_layers": 1,
115
+ "mtp_use_dedicated_embeddings": false,
116
+ "num_attention_heads": 16,
117
+ "num_hidden_layers": 32,
118
+ "num_key_value_heads": 4,
119
+ "rms_norm_eps": 1e-06,
120
+ "rope_parameters": {
121
+ "mrope_interleaved": true,
122
+ "mrope_section": [
123
+ 11,
124
+ 11,
125
+ 10
126
+ ],
127
+ "partial_rotary_factor": 0.25,
128
+ "rope_theta": 10000000,
129
+ "rope_type": "default"
130
+ },
131
+ "tie_word_embeddings": true,
132
+ "use_cache": true,
133
+ "vocab_size": 248320
134
+ },
135
+ "tie_word_embeddings": true,
136
+ "transformers_version": "4.57.0.dev0",
137
+ "video_token_id": 248057,
138
+ "vision_config": {
139
+ "deepstack_visual_indexes": [],
140
+ "depth": 24,
141
+ "hidden_act": "gelu_pytorch_tanh",
142
+ "hidden_size": 1024,
143
+ "in_channels": 3,
144
+ "initializer_range": 0.02,
145
+ "intermediate_size": 4096,
146
+ "model_type": "qwen3_5",
147
+ "num_heads": 16,
148
+ "num_position_embeddings": 2304,
149
+ "out_hidden_size": 2560,
150
+ "patch_size": 16,
151
+ "spatial_merge_size": 2,
152
+ "temporal_patch_size": 2
153
+ },
154
+ "vision_end_token_id": 248054,
155
+ "vision_start_token_id": 248053
156
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:87c362fdb36bdee8e32ff5961bdceca58d26c2d9b00738543cc0e17e985b46ce
3
+ size 5136696107
model.safetensors.index.json ADDED
The diff for this file is too large to render. See raw diff
 
mtp.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b79a191268f85b5c052e289f310d08a0a21cede48b0ee977606f239b5d57fc1d
3
+ size 86701040
mtplx_runtime.json ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "arch_id": "qwen3-next-mtp",
3
+ "artifact_role": "small-q8-speed-test",
4
+ "base_trunk": "mlx-community/Qwen3.5-4B-MLX-8bit",
5
+ "exactness_baseline": {
6
+ "artifact": "/Users/youssof/.mtplx/qwen35_4b_q8trunk_mtp1_gate.json",
7
+ "gate": "mtp1-greedy-ar-equivalence",
8
+ "max_tokens": 16,
9
+ "matches": 1,
10
+ "scope": "greedy AR and MTP1 generated identical token sequence on the warm_code_continuation prompt",
11
+ "seed": 0,
12
+ "status": "passed",
13
+ "total": 1
14
+ },
15
+ "mtp_depth_max": 2,
16
+ "mtp_sidecar": "official Qwen/Qwen3.5-4B MTP tensors; quantization recorded in config.json",
17
+ "mtplx_version": "0.1.0-preview",
18
+ "recommended_draft_lm_head": {
19
+ "bits": 4,
20
+ "group_size": 64,
21
+ "mode": "affine"
22
+ },
23
+ "recommended_draft_sampler": {
24
+ "temperature": 0.7,
25
+ "top_k": 20,
26
+ "top_p": 0.95
27
+ },
28
+ "recommended_profile": "performance-cold",
29
+ "sampler": {
30
+ "temperature": 0.6,
31
+ "top_k": 20,
32
+ "top_p": 0.95
33
+ },
34
+ "speed_evidence": {
35
+ "acceptance_by_depth": [
36
+ 0.7647058823529411,
37
+ 0.47058823529411764
38
+ ],
39
+ "accepted_drafts": 21,
40
+ "ar_tok_s": 75.62701983984475,
41
+ "artifact": "/Users/youssof/.mtplx/qwen35_4b_depth_grid_q8_body4_draftt0p7.json",
42
+ "draft_lm_head": "8-bit tied embedding requantized as 4-bit affine group64 draft head",
43
+ "draft_temperature": 0.7,
44
+ "enable_thinking": false,
45
+ "generated_tokens": 48,
46
+ "mtp_depth": 2,
47
+ "mtp_tok_s": 105.20912101297236,
48
+ "note": "Q8 trunk gives the best multiplier in the local one-prompt matrix, but the Q4 trunk remains faster in absolute tok/s.",
49
+ "sampler": {
50
+ "temperature": 0.6,
51
+ "top_k": 20,
52
+ "top_p": 0.95
53
+ },
54
+ "speedup_vs_ar": 1.391157832686963
55
+ },
56
+ "verified_on": {
57
+ "hardware": "Apple Silicon local MTPLX workstation",
58
+ "machine_arch": "arm64",
59
+ "model": "Qwen3.5-4B-MTPLX-Optimized-Speed-Q8Trunk",
60
+ "timestamp": "2026-05-04T06:17:00+0100"
61
+ }
62
+ }
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,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "image_processor": {
3
+ "data_format": "channels_first",
4
+ "do_convert_rgb": true,
5
+ "do_normalize": true,
6
+ "do_rescale": true,
7
+ "do_resize": true,
8
+ "image_mean": [
9
+ 0.5,
10
+ 0.5,
11
+ 0.5
12
+ ],
13
+ "image_processor_type": "Qwen2VLImageProcessorFast",
14
+ "image_std": [
15
+ 0.5,
16
+ 0.5,
17
+ 0.5
18
+ ],
19
+ "merge_size": 2,
20
+ "patch_size": 16,
21
+ "resample": 3,
22
+ "rescale_factor": 0.00392156862745098,
23
+ "size": {
24
+ "longest_edge": 16777216,
25
+ "shortest_edge": 65536
26
+ },
27
+ "temporal_patch_size": 2
28
+ },
29
+ "processor_class": "Qwen3VLProcessor",
30
+ "video_processor": {
31
+ "data_format": "channels_first",
32
+ "default_to_square": true,
33
+ "do_convert_rgb": true,
34
+ "do_normalize": true,
35
+ "do_rescale": true,
36
+ "do_resize": true,
37
+ "do_sample_frames": true,
38
+ "fps": 2,
39
+ "image_mean": [
40
+ 0.5,
41
+ 0.5,
42
+ 0.5
43
+ ],
44
+ "image_std": [
45
+ 0.5,
46
+ 0.5,
47
+ 0.5
48
+ ],
49
+ "max_frames": 768,
50
+ "merge_size": 2,
51
+ "min_frames": 4,
52
+ "patch_size": 16,
53
+ "resample": 3,
54
+ "rescale_factor": 0.00392156862745098,
55
+ "return_metadata": false,
56
+ "size": {
57
+ "longest_edge": 25165824,
58
+ "shortest_edge": 4096
59
+ },
60
+ "temporal_patch_size": 2,
61
+ "video_processor_type": "Qwen3VLVideoProcessor"
62
+ }
63
+ }
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
+ }
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