Add VitisAI-optimized version
#1
by kvaishnavi - opened
- .gitattributes +2 -7
- onnxruntime/vitisai-int4/LICENSE +22 -0
- onnxruntime/vitisai-int4/chat_template.jinja +7 -0
- onnxruntime/vitisai-int4/genai_config.json +179 -0
- onnxruntime/vitisai-int4/inference_model.json +4 -0
- onnxruntime/vitisai-int4/processor_config.json +68 -0
- onnxruntime/vitisai-int4/qwen2_5_vl_webcua.data +3 -0
- onnxruntime/vitisai-int4/qwen2_5_vl_webcua_ctx_512.onnx +3 -0
- onnxruntime/vitisai-int4/qwen2_5_vl_webcua_ctx_512_epcontext.onnx +3 -0
- onnxruntime/vitisai-int4/qwen2_5_vl_webcua_ctx_512_epcontext.onnx_VITISAI.bin +3 -0
- onnxruntime/vitisai-int4/qwen2_5_vl_webcua_embeddings_w4a32.quant.onnx +3 -0
- onnxruntime/vitisai-int4/qwen2_5_vl_webcua_itr_1.onnx +3 -0
- onnxruntime/vitisai-int4/qwen2_5_vl_webcua_itr_1_epcontext.onnx +3 -0
- onnxruntime/vitisai-int4/qwen2_5_vl_webcua_lm_head_w4a32.quant.onnx +3 -0
- onnxruntime/vitisai-int4/qwen2_5_vl_webcua_visual_attn_block.onnx +3 -0
- onnxruntime/vitisai-int4/qwen2_5_vl_webcua_visual_attn_block_epcontext.onnx +3 -0
- onnxruntime/vitisai-int4/qwen2_5_vl_webcua_visual_attn_block_epcontext.onnx_VITISAI.bin +3 -0
- onnxruntime/vitisai-int4/qwen2_5_vl_webcua_visual_attn_blocks_w8a16_per_channel.quant.onnx.data +3 -0
- onnxruntime/vitisai-int4/qwen2_5_vl_webcua_visual_patch_embed.onnx +3 -0
- onnxruntime/vitisai-int4/qwen2_5_vl_webcua_visual_patch_merger.onnx +3 -0
- onnxruntime/vitisai-int4/tokenizer.json +3 -0
- onnxruntime/vitisai-int4/tokenizer_config.json +207 -0
- onnxruntime/vitisai-int4/wnd_idx.npy +3 -0
.gitattributes
CHANGED
|
@@ -33,10 +33,5 @@ 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
|
| 36 |
-
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
| 37 |
-
|
| 38 |
-
cpu/embedding.onnx.data filter=lfs diff=lfs merge=lfs -text
|
| 39 |
-
cpu/vision.onnx.data filter=lfs diff=lfs merge=lfs -text
|
| 40 |
-
embedding.onnx.data filter=lfs diff=lfs merge=lfs -text
|
| 41 |
-
vision.onnx.data filter=lfs diff=lfs merge=lfs -text
|
| 42 |
-
cpu/text.onnx.data 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 |
+
*.data filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
onnxruntime/vitisai-int4/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Microsoft.
|
| 2 |
+
Copyright (c) Microsoft Corporation.
|
| 3 |
+
|
| 4 |
+
MIT License
|
| 5 |
+
|
| 6 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 7 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 8 |
+
in the Software without restriction, including without limitation the rights
|
| 9 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 10 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 11 |
+
furnished to do so, subject to the following conditions:
|
| 12 |
+
|
| 13 |
+
The above copyright notice and this permission notice shall be included in all
|
| 14 |
+
copies or substantial portions of the Software.
|
| 15 |
+
|
| 16 |
+
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 17 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 18 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 19 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 20 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 21 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
| 22 |
+
SOFTWARE.
|
onnxruntime/vitisai-int4/chat_template.jinja
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{% set image_count = namespace(value=0) %}{% set video_count = namespace(value=0) %}{% for message in messages %}{% if loop.first and message['role'] != 'system' %}<|im_start|>system
|
| 2 |
+
You are a helpful assistant.<|im_end|>
|
| 3 |
+
{% endif %}<|im_start|>{{ message['role'] }}
|
| 4 |
+
{% if message['content'] is string %}{{ message['content'] }}<|im_end|>
|
| 5 |
+
{% else %}{% for content in message['content'] %}{% if content['type'] == 'image' or 'image' in content or 'image_url' in content %}{% set image_count.value = image_count.value + 1 %}{% if add_vision_id %}Picture {{ image_count.value }}: {% endif %}<|vision_start|><|image_pad|><|vision_end|>{% elif content['type'] == 'video' or 'video' in content %}{% set video_count.value = video_count.value + 1 %}{% if add_vision_id %}Video {{ video_count.value }}: {% endif %}<|vision_start|><|video_pad|><|vision_end|>{% elif 'text' in content %}{{ content['text'] }}{% endif %}{% endfor %}<|im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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model": {
|
| 3 |
+
"type": "fara",
|
| 4 |
+
"vocab_size": 152064,
|
| 5 |
+
"context_length": 4096,
|
| 6 |
+
"pad_token_id": 151643,
|
| 7 |
+
"bos_token_id": 151643,
|
| 8 |
+
"eos_token_id": [151645, 151643],
|
| 9 |
+
"decoder": {
|
| 10 |
+
"hidden_size": 3584,
|
| 11 |
+
"head_size": 128,
|
| 12 |
+
"num_attention_heads": 28,
|
| 13 |
+
"num_key_value_heads": 4,
|
| 14 |
+
"num_hidden_layers": 28,
|
| 15 |
+
"sliding_window": {
|
| 16 |
+
"window_size": 512,
|
| 17 |
+
"pad_value": 151643,
|
| 18 |
+
"alignment": "left",
|
| 19 |
+
"slide_key_value_cache": false,
|
| 20 |
+
"slide_inputs": true,
|
| 21 |
+
"layers": []
|
| 22 |
+
},
|
| 23 |
+
"inputs": {
|
| 24 |
+
"inputs_embeds": "input_hidden_states",
|
| 25 |
+
"past_sequence_length": "past_seq_len",
|
| 26 |
+
"total_sequence_length": "total_seq_len",
|
| 27 |
+
"past_key_names": "past_keys_%d",
|
| 28 |
+
"past_value_names": "past_values_%d"
|
| 29 |
+
},
|
| 30 |
+
"outputs": {
|
| 31 |
+
"logits": "logits",
|
| 32 |
+
"present_key_names": "present_keys_%d",
|
| 33 |
+
"present_value_names": "present_values_%d"
|
| 34 |
+
},
|
| 35 |
+
"pipeline": {
|
| 36 |
+
"embeddings": {
|
| 37 |
+
"filename": "qwen2_5_vl_webcua_embeddings_w4a32.quant.onnx",
|
| 38 |
+
"inputs": ["input_ids", "image_features"],
|
| 39 |
+
"outputs": ["input_hidden_states"]
|
| 40 |
+
},
|
| 41 |
+
"context_ctx": {
|
| 42 |
+
"filename": "qwen2_5_vl_webcua_ctx_512_epcontext.onnx",
|
| 43 |
+
"inputs": [
|
| 44 |
+
"input_hidden_states",
|
| 45 |
+
"past_seq_len",
|
| 46 |
+
"total_seq_len",
|
| 47 |
+
"past_keys_0","past_values_0","past_keys_1","past_values_1","past_keys_2","past_values_2","past_keys_3","past_values_3","past_keys_4","past_values_4","past_keys_5","past_values_5","past_keys_6","past_values_6","past_keys_7","past_values_7","past_keys_8","past_values_8","past_keys_9","past_values_9","past_keys_10","past_values_10","past_keys_11","past_values_11","past_keys_12","past_values_12","past_keys_13","past_values_13","past_keys_14","past_values_14","past_keys_15","past_values_15","past_keys_16","past_values_16","past_keys_17","past_values_17","past_keys_18","past_values_18","past_keys_19","past_values_19","past_keys_20","past_values_20","past_keys_21","past_values_21","past_keys_22","past_values_22","past_keys_23","past_values_23","past_keys_24","past_values_24","past_keys_25","past_values_25","past_keys_26","past_values_26","past_keys_27","past_values_27"
|
| 48 |
+
],
|
| 49 |
+
"outputs": [
|
| 50 |
+
"output_hidden_states",
|
| 51 |
+
"present_keys_0","present_values_0","present_keys_1","present_values_1","present_keys_2","present_values_2","present_keys_3","present_values_3","present_keys_4","present_values_4","present_keys_5","present_values_5","present_keys_6","present_values_6","present_keys_7","present_values_7","present_keys_8","present_values_8","present_keys_9","present_values_9","present_keys_10","present_values_10","present_keys_11","present_values_11","present_keys_12","present_values_12","present_keys_13","present_values_13","present_keys_14","present_values_14","present_keys_15","present_values_15","present_keys_16","present_values_16","present_keys_17","present_values_17","present_keys_18","present_values_18","present_keys_19","present_values_19","present_keys_20","present_values_20","present_keys_21","present_values_21","present_keys_22","present_values_22","present_keys_23","present_values_23","present_keys_24","present_values_24","present_keys_25","present_values_25","present_keys_26","present_values_26","present_keys_27","present_values_27"
|
| 52 |
+
],
|
| 53 |
+
"session_options": {
|
| 54 |
+
"ep.context_enable" : "0",
|
| 55 |
+
"ep.context_embed_mode" : "0",
|
| 56 |
+
"ep.share_ep_contexts" : "1",
|
| 57 |
+
"ep.context_file_path" : "qwen2_5_vl_webcua_ctx_512_epcontext.onnx ",
|
| 58 |
+
"provider_options": [
|
| 59 |
+
{
|
| 60 |
+
"VitisAI": {
|
| 61 |
+
"target": "waic_target_vaiml_cpp_me",
|
| 62 |
+
"xmc_runner_config": "1",
|
| 63 |
+
"wgt_sharing_overrides": "{\"MatMul\": {\"M\": 1}}",
|
| 64 |
+
"enable_cache_file_io_in_mem":"1",
|
| 65 |
+
"dd_instr_xrt_bo_stack_size_mb": "32"
|
| 66 |
+
}
|
| 67 |
+
}
|
| 68 |
+
]
|
| 69 |
+
},
|
| 70 |
+
"run_on_prompt": true,
|
| 71 |
+
"run_on_token_gen": false
|
| 72 |
+
},
|
| 73 |
+
"iterator_ctx": {
|
| 74 |
+
"filename": "qwen2_5_vl_webcua_itr_1_epcontext.onnx",
|
| 75 |
+
"inputs": [
|
| 76 |
+
"input_hidden_states",
|
| 77 |
+
"past_seq_len",
|
| 78 |
+
"total_seq_len",
|
| 79 |
+
"past_keys_0","past_values_0","past_keys_1","past_values_1","past_keys_2","past_values_2","past_keys_3","past_values_3","past_keys_4","past_values_4","past_keys_5","past_values_5","past_keys_6","past_values_6","past_keys_7","past_values_7","past_keys_8","past_values_8","past_keys_9","past_values_9","past_keys_10","past_values_10","past_keys_11","past_values_11","past_keys_12","past_values_12","past_keys_13","past_values_13","past_keys_14","past_values_14","past_keys_15","past_values_15","past_keys_16","past_values_16","past_keys_17","past_values_17","past_keys_18","past_values_18","past_keys_19","past_values_19","past_keys_20","past_values_20","past_keys_21","past_values_21","past_keys_22","past_values_22","past_keys_23","past_values_23","past_keys_24","past_values_24","past_keys_25","past_values_25","past_keys_26","past_values_26","past_keys_27","past_values_27"
|
| 80 |
+
],
|
| 81 |
+
"outputs": [
|
| 82 |
+
"output_hidden_states",
|
| 83 |
+
"present_keys_0","present_values_0","present_keys_1","present_values_1","present_keys_2","present_values_2","present_keys_3","present_values_3","present_keys_4","present_values_4","present_keys_5","present_values_5","present_keys_6","present_values_6","present_keys_7","present_values_7","present_keys_8","present_values_8","present_keys_9","present_values_9","present_keys_10","present_values_10","present_keys_11","present_values_11","present_keys_12","present_values_12","present_keys_13","present_values_13","present_keys_14","present_values_14","present_keys_15","present_values_15","present_keys_16","present_values_16","present_keys_17","present_values_17","present_keys_18","present_values_18","present_keys_19","present_values_19","present_keys_20","present_values_20","present_keys_21","present_values_21","present_keys_22","present_values_22","present_keys_23","present_values_23","present_keys_24","present_values_24","present_keys_25","present_values_25","present_keys_26","present_values_26","present_keys_27","present_values_27"
|
| 84 |
+
],
|
| 85 |
+
"session_options": {
|
| 86 |
+
|
| 87 |
+
"ep.context_enable" : "0",
|
| 88 |
+
"ep.context_embed_mode" : "0",
|
| 89 |
+
"ep.share_ep_contexts" : "1",
|
| 90 |
+
"ep.context_file_path" : "qwen2_5_vl_webcua_itr_1_epcontext.onnx",
|
| 91 |
+
"ep.stop_share_ep_contexts" : "1",
|
| 92 |
+
|
| 93 |
+
"provider_options": [
|
| 94 |
+
{
|
| 95 |
+
"VitisAI": {
|
| 96 |
+
"target": "waic_target_vaiml_cpp_me",
|
| 97 |
+
"xmc_runner_config": "1",
|
| 98 |
+
"wgt_sharing_overrides": "{\"MatMul\": {\"M\": 1}}",
|
| 99 |
+
"enable_cache_file_io_in_mem":"1",
|
| 100 |
+
"dd_instr_xrt_bo_stack_size_mb": "32"
|
| 101 |
+
}
|
| 102 |
+
}
|
| 103 |
+
]
|
| 104 |
+
},
|
| 105 |
+
"run_on_prompt": false,
|
| 106 |
+
"run_on_token_gen": true
|
| 107 |
+
},
|
| 108 |
+
"lm_head": {
|
| 109 |
+
"filename": "qwen2_5_vl_webcua_lm_head_w4a32.quant.onnx",
|
| 110 |
+
"inputs": ["output_hidden_states"],
|
| 111 |
+
"outputs": ["logits"],
|
| 112 |
+
"is_lm_head": true
|
| 113 |
+
}
|
| 114 |
+
}
|
| 115 |
+
},
|
| 116 |
+
"vision": {
|
| 117 |
+
"spatial_merge_size": 2,
|
| 118 |
+
"patch_size": 14,
|
| 119 |
+
"window_size": 112,
|
| 120 |
+
"inputs": {
|
| 121 |
+
"pixel_values": "pixel_values",
|
| 122 |
+
"image_grid_thw": "image_grid_thw"
|
| 123 |
+
},
|
| 124 |
+
"outputs": {
|
| 125 |
+
"image_features": "image_features"
|
| 126 |
+
},
|
| 127 |
+
"pipeline": {
|
| 128 |
+
"patch_embed": {
|
| 129 |
+
"filename": "qwen2_5_vl_webcua_visual_patch_embed.onnx",
|
| 130 |
+
"inputs": ["pixel_values"],
|
| 131 |
+
"outputs": ["pixel_hidden_states"],
|
| 132 |
+
"run_on_cpu": true
|
| 133 |
+
},
|
| 134 |
+
"vision_attn": {
|
| 135 |
+
"filename": "qwen2_5_vl_webcua_visual_attn_block_epcontext.onnx",
|
| 136 |
+
"inputs": ["hidden"],
|
| 137 |
+
"outputs": ["hidden"],
|
| 138 |
+
"run_on_cpu": false,
|
| 139 |
+
"session_options": {
|
| 140 |
+
"ep.context_enable" : "0",
|
| 141 |
+
"ep.context_embed_mode" : "0",
|
| 142 |
+
"ep.context_file_path" : "qwen2_5_vl_webcua_visual_attn_block_epcontext.onnx",
|
| 143 |
+
|
| 144 |
+
"provider_options": [
|
| 145 |
+
{
|
| 146 |
+
"VitisAI": {
|
| 147 |
+
"target": "waic_target_vaiml_cpp_me",
|
| 148 |
+
"xmc_runner_config": "1",
|
| 149 |
+
"enable_cache_file_io_in_mem":"1",
|
| 150 |
+
"dd_instr_xrt_bo_stack_size_mb": "32"
|
| 151 |
+
}
|
| 152 |
+
}
|
| 153 |
+
]
|
| 154 |
+
}
|
| 155 |
+
},
|
| 156 |
+
"patch_merger": {
|
| 157 |
+
"filename": "qwen2_5_vl_webcua_visual_patch_merger.onnx",
|
| 158 |
+
"inputs": ["hidden"],
|
| 159 |
+
"outputs": ["merged_hidden_states"],
|
| 160 |
+
"run_on_cpu": true
|
| 161 |
+
}
|
| 162 |
+
}
|
| 163 |
+
}
|
| 164 |
+
},
|
| 165 |
+
"search": {
|
| 166 |
+
"num_beams": 1,
|
| 167 |
+
"past_present_share_buffer": true,
|
| 168 |
+
"do_sample": false,
|
| 169 |
+
"temperature": 1.0,
|
| 170 |
+
"top_k": 50,
|
| 171 |
+
"top_p": 0.9,
|
| 172 |
+
"repetition_penalty": 1.0,
|
| 173 |
+
"length_penalty": 1.0,
|
| 174 |
+
"early_stopping": true,
|
| 175 |
+
"max_length": 4096,
|
| 176 |
+
"min_length": 0,
|
| 177 |
+
"chunk_size": 4096
|
| 178 |
+
}
|
| 179 |
+
}
|
onnxruntime/vitisai-int4/inference_model.json
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"Name": "Fara-7b-int4-vitis",
|
| 3 |
+
"PromptTemplate": null
|
| 4 |
+
}
|
onnxruntime/vitisai-int4/processor_config.json
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"processor": {
|
| 3 |
+
"name": "qwen2_5_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": 14,
|
| 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": [0.48145466, 0.4578275, 0.40821073],
|
| 50 |
+
"std": [0.26862954, 0.26130258, 0.27577711],
|
| 51 |
+
"qwen2_5_vl": 1
|
| 52 |
+
}
|
| 53 |
+
}
|
| 54 |
+
},
|
| 55 |
+
{
|
| 56 |
+
"operation": {
|
| 57 |
+
"name": "patch_image",
|
| 58 |
+
"type": "PatchImage",
|
| 59 |
+
"attrs": {
|
| 60 |
+
"patch_size": 14,
|
| 61 |
+
"temporal_patch_size": 2,
|
| 62 |
+
"merge_size": 2
|
| 63 |
+
}
|
| 64 |
+
}
|
| 65 |
+
}
|
| 66 |
+
]
|
| 67 |
+
}
|
| 68 |
+
}
|
onnxruntime/vitisai-int4/qwen2_5_vl_webcua.data
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:32c3012080efde1b54a8ce684b9029c73da05ee3c676662742ad3669c1f1346a
|
| 3 |
+
size 3335090176
|
onnxruntime/vitisai-int4/qwen2_5_vl_webcua_ctx_512.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:86fbda5abb4dfd5deee003fbdc9a5ed7c1006ee9e332498ac94c206d709d5052
|
| 3 |
+
size 1665273
|
onnxruntime/vitisai-int4/qwen2_5_vl_webcua_ctx_512_epcontext.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1385130b330d9214c3b550f0b363f82580f33d8e7f06b6c29950d7ed47b1a82c
|
| 3 |
+
size 65716299
|
onnxruntime/vitisai-int4/qwen2_5_vl_webcua_ctx_512_epcontext.onnx_VITISAI.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1226d6b8244c39c74c0cb569faa9ed09c1eb1c7b5d5836fd1a43673e0368c6b8
|
| 3 |
+
size 7882178560
|
onnxruntime/vitisai-int4/qwen2_5_vl_webcua_embeddings_w4a32.quant.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:17e9f756271089b5af067f934543a3dcf6b6f510426265743fd5ed27ae5fda5c
|
| 3 |
+
size 349139384
|
onnxruntime/vitisai-int4/qwen2_5_vl_webcua_itr_1.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f0e7b5fb6fd7ab572d1287de44bd35ee065ee16bbb8aa5d53b76f96138d824a5
|
| 3 |
+
size 1662180
|
onnxruntime/vitisai-int4/qwen2_5_vl_webcua_itr_1_epcontext.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:63810b0e38a6ae37e2932fb6bcdcce691514771b821da4705a17cd86f0e5c39d
|
| 3 |
+
size 65716114
|
onnxruntime/vitisai-int4/qwen2_5_vl_webcua_lm_head_w4a32.quant.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:55d5283bd599ebc6fb742fa14e264e73c8106a2e5183140a84ecb562fbd9b0d4
|
| 3 |
+
size 349139441
|
onnxruntime/vitisai-int4/qwen2_5_vl_webcua_visual_attn_block.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:20facb31a86b9d4e8fdb25f0eacd4fb5e0cdbec0bb43884dce47ad6d33db6301
|
| 3 |
+
size 3950028
|
onnxruntime/vitisai-int4/qwen2_5_vl_webcua_visual_attn_block_epcontext.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c1db028d7c26d75d20968243fc3e627396e42716533fd9dcdf79d2586d3569fc
|
| 3 |
+
size 4053
|
onnxruntime/vitisai-int4/qwen2_5_vl_webcua_visual_attn_block_epcontext.onnx_VITISAI.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3614253e6063f80c5a0820db505aa86245cd307a3764b4f0aa6f36330964d8ec
|
| 3 |
+
size 1984742912
|
onnxruntime/vitisai-int4/qwen2_5_vl_webcua_visual_attn_blocks_w8a16_per_channel.quant.onnx.data
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f5d4b588a46737212ed11fa1b20d43d53e10a877f57d0ac3d0b0207f77d36692
|
| 3 |
+
size 924481536
|
onnxruntime/vitisai-int4/qwen2_5_vl_webcua_visual_patch_embed.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8ebc2de24de3e87be8c4aa148f1ca59e7bafcc6afeed2c0bcf35ecc40909eb20
|
| 3 |
+
size 6021909
|
onnxruntime/vitisai-int4/qwen2_5_vl_webcua_visual_patch_merger.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:024c5792c6eab12c5ec3ddd0566b1e1ca0229c484f26c50e6ca87807232df45f
|
| 3 |
+
size 178299575
|
onnxruntime/vitisai-int4/tokenizer.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9c5ae00e602b8860cbd784ba82a8aa14e8feecec692e7076590d014d7b7fdafa
|
| 3 |
+
size 11421896
|
onnxruntime/vitisai-int4/tokenizer_config.json
ADDED
|
@@ -0,0 +1,207 @@
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
},
|
| 182 |
+
"additional_special_tokens": [
|
| 183 |
+
"<|im_start|>",
|
| 184 |
+
"<|im_end|>",
|
| 185 |
+
"<|object_ref_start|>",
|
| 186 |
+
"<|object_ref_end|>",
|
| 187 |
+
"<|box_start|>",
|
| 188 |
+
"<|box_end|>",
|
| 189 |
+
"<|quad_start|>",
|
| 190 |
+
"<|quad_end|>",
|
| 191 |
+
"<|vision_start|>",
|
| 192 |
+
"<|vision_end|>",
|
| 193 |
+
"<|vision_pad|>",
|
| 194 |
+
"<|image_pad|>",
|
| 195 |
+
"<|video_pad|>"
|
| 196 |
+
],
|
| 197 |
+
"bos_token": null,
|
| 198 |
+
"clean_up_tokenization_spaces": false,
|
| 199 |
+
"eos_token": "<|im_end|>",
|
| 200 |
+
"errors": "replace",
|
| 201 |
+
"extra_special_tokens": {},
|
| 202 |
+
"model_max_length": 131072,
|
| 203 |
+
"pad_token": "<|endoftext|>",
|
| 204 |
+
"split_special_tokens": false,
|
| 205 |
+
"tokenizer_class": "Qwen2Tokenizer",
|
| 206 |
+
"unk_token": null
|
| 207 |
+
}
|
onnxruntime/vitisai-int4/wnd_idx.npy
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:78628c71d254c9493c8de04a9979fe359f2850c2b5d537a5efa30fde31c6ada9
|
| 3 |
+
size 4072
|