sakamakismile commited on
Commit
f5acbf0
·
verified ·
1 Parent(s): 6f930dc

Upload folder using huggingface_hub

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,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ base_model: InternScience/Agents-A1-4B
4
+ base_model_relation: quantized
5
+ tags:
6
+ - nvfp4
7
+ - compressed-tensors
8
+ - llm-compressor
9
+ - vllm
10
+ - qwen3_5
11
+ - agent
12
+ ---
13
+
14
+ # Agents-A1-4B-NVFP4
15
+
16
+ NVFP4 (W4A4, compressed-tensors) quantization of [InternScience/Agents-A1-4B](https://huggingface.co/InternScience/Agents-A1-4B) — a 4B agentic model on the Qwen3.5 dense architecture (`Qwen3_5ForConditionalGeneration`: hybrid DeltaNet linear attention + full attention every 4 layers, Qwen3-VL vision tower, 262K context).
17
+
18
+ - **Size:** 3.97 GB (from ~8 GB bf16)
19
+ - **Scheme:** NVFP4 W4A4, group size 16, via llm-compressor 0.11.0 / compressed-tensors 0.16.0
20
+ - **Kept bf16:** `lm_head`, vision tower (`model.visual*`), DeltaNet `conv1d`
21
+ - **Calibration:** 32 samples × 8192 seq, `neuralmagic/calibration` (pure-CPU calibration — no GPU used in the bake)
22
+
23
+ ## Serve with vLLM
24
+
25
+ ```bash
26
+ vllm serve sakamakismile/Agents-A1-4B-NVFP4
27
+ ```
28
+
29
+ Quantization is auto-detected — no `--quantization` flag needed. Requires a GPU with FP4 support (SM120 Blackwell) for the NVFP4 kernels.
30
+
31
+ Note: the source config declares `mtp_num_hidden_layers: 1` but the released checkpoint ships no `mtp.*` weights, so there is no MTP draft head — serve without `--speculative-config`.
32
+
33
+ ## Recipe
34
+
35
+ Baked with the same validated recipe as [Qwen3.6-27B-MTP-pi-tune-NVFP4](https://huggingface.co/sakamakismile/Qwen3.6-27B-MTP-pi-tune-NVFP4) and [ThinkingCap-Qwen3.6-27B-NVFP4](https://huggingface.co/sakamakismile/ThinkingCap-Qwen3.6-27B-NVFP4) (same `qwen3_5` architecture family).
chat_template.jinja ADDED
@@ -0,0 +1,168 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ {%- set default_system_prompt -%}
43
+ You are Intern-A1, a deep research assistant developed by InternAgent Team, Shanghai Artificial Intelligence Laboratory. 你是Intern-A1, 一个由上海人工智能实验室的InternAgent团队开发的深度研究人工智能助手。 You can have natural multi-turn conversations with users on any topic.
44
+
45
+ ## Daily Chat & Simple Questions
46
+ For everyday conversations, greetings, opinions, coding help, factual lookups, definitions, calculations, explanations, and any question you can confidently answer from your knowledge — just respond directly and naturally in the user's language as Intern-A1. Do NOT use any tools for these.
47
+
48
+ ## Research & Search Questions
49
+ Only when the user's question requires up-to-date information, in-depth investigation, multi-source verification, or involves recent events, niche topics, or anything you are uncertain about, use the available tools.
50
+
51
+ Research strategy:
52
+ - Start with a focused search query to get an overview.
53
+ - If the initial search is insufficient, refine your query with more specific terms.
54
+ - Stop searching once you have enough information to provide a comprehensive answer. Do not over-research.
55
+
56
+ Current date: 2026-07-14
57
+ {%- endset -%}
58
+ {%- if not messages %}
59
+ {{- raise_exception('No messages provided.') }}
60
+ {%- endif %}
61
+ {%- set user_system_content = render_content(messages[0].content, false, true)|trim if messages[0].role == 'system' else '' %}
62
+ {%- set system_content = user_system_content if user_system_content else default_system_prompt %}
63
+ {%- if tools and tools is iterable and tools is not mapping %}
64
+ {{- '<|im_start|>system\n' }}
65
+ {{- "# Tools\n\nYou have access to the following functions:\n\n<tools>" }}
66
+ {%- for tool in tools %}
67
+ {{- "\n" }}
68
+ {{- tool | tojson }}
69
+ {%- endfor %}
70
+ {{- "\n</tools>" }}
71
+ {{- '\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>' }}
72
+ {%- if system_content %}
73
+ {{- '\n\n' + system_content }}
74
+ {%- endif %}
75
+ {{- '<|im_end|>\n' }}
76
+ {%- else %}
77
+ {%- if system_content %}
78
+ {{- '<|im_start|>system\n' + system_content + '<|im_end|>\n' }}
79
+ {%- endif %}
80
+ {%- endif %}
81
+ {%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}
82
+ {%- for message in messages[::-1] %}
83
+ {%- set index = (messages|length - 1) - loop.index0 %}
84
+ {%- if ns.multi_step_tool and message.role == "user" %}
85
+ {%- set content = render_content(message.content, false)|trim %}
86
+ {%- if not(content.startswith('<tool_response>') and content.endswith('</tool_response>')) %}
87
+ {%- set ns.multi_step_tool = false %}
88
+ {%- set ns.last_query_index = index %}
89
+ {%- endif %}
90
+ {%- endif %}
91
+ {%- endfor %}
92
+ {%- if ns.multi_step_tool %}
93
+ {{- raise_exception('No user query found in messages.') }}
94
+ {%- endif %}
95
+ {%- for message in messages %}
96
+ {%- set content = render_content(message.content, true)|trim %}
97
+ {%- if message.role == "system" %}
98
+ {%- if not loop.first %}
99
+ {{- raise_exception('System message must be at the beginning.') }}
100
+ {%- endif %}
101
+ {%- elif message.role == "user" %}
102
+ {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }}
103
+ {%- elif message.role == "assistant" %}
104
+ {%- set reasoning_content = '' %}
105
+ {%- if message.reasoning_content is string %}
106
+ {%- set reasoning_content = message.reasoning_content %}
107
+ {%- else %}
108
+ {%- if '</think>' in content %}
109
+ {%- set reasoning_content = content.split('</think>')[0].rstrip('\n').split('<think>')[-1].lstrip('\n') %}
110
+ {%- set content = content.split('</think>')[-1].lstrip('\n') %}
111
+ {%- endif %}
112
+ {%- endif %}
113
+ {%- set reasoning_content = reasoning_content|trim %}
114
+ {%- if loop.index0 > ns.last_query_index %}
115
+ {{- '<|im_start|>' + message.role + '\n<think>\n' + reasoning_content + '\n</think>\n\n' + content }}
116
+ {%- else %}
117
+ {{- '<|im_start|>' + message.role + '\n' + content }}
118
+ {%- endif %}
119
+ {%- if message.tool_calls and message.tool_calls is iterable and message.tool_calls is not mapping %}
120
+ {%- for tool_call in message.tool_calls %}
121
+ {%- if tool_call.function is defined %}
122
+ {%- set tool_call = tool_call.function %}
123
+ {%- endif %}
124
+ {%- if loop.first %}
125
+ {%- if content|trim %}
126
+ {{- '\n\n<tool_call>\n<function=' + tool_call.name + '>\n' }}
127
+ {%- else %}
128
+ {{- '<tool_call>\n<function=' + tool_call.name + '>\n' }}
129
+ {%- endif %}
130
+ {%- else %}
131
+ {{- '\n<tool_call>\n<function=' + tool_call.name + '>\n' }}
132
+ {%- endif %}
133
+ {%- if tool_call.arguments is defined %}
134
+ {%- for args_name, args_value in tool_call.arguments|items %}
135
+ {{- '<parameter=' + args_name + '>\n' }}
136
+ {%- 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 %}
137
+ {{- args_value }}
138
+ {{- '\n</parameter>\n' }}
139
+ {%- endfor %}
140
+ {%- endif %}
141
+ {{- '</function>\n</tool_call>' }}
142
+ {%- endfor %}
143
+ {%- endif %}
144
+ {{- '<|im_end|>\n' }}
145
+ {%- elif message.role == "tool" %}
146
+ {%- if loop.previtem and loop.previtem.role != "tool" %}
147
+ {{- '<|im_start|>user' }}
148
+ {%- endif %}
149
+ {{- '\n<tool_response>\n' }}
150
+ {{- content }}
151
+ {{- '\n</tool_response>' }}
152
+ {%- if not loop.last and loop.nextitem.role != "tool" %}
153
+ {{- '<|im_end|>\n' }}
154
+ {%- elif loop.last %}
155
+ {{- '<|im_end|>\n' }}
156
+ {%- endif %}
157
+ {%- else %}
158
+ {{- raise_exception('Unexpected message role.') }}
159
+ {%- endif %}
160
+ {%- endfor %}
161
+ {%- if add_generation_prompt %}
162
+ {{- '<|im_start|>assistant\n' }}
163
+ {%- if enable_thinking is defined and enable_thinking is false %}
164
+ {{- '<think>\n\n</think>\n\n' }}
165
+ {%- else %}
166
+ {{- '<think>\n' }}
167
+ {%- endif %}
168
+ {%- endif %}
config.json ADDED
@@ -0,0 +1,257 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "Qwen3_5ForConditionalGeneration"
4
+ ],
5
+ "dtype": "bfloat16",
6
+ "image_token_id": 248056,
7
+ "model_type": "qwen3_5",
8
+ "quantization_config": {
9
+ "config_groups": {
10
+ "group_0": {
11
+ "format": "nvfp4-pack-quantized",
12
+ "input_activations": {
13
+ "actorder": null,
14
+ "block_structure": null,
15
+ "dynamic": "local",
16
+ "group_size": 16,
17
+ "num_bits": 4,
18
+ "observer": "static_minmax",
19
+ "observer_kwargs": {},
20
+ "scale_dtype": "torch.float8_e4m3fn",
21
+ "strategy": "tensor_group",
22
+ "symmetric": true,
23
+ "type": "float",
24
+ "zp_dtype": null
25
+ },
26
+ "output_activations": null,
27
+ "targets": [
28
+ "Linear"
29
+ ],
30
+ "weights": {
31
+ "actorder": null,
32
+ "block_structure": null,
33
+ "dynamic": false,
34
+ "group_size": 16,
35
+ "num_bits": 4,
36
+ "observer": "memoryless_minmax",
37
+ "observer_kwargs": {},
38
+ "scale_dtype": "torch.float8_e4m3fn",
39
+ "strategy": "tensor_group",
40
+ "symmetric": true,
41
+ "type": "float",
42
+ "zp_dtype": null
43
+ }
44
+ }
45
+ },
46
+ "format": "nvfp4-pack-quantized",
47
+ "global_compression_ratio": null,
48
+ "ignore": [
49
+ "model.visual.blocks.0.attn.qkv",
50
+ "model.visual.blocks.0.attn.proj",
51
+ "model.visual.blocks.0.mlp.linear_fc1",
52
+ "model.visual.blocks.0.mlp.linear_fc2",
53
+ "model.visual.blocks.1.attn.qkv",
54
+ "model.visual.blocks.1.attn.proj",
55
+ "model.visual.blocks.1.mlp.linear_fc1",
56
+ "model.visual.blocks.1.mlp.linear_fc2",
57
+ "model.visual.blocks.2.attn.qkv",
58
+ "model.visual.blocks.2.attn.proj",
59
+ "model.visual.blocks.2.mlp.linear_fc1",
60
+ "model.visual.blocks.2.mlp.linear_fc2",
61
+ "model.visual.blocks.3.attn.qkv",
62
+ "model.visual.blocks.3.attn.proj",
63
+ "model.visual.blocks.3.mlp.linear_fc1",
64
+ "model.visual.blocks.3.mlp.linear_fc2",
65
+ "model.visual.blocks.4.attn.qkv",
66
+ "model.visual.blocks.4.attn.proj",
67
+ "model.visual.blocks.4.mlp.linear_fc1",
68
+ "model.visual.blocks.4.mlp.linear_fc2",
69
+ "model.visual.blocks.5.attn.qkv",
70
+ "model.visual.blocks.5.attn.proj",
71
+ "model.visual.blocks.5.mlp.linear_fc1",
72
+ "model.visual.blocks.5.mlp.linear_fc2",
73
+ "model.visual.blocks.6.attn.qkv",
74
+ "model.visual.blocks.6.attn.proj",
75
+ "model.visual.blocks.6.mlp.linear_fc1",
76
+ "model.visual.blocks.6.mlp.linear_fc2",
77
+ "model.visual.blocks.7.attn.qkv",
78
+ "model.visual.blocks.7.attn.proj",
79
+ "model.visual.blocks.7.mlp.linear_fc1",
80
+ "model.visual.blocks.7.mlp.linear_fc2",
81
+ "model.visual.blocks.8.attn.qkv",
82
+ "model.visual.blocks.8.attn.proj",
83
+ "model.visual.blocks.8.mlp.linear_fc1",
84
+ "model.visual.blocks.8.mlp.linear_fc2",
85
+ "model.visual.blocks.9.attn.qkv",
86
+ "model.visual.blocks.9.attn.proj",
87
+ "model.visual.blocks.9.mlp.linear_fc1",
88
+ "model.visual.blocks.9.mlp.linear_fc2",
89
+ "model.visual.blocks.10.attn.qkv",
90
+ "model.visual.blocks.10.attn.proj",
91
+ "model.visual.blocks.10.mlp.linear_fc1",
92
+ "model.visual.blocks.10.mlp.linear_fc2",
93
+ "model.visual.blocks.11.attn.qkv",
94
+ "model.visual.blocks.11.attn.proj",
95
+ "model.visual.blocks.11.mlp.linear_fc1",
96
+ "model.visual.blocks.11.mlp.linear_fc2",
97
+ "model.visual.blocks.12.attn.qkv",
98
+ "model.visual.blocks.12.attn.proj",
99
+ "model.visual.blocks.12.mlp.linear_fc1",
100
+ "model.visual.blocks.12.mlp.linear_fc2",
101
+ "model.visual.blocks.13.attn.qkv",
102
+ "model.visual.blocks.13.attn.proj",
103
+ "model.visual.blocks.13.mlp.linear_fc1",
104
+ "model.visual.blocks.13.mlp.linear_fc2",
105
+ "model.visual.blocks.14.attn.qkv",
106
+ "model.visual.blocks.14.attn.proj",
107
+ "model.visual.blocks.14.mlp.linear_fc1",
108
+ "model.visual.blocks.14.mlp.linear_fc2",
109
+ "model.visual.blocks.15.attn.qkv",
110
+ "model.visual.blocks.15.attn.proj",
111
+ "model.visual.blocks.15.mlp.linear_fc1",
112
+ "model.visual.blocks.15.mlp.linear_fc2",
113
+ "model.visual.blocks.16.attn.qkv",
114
+ "model.visual.blocks.16.attn.proj",
115
+ "model.visual.blocks.16.mlp.linear_fc1",
116
+ "model.visual.blocks.16.mlp.linear_fc2",
117
+ "model.visual.blocks.17.attn.qkv",
118
+ "model.visual.blocks.17.attn.proj",
119
+ "model.visual.blocks.17.mlp.linear_fc1",
120
+ "model.visual.blocks.17.mlp.linear_fc2",
121
+ "model.visual.blocks.18.attn.qkv",
122
+ "model.visual.blocks.18.attn.proj",
123
+ "model.visual.blocks.18.mlp.linear_fc1",
124
+ "model.visual.blocks.18.mlp.linear_fc2",
125
+ "model.visual.blocks.19.attn.qkv",
126
+ "model.visual.blocks.19.attn.proj",
127
+ "model.visual.blocks.19.mlp.linear_fc1",
128
+ "model.visual.blocks.19.mlp.linear_fc2",
129
+ "model.visual.blocks.20.attn.qkv",
130
+ "model.visual.blocks.20.attn.proj",
131
+ "model.visual.blocks.20.mlp.linear_fc1",
132
+ "model.visual.blocks.20.mlp.linear_fc2",
133
+ "model.visual.blocks.21.attn.qkv",
134
+ "model.visual.blocks.21.attn.proj",
135
+ "model.visual.blocks.21.mlp.linear_fc1",
136
+ "model.visual.blocks.21.mlp.linear_fc2",
137
+ "model.visual.blocks.22.attn.qkv",
138
+ "model.visual.blocks.22.attn.proj",
139
+ "model.visual.blocks.22.mlp.linear_fc1",
140
+ "model.visual.blocks.22.mlp.linear_fc2",
141
+ "model.visual.blocks.23.attn.qkv",
142
+ "model.visual.blocks.23.attn.proj",
143
+ "model.visual.blocks.23.mlp.linear_fc1",
144
+ "model.visual.blocks.23.mlp.linear_fc2",
145
+ "model.visual.merger.linear_fc1",
146
+ "model.visual.merger.linear_fc2",
147
+ "lm_head"
148
+ ],
149
+ "kv_cache_scheme": null,
150
+ "quant_method": "compressed-tensors",
151
+ "quantization_status": "compressed",
152
+ "sparsity_config": {},
153
+ "transform_config": {},
154
+ "version": "0.16.0"
155
+ },
156
+ "text_config": {
157
+ "attention_bias": false,
158
+ "attention_dropout": 0.0,
159
+ "attn_output_gate": true,
160
+ "bos_token_id": null,
161
+ "dtype": "bfloat16",
162
+ "eos_token_id": 248044,
163
+ "full_attention_interval": 4,
164
+ "head_dim": 256,
165
+ "hidden_act": "silu",
166
+ "hidden_size": 2560,
167
+ "initializer_range": 0.02,
168
+ "intermediate_size": 9216,
169
+ "layer_types": [
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
+ ],
203
+ "linear_conv_kernel_dim": 4,
204
+ "linear_key_head_dim": 128,
205
+ "linear_num_key_heads": 16,
206
+ "linear_num_value_heads": 32,
207
+ "linear_value_head_dim": 128,
208
+ "mamba_ssm_dtype": "float32",
209
+ "max_position_embeddings": 262144,
210
+ "mlp_only_layers": [],
211
+ "model_type": "qwen3_5_text",
212
+ "mtp_num_hidden_layers": 1,
213
+ "mtp_use_dedicated_embeddings": false,
214
+ "num_attention_heads": 16,
215
+ "num_hidden_layers": 32,
216
+ "num_key_value_heads": 4,
217
+ "pad_token_id": null,
218
+ "partial_rotary_factor": 0.25,
219
+ "rms_norm_eps": 1e-06,
220
+ "rope_parameters": {
221
+ "mrope_interleaved": true,
222
+ "mrope_section": [
223
+ 11,
224
+ 11,
225
+ 10
226
+ ],
227
+ "partial_rotary_factor": 0.25,
228
+ "rope_theta": 10000000,
229
+ "rope_type": "default"
230
+ },
231
+ "tie_word_embeddings": true,
232
+ "use_cache": true,
233
+ "vocab_size": 248320
234
+ },
235
+ "tie_word_embeddings": true,
236
+ "transformers_version": "5.9.0",
237
+ "video_token_id": 248057,
238
+ "vision_config": {
239
+ "deepstack_visual_indexes": [],
240
+ "depth": 24,
241
+ "dtype": "bfloat16",
242
+ "hidden_act": "gelu_pytorch_tanh",
243
+ "hidden_size": 1024,
244
+ "in_channels": 3,
245
+ "initializer_range": 0.02,
246
+ "intermediate_size": 4096,
247
+ "model_type": "qwen3_5_vision",
248
+ "num_heads": 16,
249
+ "num_position_embeddings": 2304,
250
+ "out_hidden_size": 2560,
251
+ "patch_size": 16,
252
+ "spatial_merge_size": 2,
253
+ "temporal_patch_size": 2
254
+ },
255
+ "vision_end_token_id": 248054,
256
+ "vision_start_token_id": 248053
257
+ }
generation_config.json ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "eos_token_id": 248044,
4
+ "transformers_version": "5.9.0",
5
+ "use_cache": true
6
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7bc6ebc79a7713b940e06687eec55b2e50d6f8cc8222831acace859aee01e798
3
+ size 3948152736
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,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "image_processor": {
3
+ "do_convert_rgb": true,
4
+ "do_normalize": true,
5
+ "do_rescale": true,
6
+ "do_resize": true,
7
+ "image_mean": [
8
+ 0.5,
9
+ 0.5,
10
+ 0.5
11
+ ],
12
+ "image_processor_type": "Qwen2VLImageProcessor",
13
+ "image_std": [
14
+ 0.5,
15
+ 0.5,
16
+ 0.5
17
+ ],
18
+ "merge_size": 2,
19
+ "patch_size": 16,
20
+ "resample": 3,
21
+ "rescale_factor": 0.00392156862745098,
22
+ "size": {
23
+ "longest_edge": 16777216,
24
+ "shortest_edge": 65536
25
+ },
26
+ "temporal_patch_size": 2
27
+ },
28
+ "processor_class": "Qwen3VLProcessor",
29
+ "video_processor": {
30
+ "do_convert_rgb": true,
31
+ "do_normalize": true,
32
+ "do_rescale": true,
33
+ "do_resize": true,
34
+ "do_sample_frames": true,
35
+ "fps": 2,
36
+ "image_mean": [
37
+ 0.5,
38
+ 0.5,
39
+ 0.5
40
+ ],
41
+ "image_std": [
42
+ 0.5,
43
+ 0.5,
44
+ 0.5
45
+ ],
46
+ "max_frames": 768,
47
+ "merge_size": 2,
48
+ "min_frames": 4,
49
+ "patch_size": 16,
50
+ "resample": 3,
51
+ "rescale_factor": 0.00392156862745098,
52
+ "return_metadata": false,
53
+ "size": {
54
+ "longest_edge": 25165824,
55
+ "shortest_edge": 4096
56
+ },
57
+ "temporal_patch_size": 2,
58
+ "video_processor_type": "Qwen3VLVideoProcessor"
59
+ }
60
+ }
recipe.yaml ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ default_stage:
2
+ default_modifiers:
3
+ QuantizationModifier:
4
+ targets: [Linear]
5
+ ignore: [lm_head, 're:.*visual.*', 're:.*conv1d.*', 're:.*mtp.*']
6
+ scheme: NVFP4
7
+ bypass_divisibility_checks: false
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,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "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
+ "processor_class": "Qwen3VLProcessor",
27
+ "split_special_tokens": false,
28
+ "tokenizer_class": "Qwen2Tokenizer",
29
+ "unk_token": null,
30
+ "video_token": "<|video_pad|>",
31
+ "vision_bos_token": "<|vision_start|>",
32
+ "vision_eos_token": "<|vision_end|>"
33
+ }