yujiepan commited on
Commit
fccc86c
·
verified ·
1 Parent(s): fddc3fd

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
.meta.json ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "Pillow": "12.2.0",
3
+ "accelerate": "1.15.0",
4
+ "av": "19.0.2",
5
+ "flashinfer-python": "0.7.2",
6
+ "huggingface_hub": "1.33.0",
7
+ "kernels": "0.17.0",
8
+ "numpy": "2.3.5",
9
+ "safetensors": "0.8.0",
10
+ "sglang": "0.5.23.dev384+g9ab74b851",
11
+ "tiny-random": "0.2.0",
12
+ "torch": "2.14.1",
13
+ "torchcodec": "0.17.0",
14
+ "transformers": "5.19.0"
15
+ }
README.md ADDED
@@ -0,0 +1,152 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ base_model:
4
+ - Qwen/Qwen3.8-27B
5
+ ---
6
+
7
+ This tiny model is intended for debugging. It is randomly initialized using the configuration adapted from [Qwen/Qwen3.8-27B](https://huggingface.co/Qwen/Qwen3.8-27B).
8
+
9
+ Structural comparison with `Qwen/Qwen3.8-27B`:
10
+
11
+ | Feature | Source | Tiny |
12
+ |---|---|---|
13
+ | Input modalities | Text, image, video | Same |
14
+ | Vocabulary | 248,320 | Same; special-token IDs preserved |
15
+ | Backbone layers | 64 | 8 |
16
+ | Hidden size | 5,120 | 128 |
17
+ | Attention Q/KV heads; head dim | 24/4; 256 | 12/2; 128 |
18
+ | Attention cycle | 3 linear + 1 full | Same; two complete cycles |
19
+ | Linear-attention key/value heads | 16/48 | 2/6 |
20
+ | Linear-attention key/value head dim | 128/128 | Same |
21
+ | MLP intermediate size | 17,408 | 512 |
22
+ | MTP | 1 full-attention layer; shared embeddings | Same |
23
+ | Vision layers / hidden size | 27 / 1,152 | 2 / 64 |
24
+ | Vision patch / temporal patch / merge | 16 / 2 / 2 | Same |
25
+ | Vision output size | 5,120 | 128 |
26
+ | Checkpoint format | BF16 | Same |
27
+
28
+ | File path | Size |
29
+ |------|------|
30
+ | model.safetensors | 139.9MB |
31
+
32
+
33
+ ### Example usage:
34
+
35
+ - SGLang
36
+
37
+ - Runs with TP=2, the embedded NEXTN/MTP layer, and CUDA Graph.
38
+ - Verified for text, image-plus-text and video-plus-text on two NVIDIA H20 GPUs;
39
+ see Test environment for dependency versions.
40
+
41
+ ```bash
42
+ model_id=tiny-random/qwen3.8
43
+ SGLANG_JIT_DEEPGEMM_FAST_WARMUP=1 sglang serve \
44
+ --model-path $model_id \
45
+ --tp-size 2 \
46
+ --speculative-algorithm NEXTN \
47
+ --speculative-num-steps 3 \
48
+ --speculative-eagle-topk 1 \
49
+ --speculative-num-draft-tokens 4 \
50
+ --context-length 4096 \
51
+ --max-total-tokens 4096 \
52
+ --chunked-prefill-size 512 \
53
+ --mem-fraction-static 0.4 \
54
+ --cuda-graph-config '{"decode": {"bs": [1, 2, 4, 8]}}' \
55
+ --disable-custom-all-reduce
56
+ ```
57
+
58
+ - Transformers
59
+
60
+ ```python
61
+ import torch
62
+ from PIL import Image
63
+ from transformers import AutoProcessor, Qwen3_5ForConditionalGeneration
64
+
65
+ model_id = "tiny-random/qwen3.8"
66
+ model = Qwen3_5ForConditionalGeneration.from_pretrained(
67
+ model_id, dtype=torch.bfloat16, device_map="cuda", attn_implementation="sdpa",
68
+ )
69
+ processor = AutoProcessor.from_pretrained(model_id)
70
+ messages = [{"role": "user", "content": [
71
+ {"type": "image", "image": Image.new("RGB", (64, 64), (220, 30, 30))},
72
+ {"type": "text", "text": "Describe this image."},
73
+ ]}]
74
+ inputs = processor.apply_chat_template(
75
+ messages, tokenize=True, add_generation_prompt=True,
76
+ return_dict=True, return_tensors="pt",
77
+ ).to(model.device)
78
+ output = model.generate(**inputs, do_sample=False, max_new_tokens=10)
79
+ print(processor.decode(output[0, inputs["input_ids"].shape[1]:], skip_special_tokens=True))
80
+ ```
81
+
82
+ ### Codes to create this repo:
83
+
84
+ <details><summary>Click to expand</summary>
85
+
86
+ ```python
87
+ import json
88
+ from pathlib import Path
89
+
90
+ import torch
91
+ from huggingface_hub import hf_hub_download
92
+ from transformers import AutoConfig, AutoModelForImageTextToText, AutoProcessor, GenerationConfig, set_seed
93
+ # Creation helpers: pip install git+https://github.com/yujiepan/tiny-random.git
94
+ from tiny_random.qwen_utils import add_qwen_mtp, save_random_qwen_checkpoint
95
+
96
+ source_model_id = "Qwen/Qwen3.8-27B"
97
+ save_folder = "/tmp/tiny-random/qwen38"
98
+ source_revision = '1d4bf0f2ff6012fd82039f2fa52739d0dd7c60c0'
99
+ set_seed(42)
100
+ folder = Path(save_folder)
101
+ folder.mkdir(parents=True, exist_ok=True)
102
+ raw = json.loads(Path(hf_hub_download(source_model_id, "config.json", revision=source_revision)).read_text())
103
+ raw["text_config"].update(
104
+ hidden_size=128, head_dim=128, num_hidden_layers=8,
105
+ layer_types=(["linear_attention"] * 3 + ["full_attention"]) * 2,
106
+ num_attention_heads=12, num_key_value_heads=2,
107
+ linear_num_key_heads=2, linear_num_value_heads=6,
108
+ linear_key_head_dim=128, linear_value_head_dim=128,
109
+ intermediate_size=512,
110
+ )
111
+ raw["text_config"]["rope_parameters"]["mrope_section"] = [6, 5, 5]
112
+ raw["vision_config"].update(depth=2, hidden_size=64, intermediate_size=128, num_heads=2, out_hidden_size=128)
113
+ (folder / "config.json").write_text(json.dumps(raw, indent=2))
114
+ config = AutoConfig.from_pretrained(folder)
115
+ model = AutoModelForImageTextToText.from_config(config, dtype=torch.bfloat16)
116
+ add_qwen_mtp(model, model.model.language_model)
117
+ save_random_qwen_checkpoint(model, folder)
118
+ AutoProcessor.from_pretrained(source_model_id, revision=source_revision).save_pretrained(folder)
119
+ GenerationConfig.from_pretrained(source_model_id, revision=source_revision).save_pretrained(folder)
120
+ ```
121
+
122
+ </details>
123
+
124
+ ### Printing the model:
125
+
126
+ <details><summary>Click to expand</summary>
127
+
128
+ ```text
129
+ Qwen3.8 VL: 8 backbone layers + 1 MTP layer; hidden_size=128
130
+ ```
131
+
132
+ </details>
133
+
134
+ ### Test environment:
135
+
136
+ - Pillow: 12.2.0
137
+ - accelerate: 1.15.0
138
+ - av: 19.0.2
139
+ - flashinfer-python: 0.7.2
140
+ - huggingface_hub: 1.33.0
141
+ - kernels: 0.17.0
142
+ - numpy: 2.3.5
143
+ - safetensors: 0.8.0
144
+ - sglang: 0.5.23.dev384+g9ab74b851
145
+ - tiny-random: 0.2.0
146
+ - torch: 2.14.1
147
+ - torchcodec: 0.17.0
148
+ - transformers: 5.19.0
149
+
150
+ ### Change log:
151
+
152
+ - 2026-10-23: Initial version.
chat_template.jinja ADDED
@@ -0,0 +1,170 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ {%- set reasoning_instructions = '' %}
46
+ {%- if enable_thinking is undefined or enable_thinking is true %}
47
+ {%- set resolved_reasoning_effort = reasoning_effort|default('xhigh') %}
48
+ {%- if resolved_reasoning_effort not in ('xhigh', 'medium', 'low') %}
49
+ {{- raise_exception('Unexpected reasoning effort ' ~ reasoning_effort ~ '. Supported types are xhigh (default), medium, and low.') }}
50
+ {%- endif %}
51
+ {%- if resolved_reasoning_effort == 'xhigh' %}
52
+ {%- set reasoning_instructions = 'Reasoning effort is set to xhigh. Please think carefully through the task, validate key assumptions, consider plausible alternatives, and prioritize correctness, consistency, and clarity in the final answer.' %}
53
+ {%- elif resolved_reasoning_effort == 'low' %}
54
+ {%- set reasoning_instructions = 'Reasoning effort is set to low. Keep your thinking brief and focused, moving directly to the conclusion without unnecessary elaboration.' %}
55
+ {%- endif %}
56
+ {%- endif %}
57
+ {%- if tools and tools is iterable and tools is not mapping %}
58
+ {{- '<|im_start|>system\n' }}
59
+ {%- if reasoning_instructions %}
60
+ {{- reasoning_instructions + '\n\n' }}
61
+ {%- endif %}
62
+ {{- "# Tools\n\nYou have access to the following functions:\n\n<tools>" }}
63
+ {%- for tool in tools %}
64
+ {{- "\n" }}
65
+ {{- tool | tojson }}
66
+ {%- endfor %}
67
+ {{- "\n</tools>" }}
68
+ {{- '\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>' }}
69
+ {%- if messages[0].role == 'system' %}
70
+ {%- set content = render_content(messages[0].content, false, true)|trim %}
71
+ {%- if content %}
72
+ {{- '\n\n' + content }}
73
+ {%- endif %}
74
+ {%- endif %}
75
+ {{- '<|im_end|>\n' }}
76
+ {%- else %}
77
+ {%- if messages[0].role == 'system' %}
78
+ {%- set content = render_content(messages[0].content, false, true)|trim %}
79
+ {%- if content %}
80
+ {{- '<|im_start|>system\n' + (reasoning_instructions + '\n\n' if reasoning_instructions else '') + content + '<|im_end|>\n' }}
81
+ {%- elif reasoning_instructions %}
82
+ {{- '<|im_start|>system\n' + reasoning_instructions + '<|im_end|>\n' }}
83
+ {%- endif %}
84
+ {%- elif reasoning_instructions %}
85
+ {{- '<|im_start|>system\n' + reasoning_instructions + '<|im_end|>\n' }}
86
+ {%- endif %}
87
+ {%- endif %}
88
+ {%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}
89
+ {%- for message in messages[::-1] %}
90
+ {%- set index = (messages|length - 1) - loop.index0 %}
91
+ {%- if ns.multi_step_tool and message.role == "user" %}
92
+ {%- set content = render_content(message.content, false)|trim %}
93
+ {%- if not(content.startswith('<tool_response>') and content.endswith('</tool_response>')) %}
94
+ {%- set ns.multi_step_tool = false %}
95
+ {%- set ns.last_query_index = index %}
96
+ {%- endif %}
97
+ {%- endif %}
98
+ {%- endfor %}
99
+ {%- if ns.multi_step_tool %}
100
+ {{- raise_exception('No user query found in messages.') }}
101
+ {%- endif %}
102
+ {%- for message in messages %}
103
+ {%- set content = render_content(message.content, true)|trim %}
104
+ {%- if message.role == "system" %}
105
+ {%- if not loop.first %}
106
+ {{- raise_exception('System message must be at the beginning.') }}
107
+ {%- endif %}
108
+ {%- elif message.role == "user" %}
109
+ {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }}
110
+ {%- elif message.role == "assistant" %}
111
+ {%- set reasoning_content = '' %}
112
+ {%- if message.reasoning_content is string %}
113
+ {%- set reasoning_content = message.reasoning_content %}
114
+ {%- endif %}
115
+ {%- set reasoning_content = reasoning_content|trim %}
116
+ {%- if preserve_thinking is undefined or preserve_thinking is true or loop.index0 > ns.last_query_index %}
117
+ {{- '<|im_start|>' + message.role + '\n<think>\n' + reasoning_content + '\n</think>\n\n' + content }}
118
+ {%- else %}
119
+ {{- '<|im_start|>' + message.role + '\n' + content }}
120
+ {%- endif %}
121
+ {%- if message.tool_calls and message.tool_calls is iterable and message.tool_calls is not mapping %}
122
+ {%- for tool_call in message.tool_calls %}
123
+ {%- if tool_call.function is defined %}
124
+ {%- set tool_call = tool_call.function %}
125
+ {%- endif %}
126
+ {%- if loop.first %}
127
+ {%- if content|trim %}
128
+ {{- '\n\n<tool_call>\n<function=' + tool_call.name + '>\n' }}
129
+ {%- else %}
130
+ {{- '<tool_call>\n<function=' + tool_call.name + '>\n' }}
131
+ {%- endif %}
132
+ {%- else %}
133
+ {{- '\n<tool_call>\n<function=' + tool_call.name + '>\n' }}
134
+ {%- endif %}
135
+ {%- if tool_call.arguments is defined and tool_call.arguments != '' %}
136
+ {%- for args_name, args_value in tool_call.arguments|items %}
137
+ {{- '<parameter=' + args_name + '>\n' }}
138
+ {%- set args_value = args_value | string if args_value is string else args_value | tojson | safe %}
139
+ {{- args_value }}
140
+ {{- '\n</parameter>\n' }}
141
+ {%- endfor %}
142
+ {%- endif %}
143
+ {{- '</function>\n</tool_call>' }}
144
+ {%- endfor %}
145
+ {%- endif %}
146
+ {{- '<|im_end|>\n' }}
147
+ {%- elif message.role == "tool" %}
148
+ {%- if loop.previtem and loop.previtem.role != "tool" %}
149
+ {{- '<|im_start|>user' }}
150
+ {%- endif %}
151
+ {{- '\n<tool_response>\n' }}
152
+ {{- content }}
153
+ {{- '\n</tool_response>' }}
154
+ {%- if not loop.last and loop.nextitem.role != "tool" %}
155
+ {{- '<|im_end|>\n' }}
156
+ {%- elif loop.last %}
157
+ {{- '<|im_end|>\n' }}
158
+ {%- endif %}
159
+ {%- else %}
160
+ {{- raise_exception('Unexpected message role.') }}
161
+ {%- endif %}
162
+ {%- endfor %}
163
+ {%- if add_generation_prompt %}
164
+ {{- '<|im_start|>assistant\n' }}
165
+ {%- if enable_thinking is defined and enable_thinking is false %}
166
+ {{- '<think>\n\n</think>\n\n' }}
167
+ {%- else %}
168
+ {{- '<think>\n' }}
169
+ {%- endif %}
170
+ {%- endif %}
config.json ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "Qwen3_5ForConditionalGeneration"
4
+ ],
5
+ "image_token_id": 248056,
6
+ "language_model_only": false,
7
+ "model_type": "qwen3_5",
8
+ "text_config": {
9
+ "attention_bias": false,
10
+ "attention_dropout": 0.0,
11
+ "attn_output_gate": true,
12
+ "bos_token_id": 248044,
13
+ "dtype": "bfloat16",
14
+ "eos_token_id": 248044,
15
+ "full_attention_interval": 4,
16
+ "head_dim": 128,
17
+ "hidden_act": "silu",
18
+ "hidden_size": 128,
19
+ "initializer_range": 0.02,
20
+ "intermediate_size": 512,
21
+ "layer_types": [
22
+ "linear_attention",
23
+ "linear_attention",
24
+ "linear_attention",
25
+ "full_attention",
26
+ "linear_attention",
27
+ "linear_attention",
28
+ "linear_attention",
29
+ "full_attention"
30
+ ],
31
+ "linear_conv_kernel_dim": 4,
32
+ "linear_key_head_dim": 128,
33
+ "linear_num_key_heads": 2,
34
+ "linear_num_value_heads": 6,
35
+ "linear_value_head_dim": 128,
36
+ "mamba_ssm_dtype": "float32",
37
+ "max_position_embeddings": 262144,
38
+ "model_type": "qwen3_5_text",
39
+ "mtp_num_hidden_layers": 1,
40
+ "mtp_use_dedicated_embeddings": false,
41
+ "num_attention_heads": 12,
42
+ "num_hidden_layers": 8,
43
+ "num_key_value_heads": 2,
44
+ "output_gate_type": "swish",
45
+ "pad_token_id": null,
46
+ "partial_rotary_factor": 0.25,
47
+ "rms_norm_eps": 1e-06,
48
+ "rope_parameters": {
49
+ "mrope_interleaved": true,
50
+ "mrope_section": [
51
+ 6,
52
+ 5,
53
+ 5
54
+ ],
55
+ "partial_rotary_factor": 0.25,
56
+ "rope_theta": 10000000,
57
+ "rope_type": "default"
58
+ },
59
+ "tie_word_embeddings": false,
60
+ "use_cache": true,
61
+ "vocab_size": 248320
62
+ },
63
+ "tie_word_embeddings": false,
64
+ "transformers_version": "5.8.0.dev0",
65
+ "video_token_id": 248057,
66
+ "vision_config": {
67
+ "deepstack_visual_indexes": [],
68
+ "depth": 2,
69
+ "hidden_act": "gelu_pytorch_tanh",
70
+ "hidden_size": 64,
71
+ "in_channels": 3,
72
+ "initializer_range": 0.02,
73
+ "intermediate_size": 128,
74
+ "model_type": "qwen3_5",
75
+ "num_heads": 2,
76
+ "num_position_embeddings": 2304,
77
+ "out_hidden_size": 128,
78
+ "patch_size": 16,
79
+ "spatial_merge_size": 2,
80
+ "temporal_patch_size": 2
81
+ },
82
+ "vision_end_token_id": 248054,
83
+ "vision_start_token_id": 248053
84
+ }
generation_config.json ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token_id": 248044,
3
+ "do_sample": true,
4
+ "eos_token_id": [
5
+ 248046,
6
+ 248044
7
+ ],
8
+ "pad_token_id": 248044,
9
+ "temperature": 1.0,
10
+ "top_k": 20,
11
+ "top_p": 0.95,
12
+ "transformers_version": "5.19.0"
13
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0ad7d04172397ad42753662b4786257103b27440fd2bb64c07663c37da9e5135
3
+ size 139932696
processor_config.json ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "max_video_tokens": 768,
48
+ "merge_size": 2,
49
+ "min_frames": 4,
50
+ "patch_size": 16,
51
+ "resample": 3,
52
+ "rescale_factor": 0.00392156862745098,
53
+ "return_metadata": false,
54
+ "size": {
55
+ "longest_edge": 25165824,
56
+ "shortest_edge": 4096
57
+ },
58
+ "temporal_patch_size": 2,
59
+ "video_processor_type": "Qwen3VLVideoProcessor"
60
+ }
61
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a5cd9732badce41de57e6efce8302930ded1c1188c5f81feb2bd6c24c4a1941f
3
+ size 19989339
tokenizer_config.json ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "extra_special_tokens": [
12
+ "<|im_start|>",
13
+ "<|im_end|>",
14
+ "<|object_ref_start|>",
15
+ "<|object_ref_end|>",
16
+ "<|box_start|>",
17
+ "<|box_end|>",
18
+ "<|quad_start|>",
19
+ "<|quad_end|>",
20
+ "<|vision_start|>",
21
+ "<|vision_end|>",
22
+ "<|vision_pad|>",
23
+ "<|image_pad|>",
24
+ "<|video_pad|>"
25
+ ],
26
+ "image_token": "<|image_pad|>",
27
+ "is_local": false,
28
+ "local_files_only": false,
29
+ "merges_file": null,
30
+ "model_max_length": 262144,
31
+ "model_specific_special_tokens": {
32
+ "audio_bos_token": "<|audio_start|>",
33
+ "audio_eos_token": "<|audio_end|>",
34
+ "audio_token": "<|audio_pad|>",
35
+ "image_token": "<|image_pad|>",
36
+ "video_token": "<|video_pad|>",
37
+ "vision_bos_token": "<|vision_start|>",
38
+ "vision_eos_token": "<|vision_end|>"
39
+ },
40
+ "pad_token": "<|endoftext|>",
41
+ "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+",
42
+ "processor_class": "Qwen3VLProcessor",
43
+ "split_special_tokens": false,
44
+ "tokenizer_class": "Qwen3_5Tokenizer",
45
+ "unk_token": null,
46
+ "video_token": "<|video_pad|>",
47
+ "vision_bos_token": "<|vision_start|>",
48
+ "vision_eos_token": "<|vision_end|>"
49
+ }