Xenova HF Staff kvaishnavi commited on
Commit
3e4136e
·
1 Parent(s): 1ee355f

Add optimized models for ORT GenAI (#1)

Browse files

- initial commit (cdbfe3420a644e99c9dab05fe4fa405131b19831)
- Upload folder using huggingface_hub (b7c991bf69e58df9054c881be781609f4160c7c1)
- Update config.json (129892fc6a6e9e0b793239c619329af12a3ab06c)
- Track weights with git lfs (60460330b9858fb7074c8152e928d7034fb243e8)
- Move JSON files to Git LFS (cc0c9b73603481268844f1c9fc5242ca17e7f121)
- Upload Qwen3-VL-2B-Instruct ONNX models (8628521102b2e2dd36c7f37c41fd740fbffaf803)
- Track only tokenizer.json with Git LFS (652952a8bcb85eab0fcf57a003f00730a63244a3)
- Remove model_config.json files (518b9f0e399dc147f319483315fc9ceabf987197)
- Remove extra line (7951ca4ac865e43b42ed64219e0aee563b050753)
- Merge branch 'main' into pr/1 (7a9d51b380a599ec422cfc78de21a19010c893d1)
- Update ONNX models (73508ff877bd73d316877c19f17a51e6353bfc22)


Co-authored-by: Kunal Vaishnavi <kvaishnavi@users.noreply.huggingface.co>

Files changed (28) hide show
  1. .gitattributes +2 -0
  2. onnxruntime/cpu_and_mobile/cpu-int4-rtn-block-32/chat_template.jinja +120 -0
  3. onnxruntime/cpu_and_mobile/cpu-int4-rtn-block-32/config.json +64 -0
  4. onnxruntime/cpu_and_mobile/cpu-int4-rtn-block-32/embedding.onnx +3 -0
  5. onnxruntime/cpu_and_mobile/cpu-int4-rtn-block-32/embedding.onnx.data +3 -0
  6. onnxruntime/cpu_and_mobile/cpu-int4-rtn-block-32/genai_config.json +88 -0
  7. onnxruntime/cpu_and_mobile/cpu-int4-rtn-block-32/generation_config.json +14 -0
  8. onnxruntime/cpu_and_mobile/cpu-int4-rtn-block-32/processor_config.json +76 -0
  9. onnxruntime/cpu_and_mobile/cpu-int4-rtn-block-32/text.onnx +3 -0
  10. onnxruntime/cpu_and_mobile/cpu-int4-rtn-block-32/text.onnx.data +3 -0
  11. onnxruntime/cpu_and_mobile/cpu-int4-rtn-block-32/tokenizer.json +3 -0
  12. onnxruntime/cpu_and_mobile/cpu-int4-rtn-block-32/tokenizer_config.json +29 -0
  13. onnxruntime/cpu_and_mobile/cpu-int4-rtn-block-32/vision.onnx +3 -0
  14. onnxruntime/cpu_and_mobile/cpu-int4-rtn-block-32/vision.onnx.data +3 -0
  15. onnxruntime/cuda/cuda-int4-rtn-block-32/chat_template.jinja +120 -0
  16. onnxruntime/cuda/cuda-int4-rtn-block-32/config.json +64 -0
  17. onnxruntime/cuda/cuda-int4-rtn-block-32/embedding.onnx +3 -0
  18. onnxruntime/cuda/cuda-int4-rtn-block-32/embedding.onnx.data +3 -0
  19. onnxruntime/cuda/cuda-int4-rtn-block-32/genai_config.json +108 -0
  20. onnxruntime/cuda/cuda-int4-rtn-block-32/generation_config.json +14 -0
  21. onnxruntime/cuda/cuda-int4-rtn-block-32/processor_config.json +76 -0
  22. onnxruntime/cuda/cuda-int4-rtn-block-32/text.onnx +3 -0
  23. onnxruntime/cuda/cuda-int4-rtn-block-32/text.onnx.data +3 -0
  24. onnxruntime/cuda/cuda-int4-rtn-block-32/tokenizer.json +3 -0
  25. onnxruntime/cuda/cuda-int4-rtn-block-32/tokenizer_config.json +29 -0
  26. onnxruntime/cuda/cuda-int4-rtn-block-32/vision.onnx +3 -0
  27. onnxruntime/cuda/cuda-int4-rtn-block-32/vision.onnx.data +3 -0
  28. tokenizer.json +0 -0
.gitattributes CHANGED
@@ -52,3 +52,5 @@ onnx/vision_encoder_fp16.onnx_data filter=lfs diff=lfs merge=lfs -text
52
  onnx/vision_encoder_q4.onnx_data filter=lfs diff=lfs merge=lfs -text
53
  onnx/vision_encoder_q4f16.onnx_data filter=lfs diff=lfs merge=lfs -text
54
  onnx/vision_encoder_quantized.onnx_data filter=lfs diff=lfs merge=lfs -text
 
 
 
52
  onnx/vision_encoder_q4.onnx_data filter=lfs diff=lfs merge=lfs -text
53
  onnx/vision_encoder_q4f16.onnx_data filter=lfs diff=lfs merge=lfs -text
54
  onnx/vision_encoder_quantized.onnx_data filter=lfs diff=lfs merge=lfs -text
55
+ *.onnx.data filter=lfs diff=lfs merge=lfs -text
56
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
onnxruntime/cpu_and_mobile/cpu-int4-rtn-block-32/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 %}
onnxruntime/cpu_and_mobile/cpu-int4-rtn-block-32/config.json ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "Qwen3VLForConditionalGeneration"
4
+ ],
5
+ "image_token_id": 151655,
6
+ "model_type": "qwen3_vl",
7
+ "text_config": {
8
+ "attention_bias": false,
9
+ "attention_dropout": 0.0,
10
+ "bos_token_id": 151643,
11
+ "dtype": "bfloat16",
12
+ "eos_token_id": 151645,
13
+ "head_dim": 128,
14
+ "hidden_act": "silu",
15
+ "hidden_size": 2048,
16
+ "initializer_range": 0.02,
17
+ "intermediate_size": 6144,
18
+ "max_position_embeddings": 262144,
19
+ "model_type": "qwen3_vl_text",
20
+ "num_attention_heads": 16,
21
+ "num_hidden_layers": 28,
22
+ "num_key_value_heads": 8,
23
+ "pad_token_id": null,
24
+ "rms_norm_eps": 1e-06,
25
+ "rope_parameters": {
26
+ "mrope_interleaved": true,
27
+ "mrope_section": [
28
+ 24,
29
+ 20,
30
+ 20
31
+ ],
32
+ "rope_theta": 5000000,
33
+ "rope_type": "default"
34
+ },
35
+ "tie_word_embeddings": true,
36
+ "use_cache": true,
37
+ "vocab_size": 151936
38
+ },
39
+ "tie_word_embeddings": true,
40
+ "transformers_version": "5.0.0",
41
+ "video_token_id": 151656,
42
+ "vision_config": {
43
+ "deepstack_visual_indexes": [
44
+ 5,
45
+ 11,
46
+ 17
47
+ ],
48
+ "depth": 24,
49
+ "hidden_act": "gelu_pytorch_tanh",
50
+ "hidden_size": 1024,
51
+ "in_channels": 3,
52
+ "initializer_range": 0.02,
53
+ "intermediate_size": 4096,
54
+ "model_type": "qwen3_vl",
55
+ "num_heads": 16,
56
+ "num_position_embeddings": 2304,
57
+ "out_hidden_size": 2048,
58
+ "patch_size": 16,
59
+ "spatial_merge_size": 2,
60
+ "temporal_patch_size": 2
61
+ },
62
+ "vision_end_token_id": 151653,
63
+ "vision_start_token_id": 151652
64
+ }
onnxruntime/cpu_and_mobile/cpu-int4-rtn-block-32/embedding.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2e82ae02aee5081838e2c7827062694518f175dea1f938a3606dccab8c936195
3
+ size 2804
onnxruntime/cpu_and_mobile/cpu-int4-rtn-block-32/embedding.onnx.data ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:aa1572cf6c43480eb64e0ba7438e10855331c023f815e964c3e33bf68591a347
3
+ size 165347328
onnxruntime/cpu_and_mobile/cpu-int4-rtn-block-32/genai_config.json ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model": {
3
+ "bos_token_id": 151643,
4
+ "context_length": 262144,
5
+ "decoder": {
6
+ "session_options": {
7
+ "log_id": "onnxruntime-genai",
8
+ "provider_options": []
9
+ },
10
+ "filename": "text.onnx",
11
+ "head_size": 128,
12
+ "hidden_size": 2048,
13
+ "inputs": {
14
+ "inputs_embeds": "inputs_embeds",
15
+ "attention_mask": "attention_mask",
16
+ "position_ids": "position_ids",
17
+ "past_key_names": "past_key_values.%d.key",
18
+ "past_value_names": "past_key_values.%d.value"
19
+ },
20
+ "outputs": {
21
+ "logits": "logits",
22
+ "present_key_names": "present.%d.key",
23
+ "present_value_names": "present.%d.value"
24
+ },
25
+ "num_attention_heads": 16,
26
+ "num_hidden_layers": 28,
27
+ "num_key_value_heads": 8
28
+ },
29
+ "eos_token_id": [
30
+ 151645,
31
+ 151643
32
+ ],
33
+ "pad_token_id": 151643,
34
+ "type": "qwen3_vl",
35
+ "vocab_size": 151936,
36
+ "embedding": {
37
+ "filename": "embedding.onnx",
38
+ "inputs": {
39
+ "input_ids": "input_ids",
40
+ "image_features": "image_features"
41
+ },
42
+ "outputs": {
43
+ "inputs_embeds": "inputs_embeds"
44
+ },
45
+ "session_options": {
46
+ "log_id": "onnxruntime-genai",
47
+ "provider_options": []
48
+ }
49
+ },
50
+ "vision": {
51
+ "filename": "vision.onnx",
52
+ "config_filename": "processor_config.json",
53
+ "spatial_merge_size": 2,
54
+ "tokens_per_second": 2.0,
55
+ "patch_size": 16,
56
+ "inputs": {
57
+ "pixel_values": "pixel_values",
58
+ "image_grid_thw": "image_grid_thw"
59
+ },
60
+ "outputs": {
61
+ "image_features": "image_features"
62
+ },
63
+ "session_options": {
64
+ "log_id": "onnxruntime-genai",
65
+ "provider_options": []
66
+ }
67
+ },
68
+ "image_token_id": 151655,
69
+ "video_token_id": 151656,
70
+ "vision_start_token_id": 151652
71
+ },
72
+ "search": {
73
+ "diversity_penalty": 0.0,
74
+ "do_sample": true,
75
+ "early_stopping": true,
76
+ "length_penalty": 1.0,
77
+ "max_length": 262144,
78
+ "min_length": 0,
79
+ "no_repeat_ngram_size": 0,
80
+ "num_beams": 1,
81
+ "num_return_sequences": 1,
82
+ "past_present_share_buffer": true,
83
+ "repetition_penalty": 1.0,
84
+ "temperature": 0.7,
85
+ "top_k": 20,
86
+ "top_p": 0.8
87
+ }
88
+ }
onnxruntime/cpu_and_mobile/cpu-int4-rtn-block-32/generation_config.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "repetition_penalty": 1.0,
10
+ "temperature": 0.7,
11
+ "top_k": 20,
12
+ "top_p": 0.8,
13
+ "transformers_version": "5.0.0"
14
+ }
onnxruntime/cpu_and_mobile/cpu-int4-rtn-block-32/processor_config.json ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "processor": {
3
+ "name": "qwen3_vl_image_processor",
4
+ "transforms": [
5
+ {
6
+ "operation": {
7
+ "name": "decode_image",
8
+ "type": "DecodeImage",
9
+ "attrs": {
10
+ "color_space": "RGB"
11
+ }
12
+ }
13
+ },
14
+ {
15
+ "operation": {
16
+ "name": "convert_to_rgb",
17
+ "type": "ConvertRGB"
18
+ }
19
+ },
20
+ {
21
+ "operation": {
22
+ "name": "resize",
23
+ "type": "Resize",
24
+ "attrs": {
25
+ "width": 540,
26
+ "height": 360,
27
+ "smart_resize": 1,
28
+ "min_pixels": 3136,
29
+ "max_pixels": 12845056,
30
+ "patch_size": 16,
31
+ "merge_size": 2
32
+ }
33
+ }
34
+ },
35
+ {
36
+ "operation": {
37
+ "name": "rescale",
38
+ "type": "Rescale",
39
+ "attrs": {
40
+ "rescale_factor": 0.00392156862745098
41
+ }
42
+ }
43
+ },
44
+ {
45
+ "operation": {
46
+ "name": "normalize",
47
+ "type": "Normalize",
48
+ "attrs": {
49
+ "mean": [
50
+ 0.5,
51
+ 0.5,
52
+ 0.5
53
+ ],
54
+ "std": [
55
+ 0.5,
56
+ 0.5,
57
+ 0.5
58
+ ],
59
+ "qwen3_vl": 1
60
+ }
61
+ }
62
+ },
63
+ {
64
+ "operation": {
65
+ "name": "patch_image",
66
+ "type": "PatchImage",
67
+ "attrs": {
68
+ "patch_size": 16,
69
+ "temporal_patch_size": 2,
70
+ "merge_size": 2
71
+ }
72
+ }
73
+ }
74
+ ]
75
+ }
76
+ }
onnxruntime/cpu_and_mobile/cpu-int4-rtn-block-32/text.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f98f1165219e1da430481fdb36ef782883a0b8d6d3f96fea964ca8c8cc992934
3
+ size 1049186
onnxruntime/cpu_and_mobile/cpu-int4-rtn-block-32/text.onnx.data ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3844b6dbdc41661a448cc3a25e3fe91afbe482fbbb00aea80864e2677e4cb9e5
3
+ size 1075838976
onnxruntime/cpu_and_mobile/cpu-int4-rtn-block-32/tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:50d6fedc69f49013248f12956b572a7eea1dc248e22e02994a6d18345d1a9466
3
+ size 12180127
onnxruntime/cpu_and_mobile/cpu-int4-rtn-block-32/tokenizer_config.json ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "backend": "tokenizers",
4
+ "bos_token": null,
5
+ "clean_up_tokenization_spaces": false,
6
+ "eos_token": "<|im_end|>",
7
+ "errors": "replace",
8
+ "extra_special_tokens": [
9
+ "<|im_start|>",
10
+ "<|im_end|>",
11
+ "<|object_ref_start|>",
12
+ "<|object_ref_end|>",
13
+ "<|box_start|>",
14
+ "<|box_end|>",
15
+ "<|quad_start|>",
16
+ "<|quad_end|>",
17
+ "<|vision_start|>",
18
+ "<|vision_end|>",
19
+ "<|vision_pad|>",
20
+ "<|image_pad|>",
21
+ "<|video_pad|>"
22
+ ],
23
+ "is_local": false,
24
+ "model_max_length": 262144,
25
+ "pad_token": "<|endoftext|>",
26
+ "split_special_tokens": false,
27
+ "tokenizer_class": "Qwen2Tokenizer",
28
+ "unk_token": null
29
+ }
onnxruntime/cpu_and_mobile/cpu-int4-rtn-block-32/vision.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:323fdd415deef7e0b132c2d890fdc1e0d1bcd0abfc8d4cfe38f8c3d4cd190eb9
3
+ size 2937960
onnxruntime/cpu_and_mobile/cpu-int4-rtn-block-32/vision.onnx.data ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:40ae658bea42fc384cee0ec073c910c0c867d65636c173959f38d6432d00b715
3
+ size 182714368
onnxruntime/cuda/cuda-int4-rtn-block-32/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 %}
onnxruntime/cuda/cuda-int4-rtn-block-32/config.json ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "Qwen3VLForConditionalGeneration"
4
+ ],
5
+ "image_token_id": 151655,
6
+ "model_type": "qwen3_vl",
7
+ "text_config": {
8
+ "attention_bias": false,
9
+ "attention_dropout": 0.0,
10
+ "bos_token_id": 151643,
11
+ "dtype": "bfloat16",
12
+ "eos_token_id": 151645,
13
+ "head_dim": 128,
14
+ "hidden_act": "silu",
15
+ "hidden_size": 2048,
16
+ "initializer_range": 0.02,
17
+ "intermediate_size": 6144,
18
+ "max_position_embeddings": 262144,
19
+ "model_type": "qwen3_vl_text",
20
+ "num_attention_heads": 16,
21
+ "num_hidden_layers": 28,
22
+ "num_key_value_heads": 8,
23
+ "pad_token_id": null,
24
+ "rms_norm_eps": 1e-06,
25
+ "rope_parameters": {
26
+ "mrope_interleaved": true,
27
+ "mrope_section": [
28
+ 24,
29
+ 20,
30
+ 20
31
+ ],
32
+ "rope_theta": 5000000,
33
+ "rope_type": "default"
34
+ },
35
+ "tie_word_embeddings": true,
36
+ "use_cache": true,
37
+ "vocab_size": 151936
38
+ },
39
+ "tie_word_embeddings": true,
40
+ "transformers_version": "5.2.0",
41
+ "video_token_id": 151656,
42
+ "vision_config": {
43
+ "deepstack_visual_indexes": [
44
+ 5,
45
+ 11,
46
+ 17
47
+ ],
48
+ "depth": 24,
49
+ "hidden_act": "gelu_pytorch_tanh",
50
+ "hidden_size": 1024,
51
+ "in_channels": 3,
52
+ "initializer_range": 0.02,
53
+ "intermediate_size": 4096,
54
+ "model_type": "qwen3_vl",
55
+ "num_heads": 16,
56
+ "num_position_embeddings": 2304,
57
+ "out_hidden_size": 2048,
58
+ "patch_size": 16,
59
+ "spatial_merge_size": 2,
60
+ "temporal_patch_size": 2
61
+ },
62
+ "vision_end_token_id": 151653,
63
+ "vision_start_token_id": 151652
64
+ }
onnxruntime/cuda/cuda-int4-rtn-block-32/embedding.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:93207948254391f26e0f3ddd027c968c8985746f3e20285a750a1a8713c9a82d
3
+ size 2502
onnxruntime/cuda/cuda-int4-rtn-block-32/embedding.onnx.data ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c7ef27d14f61b61c46788f6e9f5e7e7be35280af4e754f10e7a157fa4cf585ef
3
+ size 622329856
onnxruntime/cuda/cuda-int4-rtn-block-32/genai_config.json ADDED
@@ -0,0 +1,108 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model": {
3
+ "bos_token_id": 151643,
4
+ "context_length": 262144,
5
+ "decoder": {
6
+ "session_options": {
7
+ "log_id": "onnxruntime-genai",
8
+ "provider_options": [
9
+ {
10
+ "cuda": {
11
+ "enable_cuda_graph": "0",
12
+ "enable_skip_layer_norm_strict_mode": "1"
13
+ }
14
+ }
15
+ ]
16
+ },
17
+ "filename": "text.onnx",
18
+ "head_size": 128,
19
+ "hidden_size": 2048,
20
+ "inputs": {
21
+ "inputs_embeds": "inputs_embeds",
22
+ "attention_mask": "attention_mask",
23
+ "position_ids": "position_ids",
24
+ "past_key_names": "past_key_values.%d.key",
25
+ "past_value_names": "past_key_values.%d.value"
26
+ },
27
+ "outputs": {
28
+ "logits": "logits",
29
+ "present_key_names": "present.%d.key",
30
+ "present_value_names": "present.%d.value"
31
+ },
32
+ "num_attention_heads": 16,
33
+ "num_hidden_layers": 28,
34
+ "num_key_value_heads": 8
35
+ },
36
+ "eos_token_id": [
37
+ 151645,
38
+ 151643
39
+ ],
40
+ "pad_token_id": 151643,
41
+ "type": "qwen3_vl",
42
+ "vocab_size": 151936,
43
+ "embedding": {
44
+ "filename": "embedding.onnx",
45
+ "inputs": {
46
+ "input_ids": "input_ids",
47
+ "image_features": "image_features"
48
+ },
49
+ "outputs": {
50
+ "inputs_embeds": "inputs_embeds"
51
+ },
52
+ "session_options": {
53
+ "log_id": "onnxruntime-genai",
54
+ "provider_options": [
55
+ {
56
+ "cuda": {
57
+ "enable_cuda_graph": "0",
58
+ "enable_skip_layer_norm_strict_mode": "1"
59
+ }
60
+ }
61
+ ]
62
+ }
63
+ },
64
+ "vision": {
65
+ "filename": "vision.onnx",
66
+ "config_filename": "processor_config.json",
67
+ "spatial_merge_size": 2,
68
+ "tokens_per_second": 2.0,
69
+ "inputs": {
70
+ "pixel_values": "pixel_values",
71
+ "image_grid_thw": "image_grid_thw"
72
+ },
73
+ "outputs": {
74
+ "image_features": "image_features"
75
+ },
76
+ "session_options": {
77
+ "log_id": "onnxruntime-genai",
78
+ "provider_options": [
79
+ {
80
+ "cuda": {
81
+ "enable_cuda_graph": "0",
82
+ "enable_skip_layer_norm_strict_mode": "1"
83
+ }
84
+ }
85
+ ]
86
+ }
87
+ },
88
+ "image_token_id": 151655,
89
+ "video_token_id": 151656,
90
+ "vision_start_token_id": 151652
91
+ },
92
+ "search": {
93
+ "diversity_penalty": 0.0,
94
+ "do_sample": true,
95
+ "early_stopping": true,
96
+ "length_penalty": 1.0,
97
+ "max_length": 262144,
98
+ "min_length": 0,
99
+ "no_repeat_ngram_size": 0,
100
+ "num_beams": 1,
101
+ "num_return_sequences": 1,
102
+ "past_present_share_buffer": true,
103
+ "repetition_penalty": 1.0,
104
+ "temperature": 0.7,
105
+ "top_k": 20,
106
+ "top_p": 0.8
107
+ }
108
+ }
onnxruntime/cuda/cuda-int4-rtn-block-32/generation_config.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "repetition_penalty": 1.0,
10
+ "temperature": 0.7,
11
+ "top_k": 20,
12
+ "top_p": 0.8,
13
+ "transformers_version": "5.2.0"
14
+ }
onnxruntime/cuda/cuda-int4-rtn-block-32/processor_config.json ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "processor": {
3
+ "name": "qwen3_vl_image_processor",
4
+ "transforms": [
5
+ {
6
+ "operation": {
7
+ "name": "decode_image",
8
+ "type": "DecodeImage",
9
+ "attrs": {
10
+ "color_space": "RGB"
11
+ }
12
+ }
13
+ },
14
+ {
15
+ "operation": {
16
+ "name": "convert_to_rgb",
17
+ "type": "ConvertRGB"
18
+ }
19
+ },
20
+ {
21
+ "operation": {
22
+ "name": "resize",
23
+ "type": "Resize",
24
+ "attrs": {
25
+ "width": 540,
26
+ "height": 360,
27
+ "smart_resize": 1,
28
+ "min_pixels": 3136,
29
+ "max_pixels": 12845056,
30
+ "patch_size": 16,
31
+ "merge_size": 2
32
+ }
33
+ }
34
+ },
35
+ {
36
+ "operation": {
37
+ "name": "rescale",
38
+ "type": "Rescale",
39
+ "attrs": {
40
+ "rescale_factor": 0.00392156862745098
41
+ }
42
+ }
43
+ },
44
+ {
45
+ "operation": {
46
+ "name": "normalize",
47
+ "type": "Normalize",
48
+ "attrs": {
49
+ "mean": [
50
+ 0.5,
51
+ 0.5,
52
+ 0.5
53
+ ],
54
+ "std": [
55
+ 0.5,
56
+ 0.5,
57
+ 0.5
58
+ ],
59
+ "qwen3_vl": 1
60
+ }
61
+ }
62
+ },
63
+ {
64
+ "operation": {
65
+ "name": "patch_image",
66
+ "type": "PatchImage",
67
+ "attrs": {
68
+ "patch_size": 16,
69
+ "temporal_patch_size": 2,
70
+ "merge_size": 2
71
+ }
72
+ }
73
+ }
74
+ ]
75
+ }
76
+ }
onnxruntime/cuda/cuda-int4-rtn-block-32/text.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dceee7428ad9571a6a6ca19caede3841d3a4d09a5d1467be5114498776addf14
3
+ size 1202500
onnxruntime/cuda/cuda-int4-rtn-block-32/text.onnx.data ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0e8470197c4631048a98a990124b5e549f68fc3ba51d746b7eed19f4aeb2f2ee
3
+ size 968294400
onnxruntime/cuda/cuda-int4-rtn-block-32/tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:50d6fedc69f49013248f12956b572a7eea1dc248e22e02994a6d18345d1a9466
3
+ size 12180127
onnxruntime/cuda/cuda-int4-rtn-block-32/tokenizer_config.json ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "backend": "tokenizers",
4
+ "bos_token": null,
5
+ "clean_up_tokenization_spaces": false,
6
+ "eos_token": "<|im_end|>",
7
+ "errors": "replace",
8
+ "extra_special_tokens": [
9
+ "<|im_start|>",
10
+ "<|im_end|>",
11
+ "<|object_ref_start|>",
12
+ "<|object_ref_end|>",
13
+ "<|box_start|>",
14
+ "<|box_end|>",
15
+ "<|quad_start|>",
16
+ "<|quad_end|>",
17
+ "<|vision_start|>",
18
+ "<|vision_end|>",
19
+ "<|vision_pad|>",
20
+ "<|image_pad|>",
21
+ "<|video_pad|>"
22
+ ],
23
+ "is_local": false,
24
+ "model_max_length": 262144,
25
+ "pad_token": "<|endoftext|>",
26
+ "split_special_tokens": false,
27
+ "tokenizer_class": "Qwen2Tokenizer",
28
+ "unk_token": null
29
+ }
onnxruntime/cuda/cuda-int4-rtn-block-32/vision.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a9cdfe9bb497dbf5155ef562e3046f0a0109b005eeb54fd977dddc450dc4d72b
3
+ size 253624
onnxruntime/cuda/cuda-int4-rtn-block-32/vision.onnx.data ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bc7d532114a82500d6ab313b2870230ae08c80a4ac0acc286ca7da43b18a8be7
3
+ size 663033856
tokenizer.json CHANGED
The diff for this file is too large to render. See raw diff