JEILDLWLRMA commited on
Commit
5e5a9e3
·
verified ·
1 Parent(s): d66d009

v3.1: Add quantization_config to config.json for proper tensor format detection

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,111 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ base_model: Qwen/Qwen3-VL-8B-Instruct
4
+ tags:
5
+ - quantized
6
+ - nvfp4
7
+ - fp8
8
+ - vision-language-model
9
+ - qwen3-vl
10
+ - compressed-tensors
11
+ - vllm
12
+ library_name: transformers
13
+ pipeline_tag: image-to-text
14
+ ---
15
+
16
+ # Qwen3-VL-8B-Instruct-NVFP4-FP8-Dynamic
17
+
18
+ This is a quantized version of [Qwen/Qwen3-VL-8B-Instruct](https://huggingface.co/Qwen/Qwen3-VL-8B-Instruct) using **Selective Layer Quantization** with NVFP4 and FP8_DYNAMIC schemes.
19
+
20
+ ## Quantization Strategy
21
+
22
+ This model uses a hybrid quantization approach optimized for both performance and accuracy:
23
+
24
+ | Component | Scheme | Details |
25
+ |-----------|--------|---------|
26
+ | **Attention Layers** | FP8_DYNAMIC | W8A8, preserves precision for Q/K/V/O projections |
27
+ | **MLP Layers** | NVFP4 | W4A4, optimizes latency for gate/up/down projections |
28
+ | **Vision Encoder** | BF16 (unquantized) | Full precision for visual understanding |
29
+ | **LM Head** | BF16 (unquantized) | Full precision for output quality |
30
+
31
+ ### SmoothQuant
32
+
33
+ Applied with strength 0.8 for activation smoothing before quantization:
34
+ - Q/K/V projections ← input_layernorm
35
+ - Gate/Up projections ← post_attention_layernorm
36
+
37
+ ## Model Details
38
+
39
+ - **Base Model**: Qwen/Qwen3-VL-8B-Instruct
40
+ - **Quantization Method**: compressed-tensors (llm-compressor)
41
+ - **Model Size**: ~7.7 GB (reduced from ~17 GB, ~55% compression)
42
+ - **Config Groups**: FP8_DYNAMIC (attention) + NVFP4 (MLP)
43
+
44
+ ## Usage with vLLM
45
+
46
+ ```bash
47
+ vllm serve JEILDLWLRMA/Qwen3-VL-8B-Instruct-NVFP4-FP8-Dynamic \
48
+ --quantization compressed-tensors \
49
+ --kv-cache-dtype fp8 \
50
+ --gpu-memory-utilization 0.9 \
51
+ --enforce-eager \
52
+ --max-model-len 8192
53
+ ```
54
+
55
+ ```python
56
+ from vllm import LLM, SamplingParams
57
+
58
+ llm = LLM(
59
+ model="JEILDLWLRMA/Qwen3-VL-8B-Instruct-NVFP4-FP8-Dynamic",
60
+ quantization="compressed-tensors",
61
+ trust_remote_code=True,
62
+ kv_cache_dtype="fp8",
63
+ max_model_len=8192,
64
+ )
65
+
66
+ sampling_params = SamplingParams(temperature=0.7, top_p=0.95)
67
+ prompts = ["Your prompt here"]
68
+ outputs = llm.generate(prompts, sampling_params)
69
+ ```
70
+
71
+ ## Usage with Transformers
72
+
73
+ ```python
74
+ from transformers import AutoProcessor, Qwen3VLForConditionalGeneration
75
+ import torch
76
+
77
+ model_id = "JEILDLWLRMA/Qwen3-VL-8B-Instruct-NVFP4-FP8-Dynamic"
78
+ processor = AutoProcessor.from_pretrained(model_id)
79
+ model = Qwen3VLForConditionalGeneration.from_pretrained(
80
+ model_id,
81
+ torch_dtype=torch.bfloat16,
82
+ device_map="auto",
83
+ trust_remote_code=True,
84
+ )
85
+ ```
86
+
87
+ ## Quantization Config
88
+
89
+ ### Target Patterns (vLLM fused-layer compatible)
90
+
91
+ - **Attention (FP8_DYNAMIC)**: `self_attn.(q_proj|k_proj|v_proj|o_proj|qkv_proj|qkv)`
92
+ - **MLP (NVFP4)**: `mlp.(gate_proj|up_proj|down_proj|gate_up_proj)`
93
+ - **Ignored**: Vision encoder (`visual.*`), output head (`lm_head`), MoE gates (`mlp.gate`)
94
+
95
+ ### Recipe Structure (`recipe.yaml`)
96
+
97
+ - **SmoothQuantModifier**: Activation smoothing (strength=0.8)
98
+ - **QuantizationModifier (attn)**: FP8_DYNAMIC for attention layers
99
+ - **QuantizationModifier (mlp)**: NVFP4 for MLP layers
100
+
101
+ ## Performance Notes
102
+
103
+ - Model loads in ~4 seconds, uses ~8 GiB VRAM
104
+ - On 24GB GPU: ~10 GiB available for KV cache (~159K tokens)
105
+ - GPU without native FP4/FP8 support falls back to Marlin kernels
106
+ - Requires vLLM 0.11+ with compressed-tensors support
107
+
108
+ ## License
109
+
110
+ Apache 2.0, same as the base model.
111
+
added_tokens.json ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "</think>": 151668,
3
+ "</tool_call>": 151658,
4
+ "</tool_response>": 151666,
5
+ "<think>": 151667,
6
+ "<tool_call>": 151657,
7
+ "<tool_response>": 151665,
8
+ "<|box_end|>": 151649,
9
+ "<|box_start|>": 151648,
10
+ "<|endoftext|>": 151643,
11
+ "<|file_sep|>": 151664,
12
+ "<|fim_middle|>": 151660,
13
+ "<|fim_pad|>": 151662,
14
+ "<|fim_prefix|>": 151659,
15
+ "<|fim_suffix|>": 151661,
16
+ "<|im_end|>": 151645,
17
+ "<|im_start|>": 151644,
18
+ "<|image_pad|>": 151655,
19
+ "<|object_ref_end|>": 151647,
20
+ "<|object_ref_start|>": 151646,
21
+ "<|quad_end|>": 151651,
22
+ "<|quad_start|>": 151650,
23
+ "<|repo_name|>": 151663,
24
+ "<|video_pad|>": 151656,
25
+ "<|vision_end|>": 151653,
26
+ "<|vision_pad|>": 151654,
27
+ "<|vision_start|>": 151652
28
+ }
chat_template.jinja ADDED
@@ -0,0 +1,120 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {%- if tools %}
2
+ {{- '<|im_start|>system\n' }}
3
+ {%- if messages[0].role == 'system' %}
4
+ {%- if messages[0].content is string %}
5
+ {{- messages[0].content }}
6
+ {%- else %}
7
+ {%- for content in messages[0].content %}
8
+ {%- if 'text' in content %}
9
+ {{- content.text }}
10
+ {%- endif %}
11
+ {%- endfor %}
12
+ {%- endif %}
13
+ {{- '\n\n' }}
14
+ {%- endif %}
15
+ {{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>" }}
16
+ {%- for tool in tools %}
17
+ {{- "\n" }}
18
+ {{- tool | tojson }}
19
+ {%- endfor %}
20
+ {{- "\n</tools>\n\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\n<tool_call>\n{\"name\": <function-name>, \"arguments\": <args-json-object>}\n</tool_call><|im_end|>\n" }}
21
+ {%- else %}
22
+ {%- if messages[0].role == 'system' %}
23
+ {{- '<|im_start|>system\n' }}
24
+ {%- if messages[0].content is string %}
25
+ {{- messages[0].content }}
26
+ {%- else %}
27
+ {%- for content in messages[0].content %}
28
+ {%- if 'text' in content %}
29
+ {{- content.text }}
30
+ {%- endif %}
31
+ {%- endfor %}
32
+ {%- endif %}
33
+ {{- '<|im_end|>\n' }}
34
+ {%- endif %}
35
+ {%- endif %}
36
+ {%- set image_count = namespace(value=0) %}
37
+ {%- set video_count = namespace(value=0) %}
38
+ {%- for message in messages %}
39
+ {%- if message.role == "user" %}
40
+ {{- '<|im_start|>' + message.role + '\n' }}
41
+ {%- if message.content is string %}
42
+ {{- message.content }}
43
+ {%- else %}
44
+ {%- for content in message.content %}
45
+ {%- if content.type == 'image' or 'image' in content or 'image_url' in content %}
46
+ {%- set image_count.value = image_count.value + 1 %}
47
+ {%- if add_vision_id %}Picture {{ image_count.value }}: {% endif -%}
48
+ <|vision_start|><|image_pad|><|vision_end|>
49
+ {%- elif content.type == 'video' or 'video' in content %}
50
+ {%- set video_count.value = video_count.value + 1 %}
51
+ {%- if add_vision_id %}Video {{ video_count.value }}: {% endif -%}
52
+ <|vision_start|><|video_pad|><|vision_end|>
53
+ {%- elif 'text' in content %}
54
+ {{- content.text }}
55
+ {%- endif %}
56
+ {%- endfor %}
57
+ {%- endif %}
58
+ {{- '<|im_end|>\n' }}
59
+ {%- elif message.role == "assistant" %}
60
+ {{- '<|im_start|>' + message.role + '\n' }}
61
+ {%- if message.content is string %}
62
+ {{- message.content }}
63
+ {%- else %}
64
+ {%- for content_item in message.content %}
65
+ {%- if 'text' in content_item %}
66
+ {{- content_item.text }}
67
+ {%- endif %}
68
+ {%- endfor %}
69
+ {%- endif %}
70
+ {%- if message.tool_calls %}
71
+ {%- for tool_call in message.tool_calls %}
72
+ {%- if (loop.first and message.content) or (not loop.first) %}
73
+ {{- '\n' }}
74
+ {%- endif %}
75
+ {%- if tool_call.function %}
76
+ {%- set tool_call = tool_call.function %}
77
+ {%- endif %}
78
+ {{- '<tool_call>\n{"name": "' }}
79
+ {{- tool_call.name }}
80
+ {{- '", "arguments": ' }}
81
+ {%- if tool_call.arguments is string %}
82
+ {{- tool_call.arguments }}
83
+ {%- else %}
84
+ {{- tool_call.arguments | tojson }}
85
+ {%- endif %}
86
+ {{- '}\n</tool_call>' }}
87
+ {%- endfor %}
88
+ {%- endif %}
89
+ {{- '<|im_end|>\n' }}
90
+ {%- elif message.role == "tool" %}
91
+ {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %}
92
+ {{- '<|im_start|>user' }}
93
+ {%- endif %}
94
+ {{- '\n<tool_response>\n' }}
95
+ {%- if message.content is string %}
96
+ {{- message.content }}
97
+ {%- else %}
98
+ {%- for content in message.content %}
99
+ {%- if content.type == 'image' or 'image' in content or 'image_url' in content %}
100
+ {%- set image_count.value = image_count.value + 1 %}
101
+ {%- if add_vision_id %}Picture {{ image_count.value }}: {% endif -%}
102
+ <|vision_start|><|image_pad|><|vision_end|>
103
+ {%- elif content.type == 'video' or 'video' in content %}
104
+ {%- set video_count.value = video_count.value + 1 %}
105
+ {%- if add_vision_id %}Video {{ video_count.value }}: {% endif -%}
106
+ <|vision_start|><|video_pad|><|vision_end|>
107
+ {%- elif 'text' in content %}
108
+ {{- content.text }}
109
+ {%- endif %}
110
+ {%- endfor %}
111
+ {%- endif %}
112
+ {{- '\n</tool_response>' }}
113
+ {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
114
+ {{- '<|im_end|>\n' }}
115
+ {%- endif %}
116
+ {%- endif %}
117
+ {%- endfor %}
118
+ {%- if add_generation_prompt %}
119
+ {{- '<|im_start|>assistant\n' }}
120
+ {%- endif %}
config.json ADDED
@@ -0,0 +1,256 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "Qwen3VLForConditionalGeneration"
4
+ ],
5
+ "dtype": "bfloat16",
6
+ "image_token_id": 151655,
7
+ "model_type": "qwen3_vl",
8
+ "quantization_config": {
9
+ "config_groups": {
10
+ "group_0": {
11
+ "format": "float-quantized",
12
+ "input_activations": {
13
+ "actorder": null,
14
+ "block_structure": null,
15
+ "dynamic": true,
16
+ "group_size": null,
17
+ "num_bits": 8,
18
+ "observer": null,
19
+ "observer_kwargs": {},
20
+ "strategy": "token",
21
+ "symmetric": true,
22
+ "type": "float"
23
+ },
24
+ "output_activations": null,
25
+ "targets": [
26
+ "re:.*self_attn\\.(q_proj|k_proj|v_proj|o_proj|qkv_proj|qkv)$"
27
+ ],
28
+ "weights": {
29
+ "actorder": null,
30
+ "block_structure": null,
31
+ "dynamic": false,
32
+ "group_size": null,
33
+ "num_bits": 8,
34
+ "observer": "minmax",
35
+ "observer_kwargs": {},
36
+ "strategy": "channel",
37
+ "symmetric": true,
38
+ "type": "float"
39
+ }
40
+ },
41
+ "group_1": {
42
+ "format": "nvfp4-pack-quantized",
43
+ "input_activations": {
44
+ "actorder": null,
45
+ "block_structure": null,
46
+ "dynamic": "local",
47
+ "group_size": 16,
48
+ "num_bits": 4,
49
+ "observer": "static_minmax",
50
+ "observer_kwargs": {},
51
+ "strategy": "tensor_group",
52
+ "symmetric": true,
53
+ "type": "float"
54
+ },
55
+ "output_activations": null,
56
+ "targets": [
57
+ "re:.*mlp\\.(gate_proj|up_proj|down_proj|gate_up_proj)$"
58
+ ],
59
+ "weights": {
60
+ "actorder": null,
61
+ "block_structure": null,
62
+ "dynamic": false,
63
+ "group_size": 16,
64
+ "num_bits": 4,
65
+ "observer": "static_minmax",
66
+ "observer_kwargs": {},
67
+ "strategy": "tensor_group",
68
+ "symmetric": true,
69
+ "type": "float"
70
+ }
71
+ }
72
+ },
73
+ "global_compression_ratio": null,
74
+ "ignore": [
75
+ "model.visual.blocks.0.attn.qkv",
76
+ "model.visual.blocks.0.attn.proj",
77
+ "model.visual.blocks.0.mlp.linear_fc1",
78
+ "model.visual.blocks.0.mlp.linear_fc2",
79
+ "model.visual.blocks.1.attn.qkv",
80
+ "model.visual.blocks.1.attn.proj",
81
+ "model.visual.blocks.1.mlp.linear_fc1",
82
+ "model.visual.blocks.1.mlp.linear_fc2",
83
+ "model.visual.blocks.2.attn.qkv",
84
+ "model.visual.blocks.2.attn.proj",
85
+ "model.visual.blocks.2.mlp.linear_fc1",
86
+ "model.visual.blocks.2.mlp.linear_fc2",
87
+ "model.visual.blocks.3.attn.qkv",
88
+ "model.visual.blocks.3.attn.proj",
89
+ "model.visual.blocks.3.mlp.linear_fc1",
90
+ "model.visual.blocks.3.mlp.linear_fc2",
91
+ "model.visual.blocks.4.attn.qkv",
92
+ "model.visual.blocks.4.attn.proj",
93
+ "model.visual.blocks.4.mlp.linear_fc1",
94
+ "model.visual.blocks.4.mlp.linear_fc2",
95
+ "model.visual.blocks.5.attn.qkv",
96
+ "model.visual.blocks.5.attn.proj",
97
+ "model.visual.blocks.5.mlp.linear_fc1",
98
+ "model.visual.blocks.5.mlp.linear_fc2",
99
+ "model.visual.blocks.6.attn.qkv",
100
+ "model.visual.blocks.6.attn.proj",
101
+ "model.visual.blocks.6.mlp.linear_fc1",
102
+ "model.visual.blocks.6.mlp.linear_fc2",
103
+ "model.visual.blocks.7.attn.qkv",
104
+ "model.visual.blocks.7.attn.proj",
105
+ "model.visual.blocks.7.mlp.linear_fc1",
106
+ "model.visual.blocks.7.mlp.linear_fc2",
107
+ "model.visual.blocks.8.attn.qkv",
108
+ "model.visual.blocks.8.attn.proj",
109
+ "model.visual.blocks.8.mlp.linear_fc1",
110
+ "model.visual.blocks.8.mlp.linear_fc2",
111
+ "model.visual.blocks.9.attn.qkv",
112
+ "model.visual.blocks.9.attn.proj",
113
+ "model.visual.blocks.9.mlp.linear_fc1",
114
+ "model.visual.blocks.9.mlp.linear_fc2",
115
+ "model.visual.blocks.10.attn.qkv",
116
+ "model.visual.blocks.10.attn.proj",
117
+ "model.visual.blocks.10.mlp.linear_fc1",
118
+ "model.visual.blocks.10.mlp.linear_fc2",
119
+ "model.visual.blocks.11.attn.qkv",
120
+ "model.visual.blocks.11.attn.proj",
121
+ "model.visual.blocks.11.mlp.linear_fc1",
122
+ "model.visual.blocks.11.mlp.linear_fc2",
123
+ "model.visual.blocks.12.attn.qkv",
124
+ "model.visual.blocks.12.attn.proj",
125
+ "model.visual.blocks.12.mlp.linear_fc1",
126
+ "model.visual.blocks.12.mlp.linear_fc2",
127
+ "model.visual.blocks.13.attn.qkv",
128
+ "model.visual.blocks.13.attn.proj",
129
+ "model.visual.blocks.13.mlp.linear_fc1",
130
+ "model.visual.blocks.13.mlp.linear_fc2",
131
+ "model.visual.blocks.14.attn.qkv",
132
+ "model.visual.blocks.14.attn.proj",
133
+ "model.visual.blocks.14.mlp.linear_fc1",
134
+ "model.visual.blocks.14.mlp.linear_fc2",
135
+ "model.visual.blocks.15.attn.qkv",
136
+ "model.visual.blocks.15.attn.proj",
137
+ "model.visual.blocks.15.mlp.linear_fc1",
138
+ "model.visual.blocks.15.mlp.linear_fc2",
139
+ "model.visual.blocks.16.attn.qkv",
140
+ "model.visual.blocks.16.attn.proj",
141
+ "model.visual.blocks.16.mlp.linear_fc1",
142
+ "model.visual.blocks.16.mlp.linear_fc2",
143
+ "model.visual.blocks.17.attn.qkv",
144
+ "model.visual.blocks.17.attn.proj",
145
+ "model.visual.blocks.17.mlp.linear_fc1",
146
+ "model.visual.blocks.17.mlp.linear_fc2",
147
+ "model.visual.blocks.18.attn.qkv",
148
+ "model.visual.blocks.18.attn.proj",
149
+ "model.visual.blocks.18.mlp.linear_fc1",
150
+ "model.visual.blocks.18.mlp.linear_fc2",
151
+ "model.visual.blocks.19.attn.qkv",
152
+ "model.visual.blocks.19.attn.proj",
153
+ "model.visual.blocks.19.mlp.linear_fc1",
154
+ "model.visual.blocks.19.mlp.linear_fc2",
155
+ "model.visual.blocks.20.attn.qkv",
156
+ "model.visual.blocks.20.attn.proj",
157
+ "model.visual.blocks.20.mlp.linear_fc1",
158
+ "model.visual.blocks.20.mlp.linear_fc2",
159
+ "model.visual.blocks.21.attn.qkv",
160
+ "model.visual.blocks.21.attn.proj",
161
+ "model.visual.blocks.21.mlp.linear_fc1",
162
+ "model.visual.blocks.21.mlp.linear_fc2",
163
+ "model.visual.blocks.22.attn.qkv",
164
+ "model.visual.blocks.22.attn.proj",
165
+ "model.visual.blocks.22.mlp.linear_fc1",
166
+ "model.visual.blocks.22.mlp.linear_fc2",
167
+ "model.visual.blocks.23.attn.qkv",
168
+ "model.visual.blocks.23.attn.proj",
169
+ "model.visual.blocks.23.mlp.linear_fc1",
170
+ "model.visual.blocks.23.mlp.linear_fc2",
171
+ "model.visual.blocks.24.attn.qkv",
172
+ "model.visual.blocks.24.attn.proj",
173
+ "model.visual.blocks.24.mlp.linear_fc1",
174
+ "model.visual.blocks.24.mlp.linear_fc2",
175
+ "model.visual.blocks.25.attn.qkv",
176
+ "model.visual.blocks.25.attn.proj",
177
+ "model.visual.blocks.25.mlp.linear_fc1",
178
+ "model.visual.blocks.25.mlp.linear_fc2",
179
+ "model.visual.blocks.26.attn.qkv",
180
+ "model.visual.blocks.26.attn.proj",
181
+ "model.visual.blocks.26.mlp.linear_fc1",
182
+ "model.visual.blocks.26.mlp.linear_fc2",
183
+ "model.visual.merger.linear_fc1",
184
+ "model.visual.merger.linear_fc2",
185
+ "model.visual.deepstack_merger_list.0.linear_fc1",
186
+ "model.visual.deepstack_merger_list.0.linear_fc2",
187
+ "model.visual.deepstack_merger_list.1.linear_fc1",
188
+ "model.visual.deepstack_merger_list.1.linear_fc2",
189
+ "model.visual.deepstack_merger_list.2.linear_fc1",
190
+ "model.visual.deepstack_merger_list.2.linear_fc2",
191
+ "lm_head"
192
+ ],
193
+ "kv_cache_scheme": null,
194
+ "quant_method": "compressed-tensors",
195
+ "quantization_status": "compressed",
196
+ "sparsity_config": {},
197
+ "transform_config": {},
198
+ "version": "0.13.1.a20260116"
199
+ },
200
+ "text_config": {
201
+ "attention_bias": false,
202
+ "attention_dropout": 0.0,
203
+ "bos_token_id": 151643,
204
+ "dtype": "bfloat16",
205
+ "eos_token_id": 151645,
206
+ "head_dim": 128,
207
+ "hidden_act": "silu",
208
+ "hidden_size": 4096,
209
+ "initializer_range": 0.02,
210
+ "intermediate_size": 12288,
211
+ "max_position_embeddings": 262144,
212
+ "model_type": "qwen3_vl_text",
213
+ "num_attention_heads": 32,
214
+ "num_hidden_layers": 36,
215
+ "num_key_value_heads": 8,
216
+ "rms_norm_eps": 1e-06,
217
+ "rope_scaling": {
218
+ "mrope_interleaved": true,
219
+ "mrope_section": [
220
+ 24,
221
+ 20,
222
+ 20
223
+ ],
224
+ "rope_type": "default"
225
+ },
226
+ "rope_theta": 5000000,
227
+ "use_cache": true,
228
+ "vocab_size": 151936
229
+ },
230
+ "tie_word_embeddings": false,
231
+ "transformers_version": "5.0.0.dev0",
232
+ "video_token_id": 151656,
233
+ "vision_config": {
234
+ "deepstack_visual_indexes": [
235
+ 8,
236
+ 16,
237
+ 24
238
+ ],
239
+ "depth": 27,
240
+ "dtype": "bfloat16",
241
+ "hidden_act": "gelu_pytorch_tanh",
242
+ "hidden_size": 1152,
243
+ "in_channels": 3,
244
+ "initializer_range": 0.02,
245
+ "intermediate_size": 4304,
246
+ "model_type": "qwen3_vl",
247
+ "num_heads": 16,
248
+ "num_position_embeddings": 2304,
249
+ "out_hidden_size": 4096,
250
+ "patch_size": 16,
251
+ "spatial_merge_size": 2,
252
+ "temporal_patch_size": 2
253
+ },
254
+ "vision_end_token_id": 151653,
255
+ "vision_start_token_id": 151652
256
+ }
generation_config.json ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token_id": 151643,
3
+ "do_sample": true,
4
+ "eos_token_id": [
5
+ 151645,
6
+ 151643
7
+ ],
8
+ "pad_token_id": 151643,
9
+ "temperature": 0.7,
10
+ "top_k": 20,
11
+ "top_p": 0.8,
12
+ "transformers_version": "5.0.0.dev0"
13
+ }
merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
model-00001-of-00002.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cb3cc0f33d103e1e3d5244d6e3c388b5dab766496a321c5c161e45dd8f8493fa
3
+ size 4977806320
model-00002-of-00002.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7d9ce75042d9ffb97a0ec011d6809ca0124751529b1dc81780fcdbc47ab98b81
3
+ size 3233394440
model.safetensors.index.json ADDED
The diff for this file is too large to render. See raw diff
 
processor_config.json ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "image_processor": {
3
+ "crop_size": null,
4
+ "data_format": "channels_first",
5
+ "device": null,
6
+ "disable_grouping": null,
7
+ "do_center_crop": null,
8
+ "do_convert_rgb": true,
9
+ "do_normalize": true,
10
+ "do_pad": null,
11
+ "do_rescale": true,
12
+ "do_resize": true,
13
+ "image_mean": [
14
+ 0.5,
15
+ 0.5,
16
+ 0.5
17
+ ],
18
+ "image_processor_type": "Qwen2VLImageProcessorFast",
19
+ "image_std": [
20
+ 0.5,
21
+ 0.5,
22
+ 0.5
23
+ ],
24
+ "input_data_format": null,
25
+ "max_pixels": null,
26
+ "merge_size": 2,
27
+ "min_pixels": null,
28
+ "pad_size": null,
29
+ "patch_size": 16,
30
+ "processor_class": "Qwen3VLProcessor",
31
+ "resample": 3,
32
+ "rescale_factor": 0.00392156862745098,
33
+ "return_tensors": null,
34
+ "size": {
35
+ "longest_edge": 16777216,
36
+ "shortest_edge": 65536
37
+ },
38
+ "temporal_patch_size": 2
39
+ },
40
+ "processor_class": "Qwen3VLProcessor",
41
+ "video_processor": {
42
+ "crop_size": null,
43
+ "data_format": "channels_first",
44
+ "default_to_square": true,
45
+ "device": null,
46
+ "do_center_crop": null,
47
+ "do_convert_rgb": true,
48
+ "do_normalize": true,
49
+ "do_pad": null,
50
+ "do_rescale": true,
51
+ "do_resize": true,
52
+ "do_sample_frames": true,
53
+ "fps": 2,
54
+ "image_mean": [
55
+ 0.5,
56
+ 0.5,
57
+ 0.5
58
+ ],
59
+ "image_std": [
60
+ 0.5,
61
+ 0.5,
62
+ 0.5
63
+ ],
64
+ "input_data_format": null,
65
+ "max_frames": 768,
66
+ "merge_size": 2,
67
+ "min_frames": 4,
68
+ "num_frames": null,
69
+ "pad_size": null,
70
+ "patch_size": 16,
71
+ "processor_class": "Qwen3VLProcessor",
72
+ "resample": 3,
73
+ "rescale_factor": 0.00392156862745098,
74
+ "return_metadata": false,
75
+ "return_tensors": null,
76
+ "size": {
77
+ "longest_edge": 25165824,
78
+ "shortest_edge": 4096
79
+ },
80
+ "temporal_patch_size": 2,
81
+ "video_metadata": null,
82
+ "video_processor_type": "Qwen3VLVideoProcessor"
83
+ }
84
+ }
recipe.yaml ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ default_stage:
2
+ default_modifiers:
3
+ SmoothQuantModifier:
4
+ smoothing_strength: 0.8
5
+ mappings:
6
+ - - ['re:.*self_attn\.q_proj$', 're:.*self_attn\.k_proj$', 're:.*self_attn\.v_proj$']
7
+ - re:.*input_layernorm$
8
+ - - ['re:.*mlp\.gate_proj$', 're:.*mlp\.up_proj$']
9
+ - re:.*post_attention_layernorm$
10
+ ignore: []
11
+ attn_modifiers:
12
+ QuantizationModifier:
13
+ targets: ['re:.*self_attn\.(q_proj|k_proj|v_proj|o_proj|qkv_proj|qkv)$']
14
+ ignore: ['re:.*lm_head', 're:visual.*', 're:model\.visual.*', 're:.*mlp\.gate$']
15
+ scheme: FP8_DYNAMIC
16
+ mlp_modifiers:
17
+ QuantizationModifier:
18
+ targets: ['re:.*mlp\.(gate_proj|up_proj|down_proj|gate_up_proj)$']
19
+ ignore: ['re:.*lm_head', 're:visual.*', 're:model\.visual.*', 're:.*mlp\.gate$']
20
+ scheme: NVFP4
special_tokens_map.json ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": [
3
+ "<|im_start|>",
4
+ "<|im_end|>",
5
+ "<|object_ref_start|>",
6
+ "<|object_ref_end|>",
7
+ "<|box_start|>",
8
+ "<|box_end|>",
9
+ "<|quad_start|>",
10
+ "<|quad_end|>",
11
+ "<|vision_start|>",
12
+ "<|vision_end|>",
13
+ "<|vision_pad|>",
14
+ "<|image_pad|>",
15
+ "<|video_pad|>"
16
+ ],
17
+ "eos_token": {
18
+ "content": "<|im_end|>",
19
+ "lstrip": false,
20
+ "normalized": false,
21
+ "rstrip": false,
22
+ "single_word": false
23
+ },
24
+ "pad_token": {
25
+ "content": "<|endoftext|>",
26
+ "lstrip": false,
27
+ "normalized": false,
28
+ "rstrip": false,
29
+ "single_word": false
30
+ }
31
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c0acdaba32b920d640afb36af4396c91974e074735636e4016d17a8ed9c03730
3
+ size 11422753
tokenizer_config.json ADDED
@@ -0,0 +1,240 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_bos_token": false,
3
+ "add_prefix_space": false,
4
+ "added_tokens_decoder": {
5
+ "151643": {
6
+ "content": "<|endoftext|>",
7
+ "lstrip": false,
8
+ "normalized": false,
9
+ "rstrip": false,
10
+ "single_word": false,
11
+ "special": true
12
+ },
13
+ "151644": {
14
+ "content": "<|im_start|>",
15
+ "lstrip": false,
16
+ "normalized": false,
17
+ "rstrip": false,
18
+ "single_word": false,
19
+ "special": true
20
+ },
21
+ "151645": {
22
+ "content": "<|im_end|>",
23
+ "lstrip": false,
24
+ "normalized": false,
25
+ "rstrip": false,
26
+ "single_word": false,
27
+ "special": true
28
+ },
29
+ "151646": {
30
+ "content": "<|object_ref_start|>",
31
+ "lstrip": false,
32
+ "normalized": false,
33
+ "rstrip": false,
34
+ "single_word": false,
35
+ "special": true
36
+ },
37
+ "151647": {
38
+ "content": "<|object_ref_end|>",
39
+ "lstrip": false,
40
+ "normalized": false,
41
+ "rstrip": false,
42
+ "single_word": false,
43
+ "special": true
44
+ },
45
+ "151648": {
46
+ "content": "<|box_start|>",
47
+ "lstrip": false,
48
+ "normalized": false,
49
+ "rstrip": false,
50
+ "single_word": false,
51
+ "special": true
52
+ },
53
+ "151649": {
54
+ "content": "<|box_end|>",
55
+ "lstrip": false,
56
+ "normalized": false,
57
+ "rstrip": false,
58
+ "single_word": false,
59
+ "special": true
60
+ },
61
+ "151650": {
62
+ "content": "<|quad_start|>",
63
+ "lstrip": false,
64
+ "normalized": false,
65
+ "rstrip": false,
66
+ "single_word": false,
67
+ "special": true
68
+ },
69
+ "151651": {
70
+ "content": "<|quad_end|>",
71
+ "lstrip": false,
72
+ "normalized": false,
73
+ "rstrip": false,
74
+ "single_word": false,
75
+ "special": true
76
+ },
77
+ "151652": {
78
+ "content": "<|vision_start|>",
79
+ "lstrip": false,
80
+ "normalized": false,
81
+ "rstrip": false,
82
+ "single_word": false,
83
+ "special": true
84
+ },
85
+ "151653": {
86
+ "content": "<|vision_end|>",
87
+ "lstrip": false,
88
+ "normalized": false,
89
+ "rstrip": false,
90
+ "single_word": false,
91
+ "special": true
92
+ },
93
+ "151654": {
94
+ "content": "<|vision_pad|>",
95
+ "lstrip": false,
96
+ "normalized": false,
97
+ "rstrip": false,
98
+ "single_word": false,
99
+ "special": true
100
+ },
101
+ "151655": {
102
+ "content": "<|image_pad|>",
103
+ "lstrip": false,
104
+ "normalized": false,
105
+ "rstrip": false,
106
+ "single_word": false,
107
+ "special": true
108
+ },
109
+ "151656": {
110
+ "content": "<|video_pad|>",
111
+ "lstrip": false,
112
+ "normalized": false,
113
+ "rstrip": false,
114
+ "single_word": false,
115
+ "special": true
116
+ },
117
+ "151657": {
118
+ "content": "<tool_call>",
119
+ "lstrip": false,
120
+ "normalized": false,
121
+ "rstrip": false,
122
+ "single_word": false,
123
+ "special": false
124
+ },
125
+ "151658": {
126
+ "content": "</tool_call>",
127
+ "lstrip": false,
128
+ "normalized": false,
129
+ "rstrip": false,
130
+ "single_word": false,
131
+ "special": false
132
+ },
133
+ "151659": {
134
+ "content": "<|fim_prefix|>",
135
+ "lstrip": false,
136
+ "normalized": false,
137
+ "rstrip": false,
138
+ "single_word": false,
139
+ "special": false
140
+ },
141
+ "151660": {
142
+ "content": "<|fim_middle|>",
143
+ "lstrip": false,
144
+ "normalized": false,
145
+ "rstrip": false,
146
+ "single_word": false,
147
+ "special": false
148
+ },
149
+ "151661": {
150
+ "content": "<|fim_suffix|>",
151
+ "lstrip": false,
152
+ "normalized": false,
153
+ "rstrip": false,
154
+ "single_word": false,
155
+ "special": false
156
+ },
157
+ "151662": {
158
+ "content": "<|fim_pad|>",
159
+ "lstrip": false,
160
+ "normalized": false,
161
+ "rstrip": false,
162
+ "single_word": false,
163
+ "special": false
164
+ },
165
+ "151663": {
166
+ "content": "<|repo_name|>",
167
+ "lstrip": false,
168
+ "normalized": false,
169
+ "rstrip": false,
170
+ "single_word": false,
171
+ "special": false
172
+ },
173
+ "151664": {
174
+ "content": "<|file_sep|>",
175
+ "lstrip": false,
176
+ "normalized": false,
177
+ "rstrip": false,
178
+ "single_word": false,
179
+ "special": false
180
+ },
181
+ "151665": {
182
+ "content": "<tool_response>",
183
+ "lstrip": false,
184
+ "normalized": false,
185
+ "rstrip": false,
186
+ "single_word": false,
187
+ "special": false
188
+ },
189
+ "151666": {
190
+ "content": "</tool_response>",
191
+ "lstrip": false,
192
+ "normalized": false,
193
+ "rstrip": false,
194
+ "single_word": false,
195
+ "special": false
196
+ },
197
+ "151667": {
198
+ "content": "<think>",
199
+ "lstrip": false,
200
+ "normalized": false,
201
+ "rstrip": false,
202
+ "single_word": false,
203
+ "special": false
204
+ },
205
+ "151668": {
206
+ "content": "</think>",
207
+ "lstrip": false,
208
+ "normalized": false,
209
+ "rstrip": false,
210
+ "single_word": false,
211
+ "special": false
212
+ }
213
+ },
214
+ "additional_special_tokens": [
215
+ "<|im_start|>",
216
+ "<|im_end|>",
217
+ "<|object_ref_start|>",
218
+ "<|object_ref_end|>",
219
+ "<|box_start|>",
220
+ "<|box_end|>",
221
+ "<|quad_start|>",
222
+ "<|quad_end|>",
223
+ "<|vision_start|>",
224
+ "<|vision_end|>",
225
+ "<|vision_pad|>",
226
+ "<|image_pad|>",
227
+ "<|video_pad|>"
228
+ ],
229
+ "bos_token": null,
230
+ "clean_up_tokenization_spaces": false,
231
+ "eos_token": "<|im_end|>",
232
+ "errors": "replace",
233
+ "extra_special_tokens": {},
234
+ "model_max_length": 262144,
235
+ "pad_token": "<|endoftext|>",
236
+ "processor_class": "Qwen3VLProcessor",
237
+ "split_special_tokens": false,
238
+ "tokenizer_class": "Qwen2Tokenizer",
239
+ "unk_token": null
240
+ }
vocab.json ADDED
The diff for this file is too large to render. See raw diff