jykim310 bokyeong1015 commited on
Commit
a67b0fe
·
0 Parent(s):

Model upload

Browse files

Co-authored-by: Bo-Kyeong Kim <bokyeong.kim@nota.ai>

.gitattributes ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz 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
37
+ *.png filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ base_model: Qwen/Qwen3.5-4B
4
+ base_model_relation: quantized
5
+ pipeline_tag: text-generation
6
+ tags:
7
+ - qwen3.5
8
+ - quantization
9
+ - int4
10
+ - w4a16
11
+ - compressed-tensors
12
+ - quantization-aware-distillation
13
+ - efficient-inference
14
+ ---
15
+
16
+ <!-- TODO(release): fill the arXiv id. -->
17
+
18
+ <h1 align="center">Qwen3.5-4B-QAD-W4A16</h1>
19
+
20
+ <div align="center">
21
+
22
+ [![paper](https://img.shields.io/badge/arXiv-2607.04244-b31b1b.svg)](https://arxiv.org/abs/2607.04244)
23
+ [![code](https://img.shields.io/badge/GitHub-full%20pipeline-181717?logo=github)](https://github.com/nota-github/adaptfm-quant-dflash)
24
+ <br/>
25
+ [![target model](https://img.shields.io/badge/%F0%9F%A4%97%20Target-Qwen3.5--4B--QAD--W4A16-yellow)](https://huggingface.co/nota-ai/Qwen3.5-4B-QAD-W4A16)
26
+ [![drafter model](https://img.shields.io/badge/%F0%9F%A4%97%20Drafter-Qwen3.5--4B--DFlash--GPTQ--W4A16-yellow)](https://huggingface.co/nota-ai/Qwen3.5-4B-DFlash-GPTQ-W4A16)
27
+
28
+ </div>
29
+
30
+ ## Introduction
31
+
32
+ <p align="center">
33
+ <img src="figure/pipeline.png" alt="Pipeline: QAD INT4 target distillation, two-stage block-diffusion DFlash drafter training, and INT4-GPTQ + SWA drafter optimization." width="800">
34
+ </p>
35
+
36
+ We reduce Qwen3.5-4B inference latency on a single A10G by quantizing both the target model and its speculative-decoding drafter to INT4, while maintaining quality across all three gates (MMLU-Pro, IFEval, GPQA-Diamond). This repository reproduces our 3rd-place Efficient Qwen Competition ([AdaptFM @ ICML 2026](https://adaptfm.gitlab.io/)) entry end to end. It combines three techniques:
37
+
38
+ - **Quantization-Aware Distillation (QAD):** trains the INT4 target model to follow the original BF16 model's distribution, recovering the accuracy that post-training quantization (PTQ) loses.
39
+ - **Two-Stage Training for Block-Diffusion Drafter:** pretrains the DFlash drafter with the BF16 target, then finetunes it on the QAD-applied INT4 target so it aligns with the quantized target distribution better than direct QAD-target training does.
40
+ - **Drafter Optimization:** applies INT4 GPTQ and Sliding-Window Attention (SWA) to reduce drafter overhead while maintaining acceptance length.
41
+
42
+ **Hardware:** Final serving and evaluation run on a single NVIDIA A10G 24 GB GPU. Retraining the QAD target and drafter requires an 80 GB-class multi-GPU machine, with at least 2 GPUs and preferably 8 GPUs. The gated prompt dataset is a one-time ~42 GB download.
43
+
44
+ ## Quickstart (vLLM)
45
+
46
+ ```bash
47
+ vllm serve nota-ai/Qwen3.5-4B-QAD-W4A16 \
48
+ --quantization compressed-tensors \
49
+ --trust-remote-code
50
+ ```
51
+
52
+ - For speculative decoding with the companion W4A16 DFlash drafter, see the **[drafter card](https://huggingface.co/nota-ai/Qwen3.5-4B-DFlash-GPTQ-W4A16)**.
53
+
54
+ ## Citation
55
+
56
+ ```bibtex
57
+ @article{kim2026quantize,
58
+ title = {Quantize the Target, Quantize the Drafter: Efficient Inference with Qwen3.5-4B},
59
+ author = {Jaeyeon Kim and Jewon Lee and Bo-Kyeong Kim},
60
+ journal = {arXiv preprint arXiv:2607.04244},
61
+ year = {2026}
62
+ }
63
+ ```
64
+
65
+
66
+ ## License & provenance
67
+
68
+ Apache-2.0, derived from [Qwen/Qwen3.5-4B](https://huggingface.co/Qwen/Qwen3.5-4B)
69
+ (Apache-2.0) with INT4 initialization from
70
+ [cyankiwi/Qwen3.5-4B-AWQ-4bit](https://huggingface.co/cyankiwi/Qwen3.5-4B-AWQ-4bit).
71
+ Distillation data derives from NVIDIA's [Nemotron-Post-Training-Dataset-v2](https://huggingface.co/datasets/nvidia/Nemotron-Post-Training-Dataset-v2) (gated;
72
+ see its terms).
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,384 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "Qwen3_5ForConditionalGeneration"
4
+ ],
5
+ "dtype": "bfloat16",
6
+ "eos_token_id": 248046,
7
+ "image_token_id": 248056,
8
+ "model_type": "qwen3_5",
9
+ "pad_token_id": 248044,
10
+ "text_config": {
11
+ "attention_bias": false,
12
+ "attention_dropout": 0.0,
13
+ "attn_output_gate": true,
14
+ "bos_token_id": null,
15
+ "dtype": "bfloat16",
16
+ "eos_token_id": 248044,
17
+ "full_attention_interval": 4,
18
+ "head_dim": 256,
19
+ "hidden_act": "silu",
20
+ "hidden_size": 2560,
21
+ "initializer_range": 0.02,
22
+ "intermediate_size": 9216,
23
+ "layer_types": [
24
+ "linear_attention",
25
+ "linear_attention",
26
+ "linear_attention",
27
+ "full_attention",
28
+ "linear_attention",
29
+ "linear_attention",
30
+ "linear_attention",
31
+ "full_attention",
32
+ "linear_attention",
33
+ "linear_attention",
34
+ "linear_attention",
35
+ "full_attention",
36
+ "linear_attention",
37
+ "linear_attention",
38
+ "linear_attention",
39
+ "full_attention",
40
+ "linear_attention",
41
+ "linear_attention",
42
+ "linear_attention",
43
+ "full_attention",
44
+ "linear_attention",
45
+ "linear_attention",
46
+ "linear_attention",
47
+ "full_attention",
48
+ "linear_attention",
49
+ "linear_attention",
50
+ "linear_attention",
51
+ "full_attention",
52
+ "linear_attention",
53
+ "linear_attention",
54
+ "linear_attention",
55
+ "full_attention"
56
+ ],
57
+ "linear_conv_kernel_dim": 4,
58
+ "linear_key_head_dim": 128,
59
+ "linear_num_key_heads": 16,
60
+ "linear_num_value_heads": 32,
61
+ "linear_value_head_dim": 128,
62
+ "mamba_ssm_dtype": "float32",
63
+ "max_position_embeddings": 262144,
64
+ "mlp_only_layers": [],
65
+ "model_type": "qwen3_5_text",
66
+ "mtp_num_hidden_layers": 1,
67
+ "mtp_use_dedicated_embeddings": false,
68
+ "num_attention_heads": 16,
69
+ "num_hidden_layers": 32,
70
+ "num_key_value_heads": 4,
71
+ "pad_token_id": null,
72
+ "partial_rotary_factor": 0.25,
73
+ "rms_norm_eps": 1e-06,
74
+ "rope_parameters": {
75
+ "mrope_interleaved": true,
76
+ "mrope_section": [
77
+ 11,
78
+ 11,
79
+ 10
80
+ ],
81
+ "partial_rotary_factor": 0.25,
82
+ "rope_theta": 10000000,
83
+ "rope_type": "default"
84
+ },
85
+ "tie_word_embeddings": true,
86
+ "use_cache": true,
87
+ "vocab_size": 248320
88
+ },
89
+ "tie_word_embeddings": true,
90
+ "transformers_version": "5.5.4",
91
+ "use_cache": false,
92
+ "video_token_id": 248057,
93
+ "vision_config": {
94
+ "deepstack_visual_indexes": [],
95
+ "depth": 24,
96
+ "dtype": "bfloat16",
97
+ "hidden_act": "gelu_pytorch_tanh",
98
+ "hidden_size": 1024,
99
+ "in_channels": 3,
100
+ "initializer_range": 0.02,
101
+ "intermediate_size": 4096,
102
+ "model_type": "qwen3_5",
103
+ "num_heads": 16,
104
+ "num_position_embeddings": 2304,
105
+ "out_hidden_size": 2560,
106
+ "patch_size": 16,
107
+ "spatial_merge_size": 2,
108
+ "temporal_patch_size": 2
109
+ },
110
+ "vision_end_token_id": 248054,
111
+ "vision_start_token_id": 248053,
112
+ "quantization_config": {
113
+ "config_groups": {
114
+ "group_0": {
115
+ "format": "pack-quantized",
116
+ "input_activations": null,
117
+ "output_activations": null,
118
+ "targets": [
119
+ "Linear"
120
+ ],
121
+ "weights": {
122
+ "actorder": null,
123
+ "block_structure": null,
124
+ "dynamic": false,
125
+ "group_size": 32,
126
+ "num_bits": 4,
127
+ "observer": "minmax",
128
+ "observer_kwargs": {},
129
+ "scale_dtype": null,
130
+ "strategy": "group",
131
+ "symmetric": true,
132
+ "type": "int",
133
+ "zp_dtype": null
134
+ }
135
+ }
136
+ },
137
+ "format": "pack-quantized",
138
+ "global_compression_ratio": null,
139
+ "ignore": [
140
+ "model.language_model.layers.0.linear_attn.conv1d",
141
+ "model.language_model.layers.0.linear_attn.in_proj_a",
142
+ "model.language_model.layers.0.linear_attn.in_proj_b",
143
+ "model.language_model.layers.1.linear_attn.conv1d",
144
+ "model.language_model.layers.1.linear_attn.in_proj_a",
145
+ "model.language_model.layers.1.linear_attn.in_proj_b",
146
+ "model.language_model.layers.10.linear_attn.conv1d",
147
+ "model.language_model.layers.10.linear_attn.in_proj_a",
148
+ "model.language_model.layers.10.linear_attn.in_proj_b",
149
+ "model.language_model.layers.12.linear_attn.conv1d",
150
+ "model.language_model.layers.12.linear_attn.in_proj_a",
151
+ "model.language_model.layers.12.linear_attn.in_proj_b",
152
+ "model.language_model.layers.13.linear_attn.conv1d",
153
+ "model.language_model.layers.13.linear_attn.in_proj_a",
154
+ "model.language_model.layers.13.linear_attn.in_proj_b",
155
+ "model.language_model.layers.14.linear_attn.conv1d",
156
+ "model.language_model.layers.14.linear_attn.in_proj_a",
157
+ "model.language_model.layers.14.linear_attn.in_proj_b",
158
+ "model.language_model.layers.16.linear_attn.conv1d",
159
+ "model.language_model.layers.16.linear_attn.in_proj_a",
160
+ "model.language_model.layers.16.linear_attn.in_proj_b",
161
+ "model.language_model.layers.17.linear_attn.conv1d",
162
+ "model.language_model.layers.17.linear_attn.in_proj_a",
163
+ "model.language_model.layers.17.linear_attn.in_proj_b",
164
+ "model.language_model.layers.18.linear_attn.conv1d",
165
+ "model.language_model.layers.18.linear_attn.in_proj_a",
166
+ "model.language_model.layers.18.linear_attn.in_proj_b",
167
+ "model.language_model.layers.2.linear_attn.conv1d",
168
+ "model.language_model.layers.2.linear_attn.in_proj_a",
169
+ "model.language_model.layers.2.linear_attn.in_proj_b",
170
+ "model.language_model.layers.20.linear_attn.conv1d",
171
+ "model.language_model.layers.20.linear_attn.in_proj_a",
172
+ "model.language_model.layers.20.linear_attn.in_proj_b",
173
+ "model.language_model.layers.21.linear_attn.conv1d",
174
+ "model.language_model.layers.21.linear_attn.in_proj_a",
175
+ "model.language_model.layers.21.linear_attn.in_proj_b",
176
+ "model.language_model.layers.22.linear_attn.conv1d",
177
+ "model.language_model.layers.22.linear_attn.in_proj_a",
178
+ "model.language_model.layers.22.linear_attn.in_proj_b",
179
+ "model.language_model.layers.24.linear_attn.conv1d",
180
+ "model.language_model.layers.24.linear_attn.in_proj_a",
181
+ "model.language_model.layers.24.linear_attn.in_proj_b",
182
+ "model.language_model.layers.25.linear_attn.conv1d",
183
+ "model.language_model.layers.25.linear_attn.in_proj_a",
184
+ "model.language_model.layers.25.linear_attn.in_proj_b",
185
+ "model.language_model.layers.26.linear_attn.conv1d",
186
+ "model.language_model.layers.26.linear_attn.in_proj_a",
187
+ "model.language_model.layers.26.linear_attn.in_proj_b",
188
+ "model.language_model.layers.28.linear_attn.conv1d",
189
+ "model.language_model.layers.28.linear_attn.in_proj_a",
190
+ "model.language_model.layers.28.linear_attn.in_proj_b",
191
+ "model.language_model.layers.29.linear_attn.conv1d",
192
+ "model.language_model.layers.29.linear_attn.in_proj_a",
193
+ "model.language_model.layers.29.linear_attn.in_proj_b",
194
+ "model.language_model.layers.30.linear_attn.conv1d",
195
+ "model.language_model.layers.30.linear_attn.in_proj_a",
196
+ "model.language_model.layers.30.linear_attn.in_proj_b",
197
+ "model.language_model.layers.4.linear_attn.conv1d",
198
+ "model.language_model.layers.4.linear_attn.in_proj_a",
199
+ "model.language_model.layers.4.linear_attn.in_proj_b",
200
+ "model.language_model.layers.5.linear_attn.conv1d",
201
+ "model.language_model.layers.5.linear_attn.in_proj_a",
202
+ "model.language_model.layers.5.linear_attn.in_proj_b",
203
+ "model.language_model.layers.6.linear_attn.conv1d",
204
+ "model.language_model.layers.6.linear_attn.in_proj_a",
205
+ "model.language_model.layers.6.linear_attn.in_proj_b",
206
+ "model.language_model.layers.8.linear_attn.conv1d",
207
+ "model.language_model.layers.8.linear_attn.in_proj_a",
208
+ "model.language_model.layers.8.linear_attn.in_proj_b",
209
+ "model.language_model.layers.9.linear_attn.conv1d",
210
+ "model.language_model.layers.9.linear_attn.in_proj_a",
211
+ "model.language_model.layers.9.linear_attn.in_proj_b",
212
+ "model.visual.blocks.0.attn.proj",
213
+ "model.visual.blocks.0.attn.qkv",
214
+ "model.visual.blocks.0.mlp.linear_fc1",
215
+ "model.visual.blocks.0.mlp.linear_fc2",
216
+ "model.visual.blocks.0.norm1",
217
+ "model.visual.blocks.0.norm2",
218
+ "model.visual.blocks.1.attn.proj",
219
+ "model.visual.blocks.1.attn.qkv",
220
+ "model.visual.blocks.1.mlp.linear_fc1",
221
+ "model.visual.blocks.1.mlp.linear_fc2",
222
+ "model.visual.blocks.1.norm1",
223
+ "model.visual.blocks.1.norm2",
224
+ "model.visual.blocks.10.attn.proj",
225
+ "model.visual.blocks.10.attn.qkv",
226
+ "model.visual.blocks.10.mlp.linear_fc1",
227
+ "model.visual.blocks.10.mlp.linear_fc2",
228
+ "model.visual.blocks.10.norm1",
229
+ "model.visual.blocks.10.norm2",
230
+ "model.visual.blocks.11.attn.proj",
231
+ "model.visual.blocks.11.attn.qkv",
232
+ "model.visual.blocks.11.mlp.linear_fc1",
233
+ "model.visual.blocks.11.mlp.linear_fc2",
234
+ "model.visual.blocks.11.norm1",
235
+ "model.visual.blocks.11.norm2",
236
+ "model.visual.blocks.12.attn.proj",
237
+ "model.visual.blocks.12.attn.qkv",
238
+ "model.visual.blocks.12.mlp.linear_fc1",
239
+ "model.visual.blocks.12.mlp.linear_fc2",
240
+ "model.visual.blocks.12.norm1",
241
+ "model.visual.blocks.12.norm2",
242
+ "model.visual.blocks.13.attn.proj",
243
+ "model.visual.blocks.13.attn.qkv",
244
+ "model.visual.blocks.13.mlp.linear_fc1",
245
+ "model.visual.blocks.13.mlp.linear_fc2",
246
+ "model.visual.blocks.13.norm1",
247
+ "model.visual.blocks.13.norm2",
248
+ "model.visual.blocks.14.attn.proj",
249
+ "model.visual.blocks.14.attn.qkv",
250
+ "model.visual.blocks.14.mlp.linear_fc1",
251
+ "model.visual.blocks.14.mlp.linear_fc2",
252
+ "model.visual.blocks.14.norm1",
253
+ "model.visual.blocks.14.norm2",
254
+ "model.visual.blocks.15.attn.proj",
255
+ "model.visual.blocks.15.attn.qkv",
256
+ "model.visual.blocks.15.mlp.linear_fc1",
257
+ "model.visual.blocks.15.mlp.linear_fc2",
258
+ "model.visual.blocks.15.norm1",
259
+ "model.visual.blocks.15.norm2",
260
+ "model.visual.blocks.16.attn.proj",
261
+ "model.visual.blocks.16.attn.qkv",
262
+ "model.visual.blocks.16.mlp.linear_fc1",
263
+ "model.visual.blocks.16.mlp.linear_fc2",
264
+ "model.visual.blocks.16.norm1",
265
+ "model.visual.blocks.16.norm2",
266
+ "model.visual.blocks.17.attn.proj",
267
+ "model.visual.blocks.17.attn.qkv",
268
+ "model.visual.blocks.17.mlp.linear_fc1",
269
+ "model.visual.blocks.17.mlp.linear_fc2",
270
+ "model.visual.blocks.17.norm1",
271
+ "model.visual.blocks.17.norm2",
272
+ "model.visual.blocks.18.attn.proj",
273
+ "model.visual.blocks.18.attn.qkv",
274
+ "model.visual.blocks.18.mlp.linear_fc1",
275
+ "model.visual.blocks.18.mlp.linear_fc2",
276
+ "model.visual.blocks.18.norm1",
277
+ "model.visual.blocks.18.norm2",
278
+ "model.visual.blocks.19.attn.proj",
279
+ "model.visual.blocks.19.attn.qkv",
280
+ "model.visual.blocks.19.mlp.linear_fc1",
281
+ "model.visual.blocks.19.mlp.linear_fc2",
282
+ "model.visual.blocks.19.norm1",
283
+ "model.visual.blocks.19.norm2",
284
+ "model.visual.blocks.2.attn.proj",
285
+ "model.visual.blocks.2.attn.qkv",
286
+ "model.visual.blocks.2.mlp.linear_fc1",
287
+ "model.visual.blocks.2.mlp.linear_fc2",
288
+ "model.visual.blocks.2.norm1",
289
+ "model.visual.blocks.2.norm2",
290
+ "model.visual.blocks.20.attn.proj",
291
+ "model.visual.blocks.20.attn.qkv",
292
+ "model.visual.blocks.20.mlp.linear_fc1",
293
+ "model.visual.blocks.20.mlp.linear_fc2",
294
+ "model.visual.blocks.20.norm1",
295
+ "model.visual.blocks.20.norm2",
296
+ "model.visual.blocks.21.attn.proj",
297
+ "model.visual.blocks.21.attn.qkv",
298
+ "model.visual.blocks.21.mlp.linear_fc1",
299
+ "model.visual.blocks.21.mlp.linear_fc2",
300
+ "model.visual.blocks.21.norm1",
301
+ "model.visual.blocks.21.norm2",
302
+ "model.visual.blocks.22.attn.proj",
303
+ "model.visual.blocks.22.attn.qkv",
304
+ "model.visual.blocks.22.mlp.linear_fc1",
305
+ "model.visual.blocks.22.mlp.linear_fc2",
306
+ "model.visual.blocks.22.norm1",
307
+ "model.visual.blocks.22.norm2",
308
+ "model.visual.blocks.23.attn.proj",
309
+ "model.visual.blocks.23.attn.qkv",
310
+ "model.visual.blocks.23.mlp.linear_fc1",
311
+ "model.visual.blocks.23.mlp.linear_fc2",
312
+ "model.visual.blocks.23.norm1",
313
+ "model.visual.blocks.23.norm2",
314
+ "model.visual.blocks.3.attn.proj",
315
+ "model.visual.blocks.3.attn.qkv",
316
+ "model.visual.blocks.3.mlp.linear_fc1",
317
+ "model.visual.blocks.3.mlp.linear_fc2",
318
+ "model.visual.blocks.3.norm1",
319
+ "model.visual.blocks.3.norm2",
320
+ "model.visual.blocks.4.attn.proj",
321
+ "model.visual.blocks.4.attn.qkv",
322
+ "model.visual.blocks.4.mlp.linear_fc1",
323
+ "model.visual.blocks.4.mlp.linear_fc2",
324
+ "model.visual.blocks.4.norm1",
325
+ "model.visual.blocks.4.norm2",
326
+ "model.visual.blocks.5.attn.proj",
327
+ "model.visual.blocks.5.attn.qkv",
328
+ "model.visual.blocks.5.mlp.linear_fc1",
329
+ "model.visual.blocks.5.mlp.linear_fc2",
330
+ "model.visual.blocks.5.norm1",
331
+ "model.visual.blocks.5.norm2",
332
+ "model.visual.blocks.6.attn.proj",
333
+ "model.visual.blocks.6.attn.qkv",
334
+ "model.visual.blocks.6.mlp.linear_fc1",
335
+ "model.visual.blocks.6.mlp.linear_fc2",
336
+ "model.visual.blocks.6.norm1",
337
+ "model.visual.blocks.6.norm2",
338
+ "model.visual.blocks.7.attn.proj",
339
+ "model.visual.blocks.7.attn.qkv",
340
+ "model.visual.blocks.7.mlp.linear_fc1",
341
+ "model.visual.blocks.7.mlp.linear_fc2",
342
+ "model.visual.blocks.7.norm1",
343
+ "model.visual.blocks.7.norm2",
344
+ "model.visual.blocks.8.attn.proj",
345
+ "model.visual.blocks.8.attn.qkv",
346
+ "model.visual.blocks.8.mlp.linear_fc1",
347
+ "model.visual.blocks.8.mlp.linear_fc2",
348
+ "model.visual.blocks.8.norm1",
349
+ "model.visual.blocks.8.norm2",
350
+ "model.visual.blocks.9.attn.proj",
351
+ "model.visual.blocks.9.attn.qkv",
352
+ "model.visual.blocks.9.mlp.linear_fc1",
353
+ "model.visual.blocks.9.mlp.linear_fc2",
354
+ "model.visual.blocks.9.norm1",
355
+ "model.visual.blocks.9.norm2",
356
+ "model.visual.merger.linear_fc1",
357
+ "model.visual.merger.linear_fc2",
358
+ "model.visual.merger.norm",
359
+ "model.visual.patch_embed.proj",
360
+ "model.visual.pos_embed",
361
+ "mtp.fc",
362
+ "mtp.layers.0.input_layernorm",
363
+ "mtp.layers.0.mlp.down_proj",
364
+ "mtp.layers.0.mlp.gate_proj",
365
+ "mtp.layers.0.mlp.up_proj",
366
+ "mtp.layers.0.post_attention_layernorm",
367
+ "mtp.layers.0.self_attn.k_norm",
368
+ "mtp.layers.0.self_attn.k_proj",
369
+ "mtp.layers.0.self_attn.o_proj",
370
+ "mtp.layers.0.self_attn.q_norm",
371
+ "mtp.layers.0.self_attn.q_proj",
372
+ "mtp.layers.0.self_attn.v_proj",
373
+ "mtp.norm",
374
+ "mtp.pre_fc_norm_embedding",
375
+ "mtp.pre_fc_norm_hidden"
376
+ ],
377
+ "kv_cache_scheme": null,
378
+ "quant_method": "compressed-tensors",
379
+ "quantization_status": "compressed",
380
+ "sparsity_config": {},
381
+ "transform_config": {},
382
+ "version": "0.14.1"
383
+ }
384
+ }
figure/pipeline.png ADDED

Git LFS Details

  • SHA256: 22922767c558eec88bd1bae74676c96753e8f0c6bf4b807672ee15453bdc7d4e
  • Pointer size: 131 Bytes
  • Size of remote file: 461 kB
merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0df3baab330b306ca44461a156234b321bea78496723ec6d1d70e60b7c652f24
3
+ size 4194960928
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
+ }
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": false,
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