Add OpenVINO EPContext models (ORT-loadable compiled OV graph) for gemma-4-E2B-it
Browse files- openvino-epcontext/audio_encoder/model.bin +3 -0
- openvino-epcontext/audio_encoder/model.onnx +3 -0
- openvino-epcontext/audio_encoder/model.xml +0 -0
- openvino-epcontext/audio_feature_extraction.json +30 -0
- openvino-epcontext/chat_template.jinja +360 -0
- openvino-epcontext/decoder/model.bin +3 -0
- openvino-epcontext/decoder/model.onnx +3 -0
- openvino-epcontext/decoder/model.xml +0 -0
- openvino-epcontext/embedding/model.bin +3 -0
- openvino-epcontext/embedding/model.onnx +3 -0
- openvino-epcontext/embedding/model.xml +1338 -0
- openvino-epcontext/genai_config.json +125 -0
- openvino-epcontext/image_processor.json +27 -0
- openvino-epcontext/tokenizer.json +3 -0
- openvino-epcontext/tokenizer_config.json +75 -0
- openvino-epcontext/vision_encoder/model.bin +3 -0
- openvino-epcontext/vision_encoder/model.onnx +3 -0
- openvino-epcontext/vision_encoder/model.xml +0 -0
openvino-epcontext/audio_encoder/model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:87362b0e67ce8f4a00d067722c5212725cf0917e3773055151ea712a96d48152
|
| 3 |
+
size 177924108
|
openvino-epcontext/audio_encoder/model.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:235ecd4205512045f38105cecd2c063752b4d06659461e6a0249a3722b0f959f
|
| 3 |
+
size 768
|
openvino-epcontext/audio_encoder/model.xml
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
openvino-epcontext/audio_feature_extraction.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"feature_extraction": {
|
| 3 |
+
"sequence": [
|
| 4 |
+
{
|
| 5 |
+
"operation": {
|
| 6 |
+
"name": "audio_decoder",
|
| 7 |
+
"type": "AudioDecoder"
|
| 8 |
+
}
|
| 9 |
+
},
|
| 10 |
+
{
|
| 11 |
+
"operation": {
|
| 12 |
+
"name": "gemma4_log_mel",
|
| 13 |
+
"type": "Gemma4LogMel",
|
| 14 |
+
"attrs": {
|
| 15 |
+
"feature_size": 128,
|
| 16 |
+
"sampling_rate": 16000,
|
| 17 |
+
"frame_length_ms": 20.0,
|
| 18 |
+
"hop_length_ms": 10.0,
|
| 19 |
+
"min_frequency": 0.0,
|
| 20 |
+
"max_frequency": 8000.0,
|
| 21 |
+
"preemphasis": 0.0,
|
| 22 |
+
"preemphasis_htk_flavor": 1,
|
| 23 |
+
"fft_overdrive": 0,
|
| 24 |
+
"mel_floor": 0.001
|
| 25 |
+
}
|
| 26 |
+
}
|
| 27 |
+
}
|
| 28 |
+
]
|
| 29 |
+
}
|
| 30 |
+
}
|
openvino-epcontext/chat_template.jinja
ADDED
|
@@ -0,0 +1,360 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{%- macro format_parameters(properties, required, filter_keys=false) -%}
|
| 2 |
+
{%- set standard_keys = ['description', 'type', 'properties', 'required', 'nullable'] -%}
|
| 3 |
+
{%- set ns = namespace(found_first=false) -%}
|
| 4 |
+
{%- for key, value in properties | dictsort -%}
|
| 5 |
+
{%- set add_comma = false -%}
|
| 6 |
+
{%- if not filter_keys or key not in standard_keys -%}
|
| 7 |
+
{%- if ns.found_first %},{% endif -%}
|
| 8 |
+
{%- set ns.found_first = true -%}
|
| 9 |
+
{{ key }}:{
|
| 10 |
+
{%- if value['description'] -%}
|
| 11 |
+
description:<|"|>{{ value['description'] }}<|"|>
|
| 12 |
+
{%- set add_comma = true -%}
|
| 13 |
+
{%- endif -%}
|
| 14 |
+
{%- if value['type'] | upper == 'STRING' -%}
|
| 15 |
+
{%- if value['enum'] -%}
|
| 16 |
+
{%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}
|
| 17 |
+
enum:{{ format_argument(value['enum']) }}
|
| 18 |
+
{%- endif -%}
|
| 19 |
+
{%- elif value['type'] | upper == 'ARRAY' -%}
|
| 20 |
+
{%- if value['items'] is mapping and value['items'] -%}
|
| 21 |
+
{%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}
|
| 22 |
+
items:{
|
| 23 |
+
{%- set ns_items = namespace(found_first=false) -%}
|
| 24 |
+
{%- for item_key, item_value in value['items'] | dictsort -%}
|
| 25 |
+
{%- if item_value is not none -%}
|
| 26 |
+
{%- if ns_items.found_first %},{% endif -%}
|
| 27 |
+
{%- set ns_items.found_first = true -%}
|
| 28 |
+
{%- if item_key == 'properties' -%}
|
| 29 |
+
properties:{
|
| 30 |
+
{%- if item_value is mapping -%}
|
| 31 |
+
{{- format_parameters(item_value, value['items']['required'] | default([])) -}}
|
| 32 |
+
{%- endif -%}
|
| 33 |
+
}
|
| 34 |
+
{%- elif item_key == 'required' -%}
|
| 35 |
+
required:[
|
| 36 |
+
{%- for req_item in item_value -%}
|
| 37 |
+
<|"|>{{- req_item -}}<|"|>
|
| 38 |
+
{%- if not loop.last %},{% endif -%}
|
| 39 |
+
{%- endfor -%}
|
| 40 |
+
]
|
| 41 |
+
{%- elif item_key == 'type' -%}
|
| 42 |
+
{%- if item_value is string -%}
|
| 43 |
+
type:{{ format_argument(item_value | upper) }}
|
| 44 |
+
{%- else -%}
|
| 45 |
+
type:{{ format_argument(item_value | map('upper') | list) }}
|
| 46 |
+
{%- endif -%}
|
| 47 |
+
{%- else -%}
|
| 48 |
+
{{ item_key }}:{{ format_argument(item_value) }}
|
| 49 |
+
{%- endif -%}
|
| 50 |
+
{%- endif -%}
|
| 51 |
+
{%- endfor -%}
|
| 52 |
+
}
|
| 53 |
+
{%- endif -%}
|
| 54 |
+
{%- endif -%}
|
| 55 |
+
{%- if value['nullable'] %}
|
| 56 |
+
{%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}
|
| 57 |
+
nullable:true
|
| 58 |
+
{%- endif -%}
|
| 59 |
+
{%- if value['type'] | upper == 'OBJECT' -%}
|
| 60 |
+
{%- if value['properties'] is defined and value['properties'] is mapping -%}
|
| 61 |
+
{%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}
|
| 62 |
+
properties:{
|
| 63 |
+
{{- format_parameters(value['properties'], value['required'] | default([])) -}}
|
| 64 |
+
}
|
| 65 |
+
{%- elif value is mapping -%}
|
| 66 |
+
{%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}
|
| 67 |
+
properties:{
|
| 68 |
+
{{- format_parameters(value, value['required'] | default([]), filter_keys=true) -}}
|
| 69 |
+
}
|
| 70 |
+
{%- endif -%}
|
| 71 |
+
{%- if value['required'] -%}
|
| 72 |
+
{%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}
|
| 73 |
+
required:[
|
| 74 |
+
{%- for item in value['required'] | default([]) -%}
|
| 75 |
+
<|"|>{{- item -}}<|"|>
|
| 76 |
+
{%- if not loop.last %},{% endif -%}
|
| 77 |
+
{%- endfor -%}
|
| 78 |
+
]
|
| 79 |
+
{%- endif -%}
|
| 80 |
+
{%- endif -%}
|
| 81 |
+
{%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}
|
| 82 |
+
type:<|"|>{{ value['type'] | upper }}<|"|>}
|
| 83 |
+
{%- endif -%}
|
| 84 |
+
{%- endfor -%}
|
| 85 |
+
{%- endmacro -%}
|
| 86 |
+
{%- macro format_function_declaration(tool_data) -%}
|
| 87 |
+
declaration:{{- tool_data['function']['name'] -}}{description:<|"|>{{- tool_data['function']['description'] -}}<|"|>
|
| 88 |
+
{%- set params = tool_data['function']['parameters'] -%}
|
| 89 |
+
{%- if params -%}
|
| 90 |
+
,parameters:{
|
| 91 |
+
{%- if params['properties'] -%}
|
| 92 |
+
properties:{ {{- format_parameters(params['properties'], params['required']) -}} },
|
| 93 |
+
{%- endif -%}
|
| 94 |
+
{%- if params['required'] -%}
|
| 95 |
+
required:[
|
| 96 |
+
{%- for item in params['required'] -%}
|
| 97 |
+
<|"|>{{- item -}}<|"|>
|
| 98 |
+
{{- ',' if not loop.last -}}
|
| 99 |
+
{%- endfor -%}
|
| 100 |
+
],
|
| 101 |
+
{%- endif -%}
|
| 102 |
+
{%- if params['type'] -%}
|
| 103 |
+
type:<|"|>{{- params['type'] | upper -}}<|"|>}
|
| 104 |
+
{%- endif -%}
|
| 105 |
+
{%- endif -%}
|
| 106 |
+
{%- if 'response' in tool_data['function'] -%}
|
| 107 |
+
{%- set response_declaration = tool_data['function']['response'] -%}
|
| 108 |
+
,response:{
|
| 109 |
+
{%- if response_declaration['description'] -%}
|
| 110 |
+
description:<|"|>{{- response_declaration['description'] -}}<|"|>,
|
| 111 |
+
{%- endif -%}
|
| 112 |
+
{%- if response_declaration['type'] | upper == 'OBJECT' -%}
|
| 113 |
+
type:<|"|>{{- response_declaration['type'] | upper -}}<|"|>}
|
| 114 |
+
{%- endif -%}
|
| 115 |
+
{%- endif -%}
|
| 116 |
+
}
|
| 117 |
+
{%- endmacro -%}
|
| 118 |
+
{%- macro format_argument(argument, escape_keys=True) -%}
|
| 119 |
+
{%- if argument is string -%}
|
| 120 |
+
{{- '<|"|>' + argument + '<|"|>' -}}
|
| 121 |
+
{%- elif argument is boolean -%}
|
| 122 |
+
{{- 'true' if argument else 'false' -}}
|
| 123 |
+
{%- elif argument is mapping -%}
|
| 124 |
+
{{- '{' -}}
|
| 125 |
+
{%- set ns = namespace(found_first=false) -%}
|
| 126 |
+
{%- for key, value in argument | dictsort -%}
|
| 127 |
+
{%- if ns.found_first %},{% endif -%}
|
| 128 |
+
{%- set ns.found_first = true -%}
|
| 129 |
+
{%- if escape_keys -%}
|
| 130 |
+
{{- '<|"|>' + key + '<|"|>' -}}
|
| 131 |
+
{%- else -%}
|
| 132 |
+
{{- key -}}
|
| 133 |
+
{%- endif -%}
|
| 134 |
+
:{{- format_argument(value, escape_keys=escape_keys) -}}
|
| 135 |
+
{%- endfor -%}
|
| 136 |
+
{{- '}' -}}
|
| 137 |
+
{%- elif argument is sequence -%}
|
| 138 |
+
{{- '[' -}}
|
| 139 |
+
{%- for item in argument -%}
|
| 140 |
+
{{- format_argument(item, escape_keys=escape_keys) -}}
|
| 141 |
+
{%- if not loop.last %},{% endif -%}
|
| 142 |
+
{%- endfor -%}
|
| 143 |
+
{{- ']' -}}
|
| 144 |
+
{%- else -%}
|
| 145 |
+
{{- argument -}}
|
| 146 |
+
{%- endif -%}
|
| 147 |
+
{%- endmacro -%}
|
| 148 |
+
{%- macro strip_thinking(text) -%}
|
| 149 |
+
{%- set ns = namespace(result='') -%}
|
| 150 |
+
{%- for part in text.split('<channel|>') -%}
|
| 151 |
+
{%- if '<|channel>' in part -%}
|
| 152 |
+
{%- set ns.result = ns.result + part.split('<|channel>')[0] -%}
|
| 153 |
+
{%- else -%}
|
| 154 |
+
{%- set ns.result = ns.result + part -%}
|
| 155 |
+
{%- endif -%}
|
| 156 |
+
{%- endfor -%}
|
| 157 |
+
{{- ns.result | trim -}}
|
| 158 |
+
{%- endmacro -%}
|
| 159 |
+
|
| 160 |
+
{%- macro format_tool_response_block(tool_name, response) -%}
|
| 161 |
+
{{- '<|tool_response>' -}}
|
| 162 |
+
{%- if response is mapping -%}
|
| 163 |
+
{{- 'response:' + tool_name + '{' -}}
|
| 164 |
+
{%- for key, value in response | dictsort -%}
|
| 165 |
+
{{- key -}}:{{- format_argument(value, escape_keys=False) -}}
|
| 166 |
+
{%- if not loop.last %},{% endif -%}
|
| 167 |
+
{%- endfor -%}
|
| 168 |
+
{{- '}' -}}
|
| 169 |
+
{%- else -%}
|
| 170 |
+
{{- 'response:' + tool_name + '{value:' + format_argument(response, escape_keys=False) + '}' -}}
|
| 171 |
+
{%- endif -%}
|
| 172 |
+
{{- '<tool_response|>' -}}
|
| 173 |
+
{%- endmacro -%}
|
| 174 |
+
|
| 175 |
+
{%- set ns = namespace(prev_message_type=None) -%}
|
| 176 |
+
{%- set loop_messages = messages -%}
|
| 177 |
+
{{- bos_token -}}
|
| 178 |
+
{#- Handle System/Tool Definitions Block -#}
|
| 179 |
+
{%- if (enable_thinking is defined and enable_thinking) or tools or messages[0]['role'] in ['system', 'developer'] -%}
|
| 180 |
+
{{- '<|turn>system\n' -}}
|
| 181 |
+
{#- Inject Thinking token at the very top of the FIRST system turn -#}
|
| 182 |
+
{%- if enable_thinking is defined and enable_thinking -%}
|
| 183 |
+
{{- '<|think|>\n' -}}
|
| 184 |
+
{%- set ns.prev_message_type = 'think' -%}
|
| 185 |
+
{%- endif -%}
|
| 186 |
+
{%- if messages[0]['role'] in ['system', 'developer'] -%}
|
| 187 |
+
{%- if messages[0]['content'] is string -%}
|
| 188 |
+
{{- messages[0]['content'] | trim -}}
|
| 189 |
+
{%- elif messages[0]['content'] is sequence -%}
|
| 190 |
+
{%- for item in messages[0]['content'] -%}
|
| 191 |
+
{{- item['text'] | trim + ' '-}}
|
| 192 |
+
{%- endfor -%}
|
| 193 |
+
{%- endif -%}
|
| 194 |
+
{%- set loop_messages = messages[1:] -%}
|
| 195 |
+
{%- endif -%}
|
| 196 |
+
{%- if tools -%}
|
| 197 |
+
{%- for tool in tools %}
|
| 198 |
+
{{- '<|tool>' -}}
|
| 199 |
+
{{- format_function_declaration(tool) | trim -}}
|
| 200 |
+
{{- '<tool|>' -}}
|
| 201 |
+
{%- endfor %}
|
| 202 |
+
{%- set ns.prev_message_type = 'tool' -%}
|
| 203 |
+
{%- endif -%}
|
| 204 |
+
{{- '<turn|>\n' -}}
|
| 205 |
+
{%- endif %}
|
| 206 |
+
|
| 207 |
+
{#- Pre-scan: find last user message index for reasoning guard -#}
|
| 208 |
+
{%- set ns_turn = namespace(last_user_idx=-1) -%}
|
| 209 |
+
{%- for i in range(loop_messages | length) -%}
|
| 210 |
+
{%- if loop_messages[i]['role'] == 'user' -%}
|
| 211 |
+
{%- set ns_turn.last_user_idx = i -%}
|
| 212 |
+
{%- endif -%}
|
| 213 |
+
{%- endfor -%}
|
| 214 |
+
|
| 215 |
+
{#- Loop through messages -#}
|
| 216 |
+
{%- for message in loop_messages -%}
|
| 217 |
+
{%- if message['role'] != 'tool' -%}
|
| 218 |
+
{%- set ns.prev_message_type = None -%}
|
| 219 |
+
{%- set role = 'model' if message['role'] == 'assistant' else message['role'] -%}
|
| 220 |
+
{#- Detect continuation: suppress duplicate <|turn>model when previous non-tool message was also assistant -#}
|
| 221 |
+
{%- set prev_nt = namespace(role=None, found=false) -%}
|
| 222 |
+
{%- if loop.index0 > 0 -%}
|
| 223 |
+
{%- for j in range(loop.index0 - 1, -1, -1) -%}
|
| 224 |
+
{%- if not prev_nt.found -%}
|
| 225 |
+
{%- if loop_messages[j]['role'] != 'tool' -%}
|
| 226 |
+
{%- set prev_nt.role = loop_messages[j]['role'] -%}
|
| 227 |
+
{%- set prev_nt.found = true -%}
|
| 228 |
+
{%- endif -%}
|
| 229 |
+
{%- endif -%}
|
| 230 |
+
{%- endfor -%}
|
| 231 |
+
{%- endif -%}
|
| 232 |
+
{%- set continue_same_model_turn = (role == 'model' and prev_nt.role == 'assistant') -%}
|
| 233 |
+
{%- if not continue_same_model_turn -%}
|
| 234 |
+
{{- '<|turn>' + role + '\n' }}
|
| 235 |
+
{%- endif -%}
|
| 236 |
+
|
| 237 |
+
{#- Render reasoning/reasoning_content as thinking channel -#}
|
| 238 |
+
{%- set thinking_text = message.get('reasoning') or message.get('reasoning_content') -%}
|
| 239 |
+
{%- if thinking_text and loop.index0 > ns_turn.last_user_idx and message.get('tool_calls') -%}
|
| 240 |
+
{{- '<|channel>thought\n' + thinking_text + '\n<channel|>' -}}
|
| 241 |
+
{%- endif -%}
|
| 242 |
+
|
| 243 |
+
{%- if message['tool_calls'] -%}
|
| 244 |
+
{%- for tool_call in message['tool_calls'] -%}
|
| 245 |
+
{%- set function = tool_call['function'] -%}
|
| 246 |
+
{{- '<|tool_call>call:' + function['name'] + '{' -}}
|
| 247 |
+
{%- if function['arguments'] is mapping -%}
|
| 248 |
+
{%- set ns_args = namespace(found_first=false) -%}
|
| 249 |
+
{%- for key, value in function['arguments'] | dictsort -%}
|
| 250 |
+
{%- if ns_args.found_first %},{% endif -%}
|
| 251 |
+
{%- set ns_args.found_first = true -%}
|
| 252 |
+
{{- key -}}:{{- format_argument(value, escape_keys=False) -}}
|
| 253 |
+
{%- endfor -%}
|
| 254 |
+
{%- elif function['arguments'] is string -%}
|
| 255 |
+
{{- function['arguments'] -}}
|
| 256 |
+
{%- endif -%}
|
| 257 |
+
{{- '}<tool_call|>' -}}
|
| 258 |
+
{%- endfor -%}
|
| 259 |
+
{%- set ns.prev_message_type = 'tool_call' -%}
|
| 260 |
+
{%- endif -%}
|
| 261 |
+
|
| 262 |
+
{%- set ns_tr_out = namespace(flag=false) -%}
|
| 263 |
+
{%- if message.get('tool_responses') -%}
|
| 264 |
+
{#- Legacy: tool_responses embedded on the assistant message (Google/Gemma native) -#}
|
| 265 |
+
{%- for tool_response in message['tool_responses'] -%}
|
| 266 |
+
{{- format_tool_response_block(tool_response['name'] | default('unknown'), tool_response['response']) -}}
|
| 267 |
+
{%- set ns_tr_out.flag = true -%}
|
| 268 |
+
{%- set ns.prev_message_type = 'tool_response' -%}
|
| 269 |
+
{%- endfor -%}
|
| 270 |
+
{%- elif message.get('tool_calls') -%}
|
| 271 |
+
{#- OpenAI Chat Completions: forward-scan consecutive role:tool messages -#}
|
| 272 |
+
{%- set ns_tool_scan = namespace(stopped=false) -%}
|
| 273 |
+
{%- for k in range(loop.index0 + 1, loop_messages | length) -%}
|
| 274 |
+
{%- if ns_tool_scan.stopped -%}
|
| 275 |
+
{%- elif loop_messages[k]['role'] != 'tool' -%}
|
| 276 |
+
{%- set ns_tool_scan.stopped = true -%}
|
| 277 |
+
{%- else -%}
|
| 278 |
+
{%- set follow = loop_messages[k] -%}
|
| 279 |
+
{#- Resolve tool_call_id to function name -#}
|
| 280 |
+
{%- set ns_tname = namespace(name=follow.get('name') | default('unknown')) -%}
|
| 281 |
+
{%- for tc in message['tool_calls'] -%}
|
| 282 |
+
{%- if tc.get('id') == follow.get('tool_call_id') -%}
|
| 283 |
+
{%- set ns_tname.name = tc['function']['name'] -%}
|
| 284 |
+
{%- endif -%}
|
| 285 |
+
{%- endfor -%}
|
| 286 |
+
{#- Handle content as string or content-parts array -#}
|
| 287 |
+
{%- set tool_body = follow.get('content') -%}
|
| 288 |
+
{%- if tool_body is string -%}
|
| 289 |
+
{{- format_tool_response_block(ns_tname.name, tool_body) -}}
|
| 290 |
+
{%- elif tool_body is sequence and tool_body is not string -%}
|
| 291 |
+
{%- set ns_txt = namespace(s='') -%}
|
| 292 |
+
{%- for part in tool_body -%}
|
| 293 |
+
{%- if part.get('type') == 'text' -%}
|
| 294 |
+
{%- set ns_txt.s = ns_txt.s + (part.get('text') | default('')) -%}
|
| 295 |
+
{%- endif -%}
|
| 296 |
+
{%- endfor -%}
|
| 297 |
+
{{- format_tool_response_block(ns_tname.name, ns_txt.s) -}}
|
| 298 |
+
{%- for part in tool_body -%}
|
| 299 |
+
{%- if part.get('type') == 'image' -%}
|
| 300 |
+
{{- '<|image|>' -}}
|
| 301 |
+
{%- elif part.get('type') == 'audio' -%}
|
| 302 |
+
{{- '<|audio|>' -}}
|
| 303 |
+
{%- elif part.get('type') == 'video' -%}
|
| 304 |
+
{{- '<|video|>' -}}
|
| 305 |
+
{%- endif -%}
|
| 306 |
+
{%- endfor -%}
|
| 307 |
+
{%- else -%}
|
| 308 |
+
{{- format_tool_response_block(ns_tname.name, tool_body) -}}
|
| 309 |
+
{%- endif -%}
|
| 310 |
+
{%- set ns_tr_out.flag = true -%}
|
| 311 |
+
{%- set ns.prev_message_type = 'tool_response' -%}
|
| 312 |
+
{%- endif -%}
|
| 313 |
+
{%- endfor -%}
|
| 314 |
+
{%- endif -%}
|
| 315 |
+
|
| 316 |
+
{%- set captured_content -%}
|
| 317 |
+
{%- if message['content'] is string -%}
|
| 318 |
+
{%- if role == 'model' -%}
|
| 319 |
+
{{- strip_thinking(message['content']) -}}
|
| 320 |
+
{%- else -%}
|
| 321 |
+
{{- message['content'] | trim -}}
|
| 322 |
+
{%- endif -%}
|
| 323 |
+
{%- elif message['content'] is sequence -%}
|
| 324 |
+
{%- for item in message['content'] -%}
|
| 325 |
+
{%- if item['type'] == 'text' -%}
|
| 326 |
+
{%- if role == 'model' -%}
|
| 327 |
+
{{- strip_thinking(item['text']) -}}
|
| 328 |
+
{%- else -%}
|
| 329 |
+
{{- item['text'] | trim -}}
|
| 330 |
+
{%- endif -%}
|
| 331 |
+
{%- elif item['type'] == 'image' -%}
|
| 332 |
+
{{- '<|image|>' -}}
|
| 333 |
+
{%- set ns.prev_message_type = 'image' -%}
|
| 334 |
+
{%- elif item['type'] == 'audio' -%}
|
| 335 |
+
{{- '<|audio|>' -}}
|
| 336 |
+
{%- set ns.prev_message_type = 'audio' -%}
|
| 337 |
+
{%- elif item['type'] == 'video' -%}
|
| 338 |
+
{{- '<|video|>' -}}
|
| 339 |
+
{%- set ns.prev_message_type = 'video' -%}
|
| 340 |
+
{%- endif -%}
|
| 341 |
+
{%- endfor -%}
|
| 342 |
+
{%- endif -%}
|
| 343 |
+
{%- endset -%}
|
| 344 |
+
|
| 345 |
+
{{- captured_content -}}
|
| 346 |
+
{%- set has_content = captured_content | trim | length > 0 -%}
|
| 347 |
+
|
| 348 |
+
{%- if ns.prev_message_type == 'tool_call' and not ns_tr_out.flag -%}
|
| 349 |
+
{{- '<|tool_response>' -}}
|
| 350 |
+
{%- elif not (ns_tr_out.flag and not has_content) -%}
|
| 351 |
+
{{- '<turn|>\n' -}}
|
| 352 |
+
{%- endif -%}
|
| 353 |
+
{%- endif -%}
|
| 354 |
+
{%- endfor -%}
|
| 355 |
+
|
| 356 |
+
{%- if add_generation_prompt -%}
|
| 357 |
+
{%- if ns.prev_message_type != 'tool_response' and ns.prev_message_type != 'tool_call' -%}
|
| 358 |
+
{{- '<|turn>model\n' -}}
|
| 359 |
+
{%- endif -%}
|
| 360 |
+
{%- endif -%}
|
openvino-epcontext/decoder/model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:84e251388bd6e648c3b9e15f3c1516674acd4626f75e9acf4314a72c6319b105
|
| 3 |
+
size 1511747694
|
openvino-epcontext/decoder/model.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:432230cbec1f29029851ef5b0001cad8160ca82b9277b4e446259d55085dc176
|
| 3 |
+
size 6092
|
openvino-epcontext/decoder/model.xml
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
openvino-epcontext/embedding/model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ba5136d94197767d50592ee056f0cc8dcf7472f55ff3c7589bee7e2255c45268
|
| 3 |
+
size 5510887040
|
openvino-epcontext/embedding/model.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1448f7545d9a89719a1665b5c2f83ee9b0514e2e995735511ae2d026f8822fd7
|
| 3 |
+
size 792
|
openvino-epcontext/embedding/model.xml
ADDED
|
@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
+
<rt_info>
|
| 7 |
+
<attribute name="old_api_map_element_type" version="0" value="i32" />
|
| 8 |
+
</rt_info>
|
| 9 |
+
<output>
|
| 10 |
+
<port id="0" precision="I64" names="input_ids">
|
| 11 |
+
<dim>-1</dim>
|
| 12 |
+
<dim>-1</dim>
|
| 13 |
+
</port>
|
| 14 |
+
</output>
|
| 15 |
+
</layer>
|
| 16 |
+
<layer id="1" name="image_features" type="Parameter" version="opset1">
|
| 17 |
+
<data shape="?,1536" element_type="f16" />
|
| 18 |
+
<output>
|
| 19 |
+
<port id="0" precision="FP16" names="image_features">
|
| 20 |
+
<dim>-1</dim>
|
| 21 |
+
<dim>1536</dim>
|
| 22 |
+
</port>
|
| 23 |
+
</output>
|
| 24 |
+
</layer>
|
| 25 |
+
<layer id="2" name="audio_features" type="Parameter" version="opset1">
|
| 26 |
+
<data shape="?,1536" element_type="f16" />
|
| 27 |
+
<output>
|
| 28 |
+
<port id="0" precision="FP16" names="audio_features">
|
| 29 |
+
<dim>-1</dim>
|
| 30 |
+
<dim>1536</dim>
|
| 31 |
+
</port>
|
| 32 |
+
</output>
|
| 33 |
+
</layer>
|
| 34 |
+
<layer id="3" name="Constant_2698" type="Const" version="opset1">
|
| 35 |
+
<data element_type="i64" shape="1, 1" offset="0" size="8" />
|
| 36 |
+
<output>
|
| 37 |
+
<port id="0" precision="I64">
|
| 38 |
+
<dim>1</dim>
|
| 39 |
+
<dim>1</dim>
|
| 40 |
+
</port>
|
| 41 |
+
</output>
|
| 42 |
+
</layer>
|
| 43 |
+
<layer id="4" name="embedding/Equal_node_19" type="Equal" version="opset1">
|
| 44 |
+
<data auto_broadcast="numpy" />
|
| 45 |
+
<input>
|
| 46 |
+
<port id="0" precision="I64">
|
| 47 |
+
<dim>-1</dim>
|
| 48 |
+
<dim>-1</dim>
|
| 49 |
+
</port>
|
| 50 |
+
<port id="1" precision="I64">
|
| 51 |
+
<dim>1</dim>
|
| 52 |
+
<dim>1</dim>
|
| 53 |
+
</port>
|
| 54 |
+
</input>
|
| 55 |
+
<output>
|
| 56 |
+
<port id="2" precision="BOOL" names="v_embedding.Equal_19">
|
| 57 |
+
<dim>-1</dim>
|
| 58 |
+
<dim>-1</dim>
|
| 59 |
+
</port>
|
| 60 |
+
</output>
|
| 61 |
+
</layer>
|
| 62 |
+
<layer id="5" name="const_1d_1" type="Const" version="opset1">
|
| 63 |
+
<data element_type="i64" shape="1" offset="8" size="8" />
|
| 64 |
+
<output>
|
| 65 |
+
<port id="0" precision="I64" names="const_1d_1">
|
| 66 |
+
<dim>1</dim>
|
| 67 |
+
</port>
|
| 68 |
+
</output>
|
| 69 |
+
</layer>
|
| 70 |
+
<layer id="6" name="embedding/Unsqueeze_node_20" type="Unsqueeze" version="opset1">
|
| 71 |
+
<input>
|
| 72 |
+
<port id="0" precision="BOOL">
|
| 73 |
+
<dim>-1</dim>
|
| 74 |
+
<dim>-1</dim>
|
| 75 |
+
</port>
|
| 76 |
+
<port id="1" precision="I64">
|
| 77 |
+
<dim>1</dim>
|
| 78 |
+
</port>
|
| 79 |
+
</input>
|
| 80 |
+
<output>
|
| 81 |
+
<port id="2" precision="BOOL" names="v_embedding.Unsqueeze_20">
|
| 82 |
+
<dim>-1</dim>
|
| 83 |
+
<dim>-1</dim>
|
| 84 |
+
<dim>1</dim>
|
| 85 |
+
</port>
|
| 86 |
+
</output>
|
| 87 |
+
</layer>
|
| 88 |
+
<layer id="7" name="v_embedding.Unsqueeze_30" type="Const" version="opset1">
|
| 89 |
+
<data element_type="f16" shape="1, 1536" offset="16" size="3072" />
|
| 90 |
+
<output>
|
| 91 |
+
<port id="0" precision="FP16" names="v_embedding.Unsqueeze_30">
|
| 92 |
+
<dim>1</dim>
|
| 93 |
+
<dim>1536</dim>
|
| 94 |
+
</port>
|
| 95 |
+
</output>
|
| 96 |
+
</layer>
|
| 97 |
+
<layer id="8" name="embedding/Concat_node_31" type="Concat" version="opset1">
|
| 98 |
+
<data axis="0" />
|
| 99 |
+
<input>
|
| 100 |
+
<port id="0" precision="FP16">
|
| 101 |
+
<dim>-1</dim>
|
| 102 |
+
<dim>1536</dim>
|
| 103 |
+
</port>
|
| 104 |
+
<port id="1" precision="FP16">
|
| 105 |
+
<dim>1</dim>
|
| 106 |
+
<dim>1536</dim>
|
| 107 |
+
</port>
|
| 108 |
+
</input>
|
| 109 |
+
<output>
|
| 110 |
+
<port id="2" precision="FP16" names="v_embedding.Concat_31">
|
| 111 |
+
<dim>-1</dim>
|
| 112 |
+
<dim>1536</dim>
|
| 113 |
+
</port>
|
| 114 |
+
</output>
|
| 115 |
+
</layer>
|
| 116 |
+
<layer id="9" name="embedding/Cast_node_21" type="Convert" version="opset1">
|
| 117 |
+
<data destination_type="i64" />
|
| 118 |
+
<input>
|
| 119 |
+
<port id="0" precision="BOOL">
|
| 120 |
+
<dim>-1</dim>
|
| 121 |
+
<dim>-1</dim>
|
| 122 |
+
</port>
|
| 123 |
+
</input>
|
| 124 |
+
<output>
|
| 125 |
+
<port id="1" precision="I64" names="v_embedding.Cast_21">
|
| 126 |
+
<dim>-1</dim>
|
| 127 |
+
<dim>-1</dim>
|
| 128 |
+
</port>
|
| 129 |
+
</output>
|
| 130 |
+
</layer>
|
| 131 |
+
<layer id="10" name="embedding/Constant_node_6" type="Const" version="opset1">
|
| 132 |
+
<data element_type="i64" shape="" offset="3088" size="8" />
|
| 133 |
+
<output>
|
| 134 |
+
<port id="0" precision="I64" names="v_embedding.Constant_6" />
|
| 135 |
+
</output>
|
| 136 |
+
</layer>
|
| 137 |
+
<layer id="11" name="embedding/CumSum_node_23" type="CumSum" version="opset3">
|
| 138 |
+
<data exclusive="false" reverse="false" />
|
| 139 |
+
<input>
|
| 140 |
+
<port id="0" precision="I64">
|
| 141 |
+
<dim>-1</dim>
|
| 142 |
+
<dim>-1</dim>
|
| 143 |
+
</port>
|
| 144 |
+
<port id="1" precision="I64" />
|
| 145 |
+
</input>
|
| 146 |
+
<output>
|
| 147 |
+
<port id="2" precision="I64" names="v_embedding.CumSum_23">
|
| 148 |
+
<dim>-1</dim>
|
| 149 |
+
<dim>-1</dim>
|
| 150 |
+
</port>
|
| 151 |
+
</output>
|
| 152 |
+
</layer>
|
| 153 |
+
<layer id="12" name="Constant_2699" type="Const" version="opset1">
|
| 154 |
+
<data element_type="i64" shape="1, 1" offset="8" size="8" />
|
| 155 |
+
<output>
|
| 156 |
+
<port id="0" precision="I64">
|
| 157 |
+
<dim>1</dim>
|
| 158 |
+
<dim>1</dim>
|
| 159 |
+
</port>
|
| 160 |
+
</output>
|
| 161 |
+
</layer>
|
| 162 |
+
<layer id="13" name="embedding/Sub_node_25" type="Add" version="opset1">
|
| 163 |
+
<data auto_broadcast="numpy" />
|
| 164 |
+
<input>
|
| 165 |
+
<port id="0" precision="I64">
|
| 166 |
+
<dim>-1</dim>
|
| 167 |
+
<dim>-1</dim>
|
| 168 |
+
</port>
|
| 169 |
+
<port id="1" precision="I64">
|
| 170 |
+
<dim>1</dim>
|
| 171 |
+
<dim>1</dim>
|
| 172 |
+
</port>
|
| 173 |
+
</input>
|
| 174 |
+
<output>
|
| 175 |
+
<port id="2" precision="I64" names="v_embedding.Sub_25">
|
| 176 |
+
<dim>-1</dim>
|
| 177 |
+
<dim>-1</dim>
|
| 178 |
+
</port>
|
| 179 |
+
</output>
|
| 180 |
+
</layer>
|
| 181 |
+
<layer id="14" name="embedding/Clip_node_27" type="Clamp" version="opset1">
|
| 182 |
+
<data min="0" max="9.2233720368547758e+18" />
|
| 183 |
+
<input>
|
| 184 |
+
<port id="0" precision="I64">
|
| 185 |
+
<dim>-1</dim>
|
| 186 |
+
<dim>-1</dim>
|
| 187 |
+
</port>
|
| 188 |
+
</input>
|
| 189 |
+
<output>
|
| 190 |
+
<port id="1" precision="I64" names="v_embedding.Clip_27">
|
| 191 |
+
<dim>-1</dim>
|
| 192 |
+
<dim>-1</dim>
|
| 193 |
+
</port>
|
| 194 |
+
</output>
|
| 195 |
+
</layer>
|
| 196 |
+
<layer id="15" name="Constant_36" type="Const" version="opset1">
|
| 197 |
+
<data element_type="i64" shape="" offset="3096" size="8" />
|
| 198 |
+
<output>
|
| 199 |
+
<port id="0" precision="I64" />
|
| 200 |
+
</output>
|
| 201 |
+
</layer>
|
| 202 |
+
<layer id="16" name="embedding/Gather_node_32" type="Gather" version="opset8">
|
| 203 |
+
<data batch_dims="0" />
|
| 204 |
+
<input>
|
| 205 |
+
<port id="0" precision="FP16">
|
| 206 |
+
<dim>-1</dim>
|
| 207 |
+
<dim>1536</dim>
|
| 208 |
+
</port>
|
| 209 |
+
<port id="1" precision="I64">
|
| 210 |
+
<dim>-1</dim>
|
| 211 |
+
<dim>-1</dim>
|
| 212 |
+
</port>
|
| 213 |
+
<port id="2" precision="I64" />
|
| 214 |
+
</input>
|
| 215 |
+
<output>
|
| 216 |
+
<port id="3" precision="FP16" names="v_embedding.Gather_32">
|
| 217 |
+
<dim>-1</dim>
|
| 218 |
+
<dim>-1</dim>
|
| 219 |
+
<dim>1536</dim>
|
| 220 |
+
</port>
|
| 221 |
+
</output>
|
| 222 |
+
</layer>
|
| 223 |
+
<layer id="17" name="Constant_2700" type="Const" version="opset1">
|
| 224 |
+
<data element_type="i64" shape="1, 1" offset="3104" size="8" />
|
| 225 |
+
<output>
|
| 226 |
+
<port id="0" precision="I64">
|
| 227 |
+
<dim>1</dim>
|
| 228 |
+
<dim>1</dim>
|
| 229 |
+
</port>
|
| 230 |
+
</output>
|
| 231 |
+
</layer>
|
| 232 |
+
<layer id="18" name="embedding/Equal_node_3" type="Equal" version="opset1">
|
| 233 |
+
<data auto_broadcast="numpy" />
|
| 234 |
+
<input>
|
| 235 |
+
<port id="0" precision="I64">
|
| 236 |
+
<dim>-1</dim>
|
| 237 |
+
<dim>-1</dim>
|
| 238 |
+
</port>
|
| 239 |
+
<port id="1" precision="I64">
|
| 240 |
+
<dim>1</dim>
|
| 241 |
+
<dim>1</dim>
|
| 242 |
+
</port>
|
| 243 |
+
</input>
|
| 244 |
+
<output>
|
| 245 |
+
<port id="2" precision="BOOL" names="v_embedding.Equal_3">
|
| 246 |
+
<dim>-1</dim>
|
| 247 |
+
<dim>-1</dim>
|
| 248 |
+
</port>
|
| 249 |
+
</output>
|
| 250 |
+
</layer>
|
| 251 |
+
<layer id="19" name="embedding/Unsqueeze_node_4" type="Unsqueeze" version="opset1">
|
| 252 |
+
<input>
|
| 253 |
+
<port id="0" precision="BOOL">
|
| 254 |
+
<dim>-1</dim>
|
| 255 |
+
<dim>-1</dim>
|
| 256 |
+
</port>
|
| 257 |
+
<port id="1" precision="I64">
|
| 258 |
+
<dim>1</dim>
|
| 259 |
+
</port>
|
| 260 |
+
</input>
|
| 261 |
+
<output>
|
| 262 |
+
<port id="2" precision="BOOL" names="v_embedding.Unsqueeze_4">
|
| 263 |
+
<dim>-1</dim>
|
| 264 |
+
<dim>-1</dim>
|
| 265 |
+
<dim>1</dim>
|
| 266 |
+
</port>
|
| 267 |
+
</output>
|
| 268 |
+
</layer>
|
| 269 |
+
<layer id="20" name="v_embedding.Unsqueeze_14" type="Const" version="opset1">
|
| 270 |
+
<data element_type="f16" shape="1, 1536" offset="16" size="3072" />
|
| 271 |
+
<output>
|
| 272 |
+
<port id="0" precision="FP16" names="v_embedding.Unsqueeze_14">
|
| 273 |
+
<dim>1</dim>
|
| 274 |
+
<dim>1536</dim>
|
| 275 |
+
</port>
|
| 276 |
+
</output>
|
| 277 |
+
</layer>
|
| 278 |
+
<layer id="21" name="embedding/Concat_node_15" type="Concat" version="opset1">
|
| 279 |
+
<data axis="0" />
|
| 280 |
+
<input>
|
| 281 |
+
<port id="0" precision="FP16">
|
| 282 |
+
<dim>-1</dim>
|
| 283 |
+
<dim>1536</dim>
|
| 284 |
+
</port>
|
| 285 |
+
<port id="1" precision="FP16">
|
| 286 |
+
<dim>1</dim>
|
| 287 |
+
<dim>1536</dim>
|
| 288 |
+
</port>
|
| 289 |
+
</input>
|
| 290 |
+
<output>
|
| 291 |
+
<port id="2" precision="FP16" names="v_embedding.Concat_15">
|
| 292 |
+
<dim>-1</dim>
|
| 293 |
+
<dim>1536</dim>
|
| 294 |
+
</port>
|
| 295 |
+
</output>
|
| 296 |
+
</layer>
|
| 297 |
+
<layer id="22" name="embedding/Cast_node_5" type="Convert" version="opset1">
|
| 298 |
+
<data destination_type="i64" />
|
| 299 |
+
<input>
|
| 300 |
+
<port id="0" precision="BOOL">
|
| 301 |
+
<dim>-1</dim>
|
| 302 |
+
<dim>-1</dim>
|
| 303 |
+
</port>
|
| 304 |
+
</input>
|
| 305 |
+
<output>
|
| 306 |
+
<port id="1" precision="I64" names="v_embedding.Cast_5">
|
| 307 |
+
<dim>-1</dim>
|
| 308 |
+
<dim>-1</dim>
|
| 309 |
+
</port>
|
| 310 |
+
</output>
|
| 311 |
+
</layer>
|
| 312 |
+
<layer id="23" name="embedding/CumSum_node_7" type="CumSum" version="opset3">
|
| 313 |
+
<data exclusive="false" reverse="false" />
|
| 314 |
+
<input>
|
| 315 |
+
<port id="0" precision="I64">
|
| 316 |
+
<dim>-1</dim>
|
| 317 |
+
<dim>-1</dim>
|
| 318 |
+
</port>
|
| 319 |
+
<port id="1" precision="I64" />
|
| 320 |
+
</input>
|
| 321 |
+
<output>
|
| 322 |
+
<port id="2" precision="I64" names="v_embedding.CumSum_7">
|
| 323 |
+
<dim>-1</dim>
|
| 324 |
+
<dim>-1</dim>
|
| 325 |
+
</port>
|
| 326 |
+
</output>
|
| 327 |
+
</layer>
|
| 328 |
+
<layer id="24" name="Constant_2701" type="Const" version="opset1">
|
| 329 |
+
<data element_type="i64" shape="1, 1" offset="8" size="8" />
|
| 330 |
+
<output>
|
| 331 |
+
<port id="0" precision="I64">
|
| 332 |
+
<dim>1</dim>
|
| 333 |
+
<dim>1</dim>
|
| 334 |
+
</port>
|
| 335 |
+
</output>
|
| 336 |
+
</layer>
|
| 337 |
+
<layer id="25" name="embedding/Sub_node_9" type="Add" version="opset1">
|
| 338 |
+
<data auto_broadcast="numpy" />
|
| 339 |
+
<input>
|
| 340 |
+
<port id="0" precision="I64">
|
| 341 |
+
<dim>-1</dim>
|
| 342 |
+
<dim>-1</dim>
|
| 343 |
+
</port>
|
| 344 |
+
<port id="1" precision="I64">
|
| 345 |
+
<dim>1</dim>
|
| 346 |
+
<dim>1</dim>
|
| 347 |
+
</port>
|
| 348 |
+
</input>
|
| 349 |
+
<output>
|
| 350 |
+
<port id="2" precision="I64" names="v_embedding.Sub_9">
|
| 351 |
+
<dim>-1</dim>
|
| 352 |
+
<dim>-1</dim>
|
| 353 |
+
</port>
|
| 354 |
+
</output>
|
| 355 |
+
</layer>
|
| 356 |
+
<layer id="26" name="embedding/Clip_node_11" type="Clamp" version="opset1">
|
| 357 |
+
<data min="0" max="9.2233720368547758e+18" />
|
| 358 |
+
<input>
|
| 359 |
+
<port id="0" precision="I64">
|
| 360 |
+
<dim>-1</dim>
|
| 361 |
+
<dim>-1</dim>
|
| 362 |
+
</port>
|
| 363 |
+
</input>
|
| 364 |
+
<output>
|
| 365 |
+
<port id="1" precision="I64" names="v_embedding.Clip_11">
|
| 366 |
+
<dim>-1</dim>
|
| 367 |
+
<dim>-1</dim>
|
| 368 |
+
</port>
|
| 369 |
+
</output>
|
| 370 |
+
</layer>
|
| 371 |
+
<layer id="27" name="Constant_55" type="Const" version="opset1">
|
| 372 |
+
<data element_type="i64" shape="" offset="3096" size="8" />
|
| 373 |
+
<output>
|
| 374 |
+
<port id="0" precision="I64" />
|
| 375 |
+
</output>
|
| 376 |
+
</layer>
|
| 377 |
+
<layer id="28" name="embedding/Gather_node_16" type="Gather" version="opset8">
|
| 378 |
+
<data batch_dims="0" />
|
| 379 |
+
<input>
|
| 380 |
+
<port id="0" precision="FP16">
|
| 381 |
+
<dim>-1</dim>
|
| 382 |
+
<dim>1536</dim>
|
| 383 |
+
</port>
|
| 384 |
+
<port id="1" precision="I64">
|
| 385 |
+
<dim>-1</dim>
|
| 386 |
+
<dim>-1</dim>
|
| 387 |
+
</port>
|
| 388 |
+
<port id="2" precision="I64" />
|
| 389 |
+
</input>
|
| 390 |
+
<output>
|
| 391 |
+
<port id="3" precision="FP16" names="v_embedding.Gather_16">
|
| 392 |
+
<dim>-1</dim>
|
| 393 |
+
<dim>-1</dim>
|
| 394 |
+
<dim>1536</dim>
|
| 395 |
+
</port>
|
| 396 |
+
</output>
|
| 397 |
+
</layer>
|
| 398 |
+
<layer id="29" name="embedding.embed_tokens.weight" type="Const" version="opset1">
|
| 399 |
+
<data element_type="f16" shape="262144, 1536" offset="3112" size="805306368" />
|
| 400 |
+
<output>
|
| 401 |
+
<port id="0" precision="FP16" names="embedding.embed_tokens.weight">
|
| 402 |
+
<dim>262144</dim>
|
| 403 |
+
<dim>1536</dim>
|
| 404 |
+
</port>
|
| 405 |
+
</output>
|
| 406 |
+
</layer>
|
| 407 |
+
<layer id="30" name="Constant_59" type="Const" version="opset1">
|
| 408 |
+
<data element_type="i64" shape="" offset="3096" size="8" />
|
| 409 |
+
<output>
|
| 410 |
+
<port id="0" precision="I64" />
|
| 411 |
+
</output>
|
| 412 |
+
</layer>
|
| 413 |
+
<layer id="31" name="embedding/embed_tokens/Gather_node_0" type="Gather" version="opset8">
|
| 414 |
+
<data batch_dims="0" />
|
| 415 |
+
<input>
|
| 416 |
+
<port id="0" precision="FP16">
|
| 417 |
+
<dim>262144</dim>
|
| 418 |
+
<dim>1536</dim>
|
| 419 |
+
</port>
|
| 420 |
+
<port id="1" precision="I64">
|
| 421 |
+
<dim>-1</dim>
|
| 422 |
+
<dim>-1</dim>
|
| 423 |
+
</port>
|
| 424 |
+
<port id="2" precision="I64" />
|
| 425 |
+
</input>
|
| 426 |
+
<output>
|
| 427 |
+
<port id="3" precision="FP16" names="v_embedding.embed_tokens.Gather_0">
|
| 428 |
+
<dim>-1</dim>
|
| 429 |
+
<dim>-1</dim>
|
| 430 |
+
<dim>1536</dim>
|
| 431 |
+
</port>
|
| 432 |
+
</output>
|
| 433 |
+
</layer>
|
| 434 |
+
<layer id="32" name="Constant_2702" type="Const" version="opset1">
|
| 435 |
+
<data element_type="f16" shape="1, 1, 1" offset="805309480" size="2" />
|
| 436 |
+
<output>
|
| 437 |
+
<port id="0" precision="FP16">
|
| 438 |
+
<dim>1</dim>
|
| 439 |
+
<dim>1</dim>
|
| 440 |
+
<dim>1</dim>
|
| 441 |
+
</port>
|
| 442 |
+
</output>
|
| 443 |
+
</layer>
|
| 444 |
+
<layer id="33" name="embedding/embed_tokens/Mul_node_1" type="Multiply" version="opset1">
|
| 445 |
+
<data auto_broadcast="numpy" />
|
| 446 |
+
<input>
|
| 447 |
+
<port id="0" precision="FP16">
|
| 448 |
+
<dim>-1</dim>
|
| 449 |
+
<dim>-1</dim>
|
| 450 |
+
<dim>1536</dim>
|
| 451 |
+
</port>
|
| 452 |
+
<port id="1" precision="FP16">
|
| 453 |
+
<dim>1</dim>
|
| 454 |
+
<dim>1</dim>
|
| 455 |
+
<dim>1</dim>
|
| 456 |
+
</port>
|
| 457 |
+
</input>
|
| 458 |
+
<output>
|
| 459 |
+
<port id="2" precision="FP16" names="v_embedding.embed_tokens.Mul_1">
|
| 460 |
+
<dim>-1</dim>
|
| 461 |
+
<dim>-1</dim>
|
| 462 |
+
<dim>1536</dim>
|
| 463 |
+
</port>
|
| 464 |
+
</output>
|
| 465 |
+
</layer>
|
| 466 |
+
<layer id="34" name="embedding/Where_node_17" type="Select" version="opset1">
|
| 467 |
+
<data auto_broadcast="numpy" />
|
| 468 |
+
<input>
|
| 469 |
+
<port id="0" precision="BOOL">
|
| 470 |
+
<dim>-1</dim>
|
| 471 |
+
<dim>-1</dim>
|
| 472 |
+
<dim>1</dim>
|
| 473 |
+
</port>
|
| 474 |
+
<port id="1" precision="FP16">
|
| 475 |
+
<dim>-1</dim>
|
| 476 |
+
<dim>-1</dim>
|
| 477 |
+
<dim>1536</dim>
|
| 478 |
+
</port>
|
| 479 |
+
<port id="2" precision="FP16">
|
| 480 |
+
<dim>-1</dim>
|
| 481 |
+
<dim>-1</dim>
|
| 482 |
+
<dim>1536</dim>
|
| 483 |
+
</port>
|
| 484 |
+
</input>
|
| 485 |
+
<output>
|
| 486 |
+
<port id="3" precision="FP16" names="v_embedding.Where_17">
|
| 487 |
+
<dim>-1</dim>
|
| 488 |
+
<dim>-1</dim>
|
| 489 |
+
<dim>1536</dim>
|
| 490 |
+
</port>
|
| 491 |
+
</output>
|
| 492 |
+
</layer>
|
| 493 |
+
<layer id="35" name="inputs_embeds" type="Select" version="opset1">
|
| 494 |
+
<data auto_broadcast="numpy" />
|
| 495 |
+
<input>
|
| 496 |
+
<port id="0" precision="BOOL">
|
| 497 |
+
<dim>-1</dim>
|
| 498 |
+
<dim>-1</dim>
|
| 499 |
+
<dim>1</dim>
|
| 500 |
+
</port>
|
| 501 |
+
<port id="1" precision="FP16">
|
| 502 |
+
<dim>-1</dim>
|
| 503 |
+
<dim>-1</dim>
|
| 504 |
+
<dim>1536</dim>
|
| 505 |
+
</port>
|
| 506 |
+
<port id="2" precision="FP16">
|
| 507 |
+
<dim>-1</dim>
|
| 508 |
+
<dim>-1</dim>
|
| 509 |
+
<dim>1536</dim>
|
| 510 |
+
</port>
|
| 511 |
+
</input>
|
| 512 |
+
<output>
|
| 513 |
+
<port id="3" precision="FP16" names="inputs_embeds">
|
| 514 |
+
<dim>-1</dim>
|
| 515 |
+
<dim>-1</dim>
|
| 516 |
+
<dim>1536</dim>
|
| 517 |
+
</port>
|
| 518 |
+
</output>
|
| 519 |
+
</layer>
|
| 520 |
+
<layer id="36" name="Reshape_8" type="Const" version="opset1">
|
| 521 |
+
<data element_type="i4" shape="48, 32, 8960" offset="805309482" size="6881280" />
|
| 522 |
+
<output>
|
| 523 |
+
<port id="0" precision="I4">
|
| 524 |
+
<dim>48</dim>
|
| 525 |
+
<dim>32</dim>
|
| 526 |
+
<dim>8960</dim>
|
| 527 |
+
</port>
|
| 528 |
+
</output>
|
| 529 |
+
</layer>
|
| 530 |
+
<layer id="37" name="Convert_13" type="Convert" version="opset1">
|
| 531 |
+
<data destination_type="f16" />
|
| 532 |
+
<input>
|
| 533 |
+
<port id="0" precision="I4">
|
| 534 |
+
<dim>48</dim>
|
| 535 |
+
<dim>32</dim>
|
| 536 |
+
<dim>8960</dim>
|
| 537 |
+
</port>
|
| 538 |
+
</input>
|
| 539 |
+
<output>
|
| 540 |
+
<port id="1" precision="FP16">
|
| 541 |
+
<dim>48</dim>
|
| 542 |
+
<dim>32</dim>
|
| 543 |
+
<dim>8960</dim>
|
| 544 |
+
</port>
|
| 545 |
+
</output>
|
| 546 |
+
</layer>
|
| 547 |
+
<layer id="38" name="Unsqueeze_10" type="Const" version="opset1">
|
| 548 |
+
<data element_type="i4" shape="48, 1, 8960" offset="812190762" size="215040" />
|
| 549 |
+
<output>
|
| 550 |
+
<port id="0" precision="I4">
|
| 551 |
+
<dim>48</dim>
|
| 552 |
+
<dim>1</dim>
|
| 553 |
+
<dim>8960</dim>
|
| 554 |
+
</port>
|
| 555 |
+
</output>
|
| 556 |
+
</layer>
|
| 557 |
+
<layer id="39" name="Convert_14" type="Convert" version="opset1">
|
| 558 |
+
<data destination_type="f16" />
|
| 559 |
+
<input>
|
| 560 |
+
<port id="0" precision="I4">
|
| 561 |
+
<dim>48</dim>
|
| 562 |
+
<dim>1</dim>
|
| 563 |
+
<dim>8960</dim>
|
| 564 |
+
</port>
|
| 565 |
+
</input>
|
| 566 |
+
<output>
|
| 567 |
+
<port id="1" precision="FP16">
|
| 568 |
+
<dim>48</dim>
|
| 569 |
+
<dim>1</dim>
|
| 570 |
+
<dim>8960</dim>
|
| 571 |
+
</port>
|
| 572 |
+
</output>
|
| 573 |
+
</layer>
|
| 574 |
+
<layer id="40" name="Subtract_15" type="Subtract" version="opset1">
|
| 575 |
+
<data auto_broadcast="numpy" />
|
| 576 |
+
<input>
|
| 577 |
+
<port id="0" precision="FP16">
|
| 578 |
+
<dim>48</dim>
|
| 579 |
+
<dim>32</dim>
|
| 580 |
+
<dim>8960</dim>
|
| 581 |
+
</port>
|
| 582 |
+
<port id="1" precision="FP16">
|
| 583 |
+
<dim>48</dim>
|
| 584 |
+
<dim>1</dim>
|
| 585 |
+
<dim>8960</dim>
|
| 586 |
+
</port>
|
| 587 |
+
</input>
|
| 588 |
+
<output>
|
| 589 |
+
<port id="2" precision="FP16">
|
| 590 |
+
<dim>48</dim>
|
| 591 |
+
<dim>32</dim>
|
| 592 |
+
<dim>8960</dim>
|
| 593 |
+
</port>
|
| 594 |
+
</output>
|
| 595 |
+
</layer>
|
| 596 |
+
<layer id="41" name="Unsqueeze_11" type="Const" version="opset1">
|
| 597 |
+
<data element_type="f16" shape="48, 1, 8960" offset="812405802" size="860160" />
|
| 598 |
+
<output>
|
| 599 |
+
<port id="0" precision="FP16">
|
| 600 |
+
<dim>48</dim>
|
| 601 |
+
<dim>1</dim>
|
| 602 |
+
<dim>8960</dim>
|
| 603 |
+
</port>
|
| 604 |
+
</output>
|
| 605 |
+
</layer>
|
| 606 |
+
<layer id="42" name="Multiply_16" type="Multiply" version="opset1">
|
| 607 |
+
<data auto_broadcast="numpy" />
|
| 608 |
+
<input>
|
| 609 |
+
<port id="0" precision="FP16">
|
| 610 |
+
<dim>48</dim>
|
| 611 |
+
<dim>32</dim>
|
| 612 |
+
<dim>8960</dim>
|
| 613 |
+
</port>
|
| 614 |
+
<port id="1" precision="FP16">
|
| 615 |
+
<dim>48</dim>
|
| 616 |
+
<dim>1</dim>
|
| 617 |
+
<dim>8960</dim>
|
| 618 |
+
</port>
|
| 619 |
+
</input>
|
| 620 |
+
<output>
|
| 621 |
+
<port id="2" precision="FP16">
|
| 622 |
+
<dim>48</dim>
|
| 623 |
+
<dim>32</dim>
|
| 624 |
+
<dim>8960</dim>
|
| 625 |
+
</port>
|
| 626 |
+
</output>
|
| 627 |
+
</layer>
|
| 628 |
+
<layer id="43" name="Constant_2724" type="Const" version="opset1">
|
| 629 |
+
<data element_type="i64" shape="2" offset="813265962" size="16" />
|
| 630 |
+
<output>
|
| 631 |
+
<port id="0" precision="I64">
|
| 632 |
+
<dim>2</dim>
|
| 633 |
+
</port>
|
| 634 |
+
</output>
|
| 635 |
+
</layer>
|
| 636 |
+
<layer id="44" name="embedding/per_layer_model_projection/MatMul_node_35_Q4_DequantizeLinear" type="Reshape" version="opset1">
|
| 637 |
+
<data special_zero="true" />
|
| 638 |
+
<input>
|
| 639 |
+
<port id="0" precision="FP16">
|
| 640 |
+
<dim>48</dim>
|
| 641 |
+
<dim>32</dim>
|
| 642 |
+
<dim>8960</dim>
|
| 643 |
+
</port>
|
| 644 |
+
<port id="1" precision="I64">
|
| 645 |
+
<dim>2</dim>
|
| 646 |
+
</port>
|
| 647 |
+
</input>
|
| 648 |
+
<output>
|
| 649 |
+
<port id="2" precision="FP16" names="embedding/per_layer_model_projection/MatMul_node_35_Q4_DequantizeLinear/output_0">
|
| 650 |
+
<dim>1536</dim>
|
| 651 |
+
<dim>8960</dim>
|
| 652 |
+
</port>
|
| 653 |
+
</output>
|
| 654 |
+
</layer>
|
| 655 |
+
<layer id="45" name="embedding/per_layer_model_projection/MatMul_node_35_Q4_MatMul" type="MatMul" version="opset1">
|
| 656 |
+
<data transpose_a="false" transpose_b="false" />
|
| 657 |
+
<input>
|
| 658 |
+
<port id="0" precision="FP16">
|
| 659 |
+
<dim>-1</dim>
|
| 660 |
+
<dim>-1</dim>
|
| 661 |
+
<dim>1536</dim>
|
| 662 |
+
</port>
|
| 663 |
+
<port id="1" precision="FP16">
|
| 664 |
+
<dim>1536</dim>
|
| 665 |
+
<dim>8960</dim>
|
| 666 |
+
</port>
|
| 667 |
+
</input>
|
| 668 |
+
<output>
|
| 669 |
+
<port id="2" precision="FP16" names="embedding/per_layer_model_projection/MatMul_node_35_Q4_MatMul/output_0">
|
| 670 |
+
<dim>-1</dim>
|
| 671 |
+
<dim>-1</dim>
|
| 672 |
+
<dim>8960</dim>
|
| 673 |
+
</port>
|
| 674 |
+
</output>
|
| 675 |
+
</layer>
|
| 676 |
+
<layer id="46" name="Constant_2703" type="Const" version="opset1">
|
| 677 |
+
<data element_type="f16" shape="1, 1, 1" offset="813265978" size="2" />
|
| 678 |
+
<output>
|
| 679 |
+
<port id="0" precision="FP16">
|
| 680 |
+
<dim>1</dim>
|
| 681 |
+
<dim>1</dim>
|
| 682 |
+
<dim>1</dim>
|
| 683 |
+
</port>
|
| 684 |
+
</output>
|
| 685 |
+
</layer>
|
| 686 |
+
<layer id="47" name="embedding/Mul_node_36" type="Multiply" version="opset1">
|
| 687 |
+
<data auto_broadcast="numpy" />
|
| 688 |
+
<input>
|
| 689 |
+
<port id="0" precision="FP16">
|
| 690 |
+
<dim>-1</dim>
|
| 691 |
+
<dim>-1</dim>
|
| 692 |
+
<dim>8960</dim>
|
| 693 |
+
</port>
|
| 694 |
+
<port id="1" precision="FP16">
|
| 695 |
+
<dim>1</dim>
|
| 696 |
+
<dim>1</dim>
|
| 697 |
+
<dim>1</dim>
|
| 698 |
+
</port>
|
| 699 |
+
</input>
|
| 700 |
+
<output>
|
| 701 |
+
<port id="2" precision="FP16" names="v_embedding.Mul_36">
|
| 702 |
+
<dim>-1</dim>
|
| 703 |
+
<dim>-1</dim>
|
| 704 |
+
<dim>8960</dim>
|
| 705 |
+
</port>
|
| 706 |
+
</output>
|
| 707 |
+
</layer>
|
| 708 |
+
<layer id="48" name="embedding/Constant_node_37" type="Const" version="opset1">
|
| 709 |
+
<data element_type="i64" shape="4" offset="813265980" size="32" />
|
| 710 |
+
<output>
|
| 711 |
+
<port id="0" precision="I64" names="v_embedding.Constant_37">
|
| 712 |
+
<dim>4</dim>
|
| 713 |
+
</port>
|
| 714 |
+
</output>
|
| 715 |
+
</layer>
|
| 716 |
+
<layer id="49" name="embedding/Reshape_node_38" type="Reshape" version="opset1">
|
| 717 |
+
<data special_zero="true" />
|
| 718 |
+
<input>
|
| 719 |
+
<port id="0" precision="FP16">
|
| 720 |
+
<dim>-1</dim>
|
| 721 |
+
<dim>-1</dim>
|
| 722 |
+
<dim>8960</dim>
|
| 723 |
+
</port>
|
| 724 |
+
<port id="1" precision="I64">
|
| 725 |
+
<dim>4</dim>
|
| 726 |
+
</port>
|
| 727 |
+
</input>
|
| 728 |
+
<output>
|
| 729 |
+
<port id="2" precision="FP16" names="v_embedding.Reshape_38">
|
| 730 |
+
<dim>-1</dim>
|
| 731 |
+
<dim>-1</dim>
|
| 732 |
+
<dim>35</dim>
|
| 733 |
+
<dim>256</dim>
|
| 734 |
+
</port>
|
| 735 |
+
</output>
|
| 736 |
+
</layer>
|
| 737 |
+
<layer id="50" name="Convert_70" type="Convert" version="opset1">
|
| 738 |
+
<data destination_type="f32" />
|
| 739 |
+
<input>
|
| 740 |
+
<port id="0" precision="FP16">
|
| 741 |
+
<dim>-1</dim>
|
| 742 |
+
<dim>-1</dim>
|
| 743 |
+
<dim>35</dim>
|
| 744 |
+
<dim>256</dim>
|
| 745 |
+
</port>
|
| 746 |
+
</input>
|
| 747 |
+
<output>
|
| 748 |
+
<port id="1" precision="FP32">
|
| 749 |
+
<dim>-1</dim>
|
| 750 |
+
<dim>-1</dim>
|
| 751 |
+
<dim>35</dim>
|
| 752 |
+
<dim>256</dim>
|
| 753 |
+
</port>
|
| 754 |
+
</output>
|
| 755 |
+
</layer>
|
| 756 |
+
<layer id="51" name="Constant_2704" type="Const" version="opset1">
|
| 757 |
+
<data element_type="f32" shape="1, 1, 1, 1" offset="813266012" size="4" />
|
| 758 |
+
<output>
|
| 759 |
+
<port id="0" precision="FP32">
|
| 760 |
+
<dim>1</dim>
|
| 761 |
+
<dim>1</dim>
|
| 762 |
+
<dim>1</dim>
|
| 763 |
+
<dim>1</dim>
|
| 764 |
+
</port>
|
| 765 |
+
</output>
|
| 766 |
+
</layer>
|
| 767 |
+
<layer id="52" name="Power_77" type="Power" version="opset1">
|
| 768 |
+
<data auto_broadcast="numpy" />
|
| 769 |
+
<input>
|
| 770 |
+
<port id="0" precision="FP32">
|
| 771 |
+
<dim>-1</dim>
|
| 772 |
+
<dim>-1</dim>
|
| 773 |
+
<dim>35</dim>
|
| 774 |
+
<dim>256</dim>
|
| 775 |
+
</port>
|
| 776 |
+
<port id="1" precision="FP32">
|
| 777 |
+
<dim>1</dim>
|
| 778 |
+
<dim>1</dim>
|
| 779 |
+
<dim>1</dim>
|
| 780 |
+
<dim>1</dim>
|
| 781 |
+
</port>
|
| 782 |
+
</input>
|
| 783 |
+
<output>
|
| 784 |
+
<port id="2" precision="FP32">
|
| 785 |
+
<dim>-1</dim>
|
| 786 |
+
<dim>-1</dim>
|
| 787 |
+
<dim>35</dim>
|
| 788 |
+
<dim>256</dim>
|
| 789 |
+
</port>
|
| 790 |
+
</output>
|
| 791 |
+
</layer>
|
| 792 |
+
<layer id="53" name="Range_74" type="Const" version="opset1">
|
| 793 |
+
<data element_type="i64" shape="1" offset="8" size="8" />
|
| 794 |
+
<output>
|
| 795 |
+
<port id="0" precision="I64">
|
| 796 |
+
<dim>1</dim>
|
| 797 |
+
</port>
|
| 798 |
+
</output>
|
| 799 |
+
</layer>
|
| 800 |
+
<layer id="54" name="ReduceMean_78" type="ReduceMean" version="opset1">
|
| 801 |
+
<data keep_dims="true" />
|
| 802 |
+
<input>
|
| 803 |
+
<port id="0" precision="FP32">
|
| 804 |
+
<dim>-1</dim>
|
| 805 |
+
<dim>-1</dim>
|
| 806 |
+
<dim>35</dim>
|
| 807 |
+
<dim>256</dim>
|
| 808 |
+
</port>
|
| 809 |
+
<port id="1" precision="I64">
|
| 810 |
+
<dim>1</dim>
|
| 811 |
+
</port>
|
| 812 |
+
</input>
|
| 813 |
+
<output>
|
| 814 |
+
<port id="2" precision="FP32">
|
| 815 |
+
<dim>-1</dim>
|
| 816 |
+
<dim>-1</dim>
|
| 817 |
+
<dim>35</dim>
|
| 818 |
+
<dim>1</dim>
|
| 819 |
+
</port>
|
| 820 |
+
</output>
|
| 821 |
+
</layer>
|
| 822 |
+
<layer id="55" name="Constant_2705" type="Const" version="opset1">
|
| 823 |
+
<data element_type="f32" shape="1, 1, 1, 1" offset="813266016" size="4" />
|
| 824 |
+
<output>
|
| 825 |
+
<port id="0" precision="FP32">
|
| 826 |
+
<dim>1</dim>
|
| 827 |
+
<dim>1</dim>
|
| 828 |
+
<dim>1</dim>
|
| 829 |
+
<dim>1</dim>
|
| 830 |
+
</port>
|
| 831 |
+
</output>
|
| 832 |
+
</layer>
|
| 833 |
+
<layer id="56" name="Add_80" type="Add" version="opset1">
|
| 834 |
+
<data auto_broadcast="numpy" />
|
| 835 |
+
<input>
|
| 836 |
+
<port id="0" precision="FP32">
|
| 837 |
+
<dim>-1</dim>
|
| 838 |
+
<dim>-1</dim>
|
| 839 |
+
<dim>35</dim>
|
| 840 |
+
<dim>1</dim>
|
| 841 |
+
</port>
|
| 842 |
+
<port id="1" precision="FP32">
|
| 843 |
+
<dim>1</dim>
|
| 844 |
+
<dim>1</dim>
|
| 845 |
+
<dim>1</dim>
|
| 846 |
+
<dim>1</dim>
|
| 847 |
+
</port>
|
| 848 |
+
</input>
|
| 849 |
+
<output>
|
| 850 |
+
<port id="2" precision="FP32">
|
| 851 |
+
<dim>-1</dim>
|
| 852 |
+
<dim>-1</dim>
|
| 853 |
+
<dim>35</dim>
|
| 854 |
+
<dim>1</dim>
|
| 855 |
+
</port>
|
| 856 |
+
</output>
|
| 857 |
+
</layer>
|
| 858 |
+
<layer id="57" name="Sqrt_81" type="Sqrt" version="opset1">
|
| 859 |
+
<input>
|
| 860 |
+
<port id="0" precision="FP32">
|
| 861 |
+
<dim>-1</dim>
|
| 862 |
+
<dim>-1</dim>
|
| 863 |
+
<dim>35</dim>
|
| 864 |
+
<dim>1</dim>
|
| 865 |
+
</port>
|
| 866 |
+
</input>
|
| 867 |
+
<output>
|
| 868 |
+
<port id="1" precision="FP32">
|
| 869 |
+
<dim>-1</dim>
|
| 870 |
+
<dim>-1</dim>
|
| 871 |
+
<dim>35</dim>
|
| 872 |
+
<dim>1</dim>
|
| 873 |
+
</port>
|
| 874 |
+
</output>
|
| 875 |
+
</layer>
|
| 876 |
+
<layer id="58" name="Multiply_84" type="Divide" version="opset1">
|
| 877 |
+
<data auto_broadcast="numpy" m_pythondiv="true" />
|
| 878 |
+
<input>
|
| 879 |
+
<port id="0" precision="FP32">
|
| 880 |
+
<dim>-1</dim>
|
| 881 |
+
<dim>-1</dim>
|
| 882 |
+
<dim>35</dim>
|
| 883 |
+
<dim>256</dim>
|
| 884 |
+
</port>
|
| 885 |
+
<port id="1" precision="FP32">
|
| 886 |
+
<dim>-1</dim>
|
| 887 |
+
<dim>-1</dim>
|
| 888 |
+
<dim>35</dim>
|
| 889 |
+
<dim>1</dim>
|
| 890 |
+
</port>
|
| 891 |
+
</input>
|
| 892 |
+
<output>
|
| 893 |
+
<port id="2" precision="FP32">
|
| 894 |
+
<dim>-1</dim>
|
| 895 |
+
<dim>-1</dim>
|
| 896 |
+
<dim>35</dim>
|
| 897 |
+
<dim>256</dim>
|
| 898 |
+
</port>
|
| 899 |
+
</output>
|
| 900 |
+
</layer>
|
| 901 |
+
<layer id="59" name="ConvertLike_85" type="ConvertLike" version="opset1">
|
| 902 |
+
<input>
|
| 903 |
+
<port id="0" precision="FP32">
|
| 904 |
+
<dim>-1</dim>
|
| 905 |
+
<dim>-1</dim>
|
| 906 |
+
<dim>35</dim>
|
| 907 |
+
<dim>256</dim>
|
| 908 |
+
</port>
|
| 909 |
+
<port id="1" precision="FP16">
|
| 910 |
+
<dim>-1</dim>
|
| 911 |
+
<dim>-1</dim>
|
| 912 |
+
<dim>35</dim>
|
| 913 |
+
<dim>256</dim>
|
| 914 |
+
</port>
|
| 915 |
+
</input>
|
| 916 |
+
<output>
|
| 917 |
+
<port id="2" precision="FP16">
|
| 918 |
+
<dim>-1</dim>
|
| 919 |
+
<dim>-1</dim>
|
| 920 |
+
<dim>35</dim>
|
| 921 |
+
<dim>256</dim>
|
| 922 |
+
</port>
|
| 923 |
+
</output>
|
| 924 |
+
</layer>
|
| 925 |
+
<layer id="60" name="Constant_2706" type="Const" version="opset1">
|
| 926 |
+
<data element_type="f16" shape="1, 1, 1, 256" offset="813266020" size="512" />
|
| 927 |
+
<output>
|
| 928 |
+
<port id="0" precision="FP16">
|
| 929 |
+
<dim>1</dim>
|
| 930 |
+
<dim>1</dim>
|
| 931 |
+
<dim>1</dim>
|
| 932 |
+
<dim>256</dim>
|
| 933 |
+
</port>
|
| 934 |
+
</output>
|
| 935 |
+
</layer>
|
| 936 |
+
<layer id="61" name="embedding/per_layer_projection_norm/RMSNormalization_node_39" type="Multiply" version="opset1">
|
| 937 |
+
<data auto_broadcast="numpy" />
|
| 938 |
+
<input>
|
| 939 |
+
<port id="0" precision="FP16">
|
| 940 |
+
<dim>-1</dim>
|
| 941 |
+
<dim>-1</dim>
|
| 942 |
+
<dim>35</dim>
|
| 943 |
+
<dim>256</dim>
|
| 944 |
+
</port>
|
| 945 |
+
<port id="1" precision="FP16">
|
| 946 |
+
<dim>1</dim>
|
| 947 |
+
<dim>1</dim>
|
| 948 |
+
<dim>1</dim>
|
| 949 |
+
<dim>256</dim>
|
| 950 |
+
</port>
|
| 951 |
+
</input>
|
| 952 |
+
<output>
|
| 953 |
+
<port id="2" precision="FP16" names="v_embedding.per_layer_projection_norm.RMSNormalization_39">
|
| 954 |
+
<dim>-1</dim>
|
| 955 |
+
<dim>-1</dim>
|
| 956 |
+
<dim>35</dim>
|
| 957 |
+
<dim>256</dim>
|
| 958 |
+
</port>
|
| 959 |
+
</output>
|
| 960 |
+
</layer>
|
| 961 |
+
<layer id="62" name="embedding.embed_tokens_per_layer.weight" type="Const" version="opset1">
|
| 962 |
+
<data element_type="f16" shape="262144, 8960" offset="813266532" size="4697620480" />
|
| 963 |
+
<output>
|
| 964 |
+
<port id="0" precision="FP16" names="embedding.embed_tokens_per_layer.weight">
|
| 965 |
+
<dim>262144</dim>
|
| 966 |
+
<dim>8960</dim>
|
| 967 |
+
</port>
|
| 968 |
+
</output>
|
| 969 |
+
</layer>
|
| 970 |
+
<layer id="63" name="embedding/Constant_node_10" type="Const" version="opset1">
|
| 971 |
+
<data element_type="i64" shape="" offset="3096" size="8" />
|
| 972 |
+
<output>
|
| 973 |
+
<port id="0" precision="I64" names="v_embedding.Constant_10" />
|
| 974 |
+
</output>
|
| 975 |
+
</layer>
|
| 976 |
+
<layer id="64" name="embedding/Where_node_43" type="Select" version="opset1">
|
| 977 |
+
<data auto_broadcast="numpy" />
|
| 978 |
+
<input>
|
| 979 |
+
<port id="0" precision="BOOL">
|
| 980 |
+
<dim>-1</dim>
|
| 981 |
+
<dim>-1</dim>
|
| 982 |
+
</port>
|
| 983 |
+
<port id="1" precision="I64" />
|
| 984 |
+
<port id="2" precision="I64">
|
| 985 |
+
<dim>-1</dim>
|
| 986 |
+
<dim>-1</dim>
|
| 987 |
+
</port>
|
| 988 |
+
</input>
|
| 989 |
+
<output>
|
| 990 |
+
<port id="3" precision="I64" names="v_embedding.Where_43">
|
| 991 |
+
<dim>-1</dim>
|
| 992 |
+
<dim>-1</dim>
|
| 993 |
+
</port>
|
| 994 |
+
</output>
|
| 995 |
+
</layer>
|
| 996 |
+
<layer id="65" name="Constant_2707" type="Const" version="opset1">
|
| 997 |
+
<data element_type="i64" shape="1, 1" offset="0" size="8" />
|
| 998 |
+
<output>
|
| 999 |
+
<port id="0" precision="I64">
|
| 1000 |
+
<dim>1</dim>
|
| 1001 |
+
<dim>1</dim>
|
| 1002 |
+
</port>
|
| 1003 |
+
</output>
|
| 1004 |
+
</layer>
|
| 1005 |
+
<layer id="66" name="embedding/Equal_node_45" type="Equal" version="opset1">
|
| 1006 |
+
<data auto_broadcast="numpy" />
|
| 1007 |
+
<input>
|
| 1008 |
+
<port id="0" precision="I64">
|
| 1009 |
+
<dim>-1</dim>
|
| 1010 |
+
<dim>-1</dim>
|
| 1011 |
+
</port>
|
| 1012 |
+
<port id="1" precision="I64">
|
| 1013 |
+
<dim>1</dim>
|
| 1014 |
+
<dim>1</dim>
|
| 1015 |
+
</port>
|
| 1016 |
+
</input>
|
| 1017 |
+
<output>
|
| 1018 |
+
<port id="2" precision="BOOL" names="v_embedding.Equal_45">
|
| 1019 |
+
<dim>-1</dim>
|
| 1020 |
+
<dim>-1</dim>
|
| 1021 |
+
</port>
|
| 1022 |
+
</output>
|
| 1023 |
+
</layer>
|
| 1024 |
+
<layer id="67" name="embedding/Where_node_46" type="Select" version="opset1">
|
| 1025 |
+
<data auto_broadcast="numpy" />
|
| 1026 |
+
<input>
|
| 1027 |
+
<port id="0" precision="BOOL">
|
| 1028 |
+
<dim>-1</dim>
|
| 1029 |
+
<dim>-1</dim>
|
| 1030 |
+
</port>
|
| 1031 |
+
<port id="1" precision="I64" />
|
| 1032 |
+
<port id="2" precision="I64">
|
| 1033 |
+
<dim>-1</dim>
|
| 1034 |
+
<dim>-1</dim>
|
| 1035 |
+
</port>
|
| 1036 |
+
</input>
|
| 1037 |
+
<output>
|
| 1038 |
+
<port id="3" precision="I64" names="v_embedding.Where_46">
|
| 1039 |
+
<dim>-1</dim>
|
| 1040 |
+
<dim>-1</dim>
|
| 1041 |
+
</port>
|
| 1042 |
+
</output>
|
| 1043 |
+
</layer>
|
| 1044 |
+
<layer id="68" name="Constant_44" type="Const" version="opset1">
|
| 1045 |
+
<data element_type="i64" shape="" offset="3096" size="8" />
|
| 1046 |
+
<output>
|
| 1047 |
+
<port id="0" precision="I64" />
|
| 1048 |
+
</output>
|
| 1049 |
+
</layer>
|
| 1050 |
+
<layer id="69" name="embedding/embed_tokens_per_layer/Gather_node_47" type="Gather" version="opset8">
|
| 1051 |
+
<data batch_dims="0" />
|
| 1052 |
+
<input>
|
| 1053 |
+
<port id="0" precision="FP16">
|
| 1054 |
+
<dim>262144</dim>
|
| 1055 |
+
<dim>8960</dim>
|
| 1056 |
+
</port>
|
| 1057 |
+
<port id="1" precision="I64">
|
| 1058 |
+
<dim>-1</dim>
|
| 1059 |
+
<dim>-1</dim>
|
| 1060 |
+
</port>
|
| 1061 |
+
<port id="2" precision="I64" />
|
| 1062 |
+
</input>
|
| 1063 |
+
<output>
|
| 1064 |
+
<port id="3" precision="FP16" names="v_embedding.embed_tokens_per_layer.Gather_47">
|
| 1065 |
+
<dim>-1</dim>
|
| 1066 |
+
<dim>-1</dim>
|
| 1067 |
+
<dim>8960</dim>
|
| 1068 |
+
</port>
|
| 1069 |
+
</output>
|
| 1070 |
+
</layer>
|
| 1071 |
+
<layer id="70" name="Constant_2708" type="Const" version="opset1">
|
| 1072 |
+
<data element_type="f16" shape="1, 1, 1" offset="5510887012" size="2" />
|
| 1073 |
+
<output>
|
| 1074 |
+
<port id="0" precision="FP16">
|
| 1075 |
+
<dim>1</dim>
|
| 1076 |
+
<dim>1</dim>
|
| 1077 |
+
<dim>1</dim>
|
| 1078 |
+
</port>
|
| 1079 |
+
</output>
|
| 1080 |
+
</layer>
|
| 1081 |
+
<layer id="71" name="embedding/embed_tokens_per_layer/Mul_node_48" type="Multiply" version="opset1">
|
| 1082 |
+
<data auto_broadcast="numpy" />
|
| 1083 |
+
<input>
|
| 1084 |
+
<port id="0" precision="FP16">
|
| 1085 |
+
<dim>-1</dim>
|
| 1086 |
+
<dim>-1</dim>
|
| 1087 |
+
<dim>8960</dim>
|
| 1088 |
+
</port>
|
| 1089 |
+
<port id="1" precision="FP16">
|
| 1090 |
+
<dim>1</dim>
|
| 1091 |
+
<dim>1</dim>
|
| 1092 |
+
<dim>1</dim>
|
| 1093 |
+
</port>
|
| 1094 |
+
</input>
|
| 1095 |
+
<output>
|
| 1096 |
+
<port id="2" precision="FP16" names="v_embedding.embed_tokens_per_layer.Mul_48">
|
| 1097 |
+
<dim>-1</dim>
|
| 1098 |
+
<dim>-1</dim>
|
| 1099 |
+
<dim>8960</dim>
|
| 1100 |
+
</port>
|
| 1101 |
+
</output>
|
| 1102 |
+
</layer>
|
| 1103 |
+
<layer id="72" name="embedding/Reshape_node_50" type="Reshape" version="opset1">
|
| 1104 |
+
<data special_zero="true" />
|
| 1105 |
+
<input>
|
| 1106 |
+
<port id="0" precision="FP16">
|
| 1107 |
+
<dim>-1</dim>
|
| 1108 |
+
<dim>-1</dim>
|
| 1109 |
+
<dim>8960</dim>
|
| 1110 |
+
</port>
|
| 1111 |
+
<port id="1" precision="I64">
|
| 1112 |
+
<dim>4</dim>
|
| 1113 |
+
</port>
|
| 1114 |
+
</input>
|
| 1115 |
+
<output>
|
| 1116 |
+
<port id="2" precision="FP16" names="v_embedding.Reshape_50">
|
| 1117 |
+
<dim>-1</dim>
|
| 1118 |
+
<dim>-1</dim>
|
| 1119 |
+
<dim>35</dim>
|
| 1120 |
+
<dim>256</dim>
|
| 1121 |
+
</port>
|
| 1122 |
+
</output>
|
| 1123 |
+
</layer>
|
| 1124 |
+
<layer id="73" name="embedding/Add_node_51" type="Add" version="opset1">
|
| 1125 |
+
<data auto_broadcast="numpy" />
|
| 1126 |
+
<input>
|
| 1127 |
+
<port id="0" precision="FP16">
|
| 1128 |
+
<dim>-1</dim>
|
| 1129 |
+
<dim>-1</dim>
|
| 1130 |
+
<dim>35</dim>
|
| 1131 |
+
<dim>256</dim>
|
| 1132 |
+
</port>
|
| 1133 |
+
<port id="1" precision="FP16">
|
| 1134 |
+
<dim>-1</dim>
|
| 1135 |
+
<dim>-1</dim>
|
| 1136 |
+
<dim>35</dim>
|
| 1137 |
+
<dim>256</dim>
|
| 1138 |
+
</port>
|
| 1139 |
+
</input>
|
| 1140 |
+
<output>
|
| 1141 |
+
<port id="2" precision="FP16" names="v_embedding.Add_51">
|
| 1142 |
+
<dim>-1</dim>
|
| 1143 |
+
<dim>-1</dim>
|
| 1144 |
+
<dim>35</dim>
|
| 1145 |
+
<dim>256</dim>
|
| 1146 |
+
</port>
|
| 1147 |
+
</output>
|
| 1148 |
+
</layer>
|
| 1149 |
+
<layer id="74" name="Constant_2709" type="Const" version="opset1">
|
| 1150 |
+
<data element_type="f16" shape="1, 1, 1, 1" offset="5510887014" size="2" />
|
| 1151 |
+
<output>
|
| 1152 |
+
<port id="0" precision="FP16">
|
| 1153 |
+
<dim>1</dim>
|
| 1154 |
+
<dim>1</dim>
|
| 1155 |
+
<dim>1</dim>
|
| 1156 |
+
<dim>1</dim>
|
| 1157 |
+
</port>
|
| 1158 |
+
</output>
|
| 1159 |
+
</layer>
|
| 1160 |
+
<layer id="75" name="embedding/Mul_node_52" type="Multiply" version="opset1">
|
| 1161 |
+
<data auto_broadcast="numpy" />
|
| 1162 |
+
<input>
|
| 1163 |
+
<port id="0" precision="FP16">
|
| 1164 |
+
<dim>-1</dim>
|
| 1165 |
+
<dim>-1</dim>
|
| 1166 |
+
<dim>35</dim>
|
| 1167 |
+
<dim>256</dim>
|
| 1168 |
+
</port>
|
| 1169 |
+
<port id="1" precision="FP16">
|
| 1170 |
+
<dim>1</dim>
|
| 1171 |
+
<dim>1</dim>
|
| 1172 |
+
<dim>1</dim>
|
| 1173 |
+
<dim>1</dim>
|
| 1174 |
+
</port>
|
| 1175 |
+
</input>
|
| 1176 |
+
<output>
|
| 1177 |
+
<port id="2" precision="FP16" names="v_embedding.Mul_52">
|
| 1178 |
+
<dim>-1</dim>
|
| 1179 |
+
<dim>-1</dim>
|
| 1180 |
+
<dim>35</dim>
|
| 1181 |
+
<dim>256</dim>
|
| 1182 |
+
</port>
|
| 1183 |
+
</output>
|
| 1184 |
+
</layer>
|
| 1185 |
+
<layer id="76" name="embedding/Constant_node_53" type="Const" version="opset1">
|
| 1186 |
+
<data element_type="i64" shape="3" offset="5510887016" size="24" />
|
| 1187 |
+
<output>
|
| 1188 |
+
<port id="0" precision="I64" names="v_embedding.Constant_53">
|
| 1189 |
+
<dim>3</dim>
|
| 1190 |
+
</port>
|
| 1191 |
+
</output>
|
| 1192 |
+
</layer>
|
| 1193 |
+
<layer id="77" name="per_layer_inputs" type="Reshape" version="opset1">
|
| 1194 |
+
<data special_zero="true" />
|
| 1195 |
+
<input>
|
| 1196 |
+
<port id="0" precision="FP16">
|
| 1197 |
+
<dim>-1</dim>
|
| 1198 |
+
<dim>-1</dim>
|
| 1199 |
+
<dim>35</dim>
|
| 1200 |
+
<dim>256</dim>
|
| 1201 |
+
</port>
|
| 1202 |
+
<port id="1" precision="I64">
|
| 1203 |
+
<dim>3</dim>
|
| 1204 |
+
</port>
|
| 1205 |
+
</input>
|
| 1206 |
+
<output>
|
| 1207 |
+
<port id="2" precision="FP16" names="per_layer_inputs">
|
| 1208 |
+
<dim>-1</dim>
|
| 1209 |
+
<dim>-1</dim>
|
| 1210 |
+
<dim>8960</dim>
|
| 1211 |
+
</port>
|
| 1212 |
+
</output>
|
| 1213 |
+
</layer>
|
| 1214 |
+
<layer id="78" name="inputs_embeds/sink_port_0" type="Result" version="opset1" output_names="inputs_embeds">
|
| 1215 |
+
<input>
|
| 1216 |
+
<port id="0" precision="FP16">
|
| 1217 |
+
<dim>-1</dim>
|
| 1218 |
+
<dim>-1</dim>
|
| 1219 |
+
<dim>1536</dim>
|
| 1220 |
+
</port>
|
| 1221 |
+
</input>
|
| 1222 |
+
</layer>
|
| 1223 |
+
<layer id="79" name="per_layer_inputs/sink_port_0" type="Result" version="opset1" output_names="per_layer_inputs">
|
| 1224 |
+
<input>
|
| 1225 |
+
<port id="0" precision="FP16">
|
| 1226 |
+
<dim>-1</dim>
|
| 1227 |
+
<dim>-1</dim>
|
| 1228 |
+
<dim>8960</dim>
|
| 1229 |
+
</port>
|
| 1230 |
+
</input>
|
| 1231 |
+
</layer>
|
| 1232 |
+
</layers>
|
| 1233 |
+
<edges>
|
| 1234 |
+
<edge from-layer="0" from-port="0" to-layer="31" to-port="1" />
|
| 1235 |
+
<edge from-layer="0" from-port="0" to-layer="4" to-port="0" />
|
| 1236 |
+
<edge from-layer="0" from-port="0" to-layer="64" to-port="2" />
|
| 1237 |
+
<edge from-layer="0" from-port="0" to-layer="18" to-port="0" />
|
| 1238 |
+
<edge from-layer="1" from-port="0" to-layer="21" to-port="0" />
|
| 1239 |
+
<edge from-layer="2" from-port="0" to-layer="8" to-port="0" />
|
| 1240 |
+
<edge from-layer="3" from-port="0" to-layer="4" to-port="1" />
|
| 1241 |
+
<edge from-layer="4" from-port="2" to-layer="6" to-port="0" />
|
| 1242 |
+
<edge from-layer="4" from-port="2" to-layer="9" to-port="0" />
|
| 1243 |
+
<edge from-layer="5" from-port="0" to-layer="6" to-port="1" />
|
| 1244 |
+
<edge from-layer="5" from-port="0" to-layer="19" to-port="1" />
|
| 1245 |
+
<edge from-layer="6" from-port="2" to-layer="35" to-port="0" />
|
| 1246 |
+
<edge from-layer="7" from-port="0" to-layer="8" to-port="1" />
|
| 1247 |
+
<edge from-layer="8" from-port="2" to-layer="16" to-port="0" />
|
| 1248 |
+
<edge from-layer="9" from-port="1" to-layer="11" to-port="0" />
|
| 1249 |
+
<edge from-layer="10" from-port="0" to-layer="23" to-port="1" />
|
| 1250 |
+
<edge from-layer="10" from-port="0" to-layer="11" to-port="1" />
|
| 1251 |
+
<edge from-layer="11" from-port="2" to-layer="13" to-port="0" />
|
| 1252 |
+
<edge from-layer="12" from-port="0" to-layer="13" to-port="1" />
|
| 1253 |
+
<edge from-layer="13" from-port="2" to-layer="14" to-port="0" />
|
| 1254 |
+
<edge from-layer="14" from-port="1" to-layer="16" to-port="1" />
|
| 1255 |
+
<edge from-layer="15" from-port="0" to-layer="16" to-port="2" />
|
| 1256 |
+
<edge from-layer="16" from-port="3" to-layer="35" to-port="1" />
|
| 1257 |
+
<edge from-layer="17" from-port="0" to-layer="18" to-port="1" />
|
| 1258 |
+
<edge from-layer="18" from-port="2" to-layer="64" to-port="0" />
|
| 1259 |
+
<edge from-layer="18" from-port="2" to-layer="19" to-port="0" />
|
| 1260 |
+
<edge from-layer="18" from-port="2" to-layer="22" to-port="0" />
|
| 1261 |
+
<edge from-layer="19" from-port="2" to-layer="34" to-port="0" />
|
| 1262 |
+
<edge from-layer="20" from-port="0" to-layer="21" to-port="1" />
|
| 1263 |
+
<edge from-layer="21" from-port="2" to-layer="28" to-port="0" />
|
| 1264 |
+
<edge from-layer="22" from-port="1" to-layer="23" to-port="0" />
|
| 1265 |
+
<edge from-layer="23" from-port="2" to-layer="25" to-port="0" />
|
| 1266 |
+
<edge from-layer="24" from-port="0" to-layer="25" to-port="1" />
|
| 1267 |
+
<edge from-layer="25" from-port="2" to-layer="26" to-port="0" />
|
| 1268 |
+
<edge from-layer="26" from-port="1" to-layer="28" to-port="1" />
|
| 1269 |
+
<edge from-layer="27" from-port="0" to-layer="28" to-port="2" />
|
| 1270 |
+
<edge from-layer="28" from-port="3" to-layer="34" to-port="1" />
|
| 1271 |
+
<edge from-layer="29" from-port="0" to-layer="31" to-port="0" />
|
| 1272 |
+
<edge from-layer="30" from-port="0" to-layer="31" to-port="2" />
|
| 1273 |
+
<edge from-layer="31" from-port="3" to-layer="33" to-port="0" />
|
| 1274 |
+
<edge from-layer="32" from-port="0" to-layer="33" to-port="1" />
|
| 1275 |
+
<edge from-layer="33" from-port="2" to-layer="34" to-port="2" />
|
| 1276 |
+
<edge from-layer="34" from-port="3" to-layer="35" to-port="2" />
|
| 1277 |
+
<edge from-layer="35" from-port="3" to-layer="45" to-port="0" />
|
| 1278 |
+
<edge from-layer="35" from-port="3" to-layer="78" to-port="0" />
|
| 1279 |
+
<edge from-layer="36" from-port="0" to-layer="37" to-port="0" />
|
| 1280 |
+
<edge from-layer="37" from-port="1" to-layer="40" to-port="0" />
|
| 1281 |
+
<edge from-layer="38" from-port="0" to-layer="39" to-port="0" />
|
| 1282 |
+
<edge from-layer="39" from-port="1" to-layer="40" to-port="1" />
|
| 1283 |
+
<edge from-layer="40" from-port="2" to-layer="42" to-port="0" />
|
| 1284 |
+
<edge from-layer="41" from-port="0" to-layer="42" to-port="1" />
|
| 1285 |
+
<edge from-layer="42" from-port="2" to-layer="44" to-port="0" />
|
| 1286 |
+
<edge from-layer="43" from-port="0" to-layer="44" to-port="1" />
|
| 1287 |
+
<edge from-layer="44" from-port="2" to-layer="45" to-port="1" />
|
| 1288 |
+
<edge from-layer="45" from-port="2" to-layer="47" to-port="0" />
|
| 1289 |
+
<edge from-layer="46" from-port="0" to-layer="47" to-port="1" />
|
| 1290 |
+
<edge from-layer="47" from-port="2" to-layer="49" to-port="0" />
|
| 1291 |
+
<edge from-layer="48" from-port="0" to-layer="72" to-port="1" />
|
| 1292 |
+
<edge from-layer="48" from-port="0" to-layer="49" to-port="1" />
|
| 1293 |
+
<edge from-layer="49" from-port="2" to-layer="50" to-port="0" />
|
| 1294 |
+
<edge from-layer="49" from-port="2" to-layer="59" to-port="1" />
|
| 1295 |
+
<edge from-layer="50" from-port="1" to-layer="52" to-port="0" />
|
| 1296 |
+
<edge from-layer="50" from-port="1" to-layer="58" to-port="0" />
|
| 1297 |
+
<edge from-layer="51" from-port="0" to-layer="52" to-port="1" />
|
| 1298 |
+
<edge from-layer="52" from-port="2" to-layer="54" to-port="0" />
|
| 1299 |
+
<edge from-layer="53" from-port="0" to-layer="54" to-port="1" />
|
| 1300 |
+
<edge from-layer="54" from-port="2" to-layer="56" to-port="0" />
|
| 1301 |
+
<edge from-layer="55" from-port="0" to-layer="56" to-port="1" />
|
| 1302 |
+
<edge from-layer="56" from-port="2" to-layer="57" to-port="0" />
|
| 1303 |
+
<edge from-layer="57" from-port="1" to-layer="58" to-port="1" />
|
| 1304 |
+
<edge from-layer="58" from-port="2" to-layer="59" to-port="0" />
|
| 1305 |
+
<edge from-layer="59" from-port="2" to-layer="61" to-port="0" />
|
| 1306 |
+
<edge from-layer="60" from-port="0" to-layer="61" to-port="1" />
|
| 1307 |
+
<edge from-layer="61" from-port="2" to-layer="73" to-port="0" />
|
| 1308 |
+
<edge from-layer="62" from-port="0" to-layer="69" to-port="0" />
|
| 1309 |
+
<edge from-layer="63" from-port="0" to-layer="64" to-port="1" />
|
| 1310 |
+
<edge from-layer="63" from-port="0" to-layer="67" to-port="1" />
|
| 1311 |
+
<edge from-layer="64" from-port="3" to-layer="66" to-port="0" />
|
| 1312 |
+
<edge from-layer="64" from-port="3" to-layer="67" to-port="2" />
|
| 1313 |
+
<edge from-layer="65" from-port="0" to-layer="66" to-port="1" />
|
| 1314 |
+
<edge from-layer="66" from-port="2" to-layer="67" to-port="0" />
|
| 1315 |
+
<edge from-layer="67" from-port="3" to-layer="69" to-port="1" />
|
| 1316 |
+
<edge from-layer="68" from-port="0" to-layer="69" to-port="2" />
|
| 1317 |
+
<edge from-layer="69" from-port="3" to-layer="71" to-port="0" />
|
| 1318 |
+
<edge from-layer="70" from-port="0" to-layer="71" to-port="1" />
|
| 1319 |
+
<edge from-layer="71" from-port="2" to-layer="72" to-port="0" />
|
| 1320 |
+
<edge from-layer="72" from-port="2" to-layer="73" to-port="1" />
|
| 1321 |
+
<edge from-layer="73" from-port="2" to-layer="75" to-port="0" />
|
| 1322 |
+
<edge from-layer="74" from-port="0" to-layer="75" to-port="1" />
|
| 1323 |
+
<edge from-layer="75" from-port="2" to-layer="77" to-port="0" />
|
| 1324 |
+
<edge from-layer="76" from-port="0" to-layer="77" to-port="1" />
|
| 1325 |
+
<edge from-layer="77" from-port="2" to-layer="79" to-port="0" />
|
| 1326 |
+
</edges>
|
| 1327 |
+
<rt_info>
|
| 1328 |
+
<info name="OpenVINO Runtime" value="2026.3.0-1-a04834c6ca3" />
|
| 1329 |
+
<Runtime_version value="2026.3.0-1-a04834c6ca3" />
|
| 1330 |
+
<conversion_parameters>
|
| 1331 |
+
<input_model value="DIR/model.onnx" />
|
| 1332 |
+
<is_python_object value="False" />
|
| 1333 |
+
</conversion_parameters>
|
| 1334 |
+
<framework>
|
| 1335 |
+
<olive_version value="0.11.0.dev0" />
|
| 1336 |
+
</framework>
|
| 1337 |
+
</rt_info>
|
| 1338 |
+
</net>
|
openvino-epcontext/genai_config.json
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model": {
|
| 3 |
+
"type": "gemma4",
|
| 4 |
+
"vocab_size": 262144,
|
| 5 |
+
"context_length": 131072,
|
| 6 |
+
"decoder": {
|
| 7 |
+
"session_options": {
|
| 8 |
+
"log_id": "onnxruntime-genai",
|
| 9 |
+
"provider_options": [
|
| 10 |
+
{
|
| 11 |
+
"OpenVINO": {
|
| 12 |
+
"device_type": "NPU"
|
| 13 |
+
}
|
| 14 |
+
}
|
| 15 |
+
]
|
| 16 |
+
},
|
| 17 |
+
"filename": "decoder/model.onnx",
|
| 18 |
+
"head_size": 256,
|
| 19 |
+
"hidden_size": 1536,
|
| 20 |
+
"inputs": {
|
| 21 |
+
"inputs_embeds": "inputs_embeds",
|
| 22 |
+
"attention_mask": "attention_mask",
|
| 23 |
+
"position_ids": "position_ids",
|
| 24 |
+
"per_layer_inputs": "per_layer_inputs",
|
| 25 |
+
"past_key_names": "past_key_values.%d.key",
|
| 26 |
+
"past_value_names": "past_key_values.%d.value"
|
| 27 |
+
},
|
| 28 |
+
"outputs": {
|
| 29 |
+
"logits": "logits",
|
| 30 |
+
"present_key_names": "present.%d.key",
|
| 31 |
+
"present_value_names": "present.%d.value"
|
| 32 |
+
},
|
| 33 |
+
"num_attention_heads": 8,
|
| 34 |
+
"num_hidden_layers": 35,
|
| 35 |
+
"num_key_value_heads": 1
|
| 36 |
+
},
|
| 37 |
+
"bos_token_id": 2,
|
| 38 |
+
"eos_token_id": [
|
| 39 |
+
1,
|
| 40 |
+
106
|
| 41 |
+
],
|
| 42 |
+
"pad_token_id": 0,
|
| 43 |
+
"vision": {
|
| 44 |
+
"filename": "vision_encoder/model.onnx",
|
| 45 |
+
"config_filename": "image_processor.json",
|
| 46 |
+
"inputs": {
|
| 47 |
+
"pixel_values": "pixel_values",
|
| 48 |
+
"pixel_position_ids": "pixel_position_ids"
|
| 49 |
+
},
|
| 50 |
+
"outputs": {
|
| 51 |
+
"image_features": "image_features"
|
| 52 |
+
},
|
| 53 |
+
"session_options": {
|
| 54 |
+
"log_id": "onnxruntime-genai",
|
| 55 |
+
"provider_options": [
|
| 56 |
+
{
|
| 57 |
+
"OpenVINO": {
|
| 58 |
+
"device_type": "NPU"
|
| 59 |
+
}
|
| 60 |
+
}
|
| 61 |
+
]
|
| 62 |
+
},
|
| 63 |
+
"spatial_merge_size": 2
|
| 64 |
+
},
|
| 65 |
+
"embedding": {
|
| 66 |
+
"filename": "embedding/model.onnx",
|
| 67 |
+
"inputs": {
|
| 68 |
+
"input_ids": "input_ids",
|
| 69 |
+
"image_features": "image_features",
|
| 70 |
+
"audio_features": "audio_features"
|
| 71 |
+
},
|
| 72 |
+
"outputs": {
|
| 73 |
+
"inputs_embeds": "inputs_embeds",
|
| 74 |
+
"per_layer_inputs": "per_layer_inputs"
|
| 75 |
+
},
|
| 76 |
+
"session_options": {
|
| 77 |
+
"log_id": "onnxruntime-genai",
|
| 78 |
+
"provider_options": [
|
| 79 |
+
{
|
| 80 |
+
"OpenVINO": {
|
| 81 |
+
"device_type": "NPU"
|
| 82 |
+
}
|
| 83 |
+
}
|
| 84 |
+
]
|
| 85 |
+
}
|
| 86 |
+
},
|
| 87 |
+
"speech": {
|
| 88 |
+
"filename": "audio_encoder/model.onnx",
|
| 89 |
+
"config_filename": "audio_feature_extraction.json",
|
| 90 |
+
"inputs": {
|
| 91 |
+
"audio_embeds": "input_features",
|
| 92 |
+
"attention_mask": "input_features_mask"
|
| 93 |
+
},
|
| 94 |
+
"outputs": {
|
| 95 |
+
"audio_features": "audio_features"
|
| 96 |
+
},
|
| 97 |
+
"session_options": {
|
| 98 |
+
"log_id": "onnxruntime-genai",
|
| 99 |
+
"provider_options": [
|
| 100 |
+
{
|
| 101 |
+
"OpenVINO": {
|
| 102 |
+
"device_type": "NPU"
|
| 103 |
+
}
|
| 104 |
+
}
|
| 105 |
+
]
|
| 106 |
+
}
|
| 107 |
+
},
|
| 108 |
+
"image_token_id": 258880,
|
| 109 |
+
"audio_token_id": 258881,
|
| 110 |
+
"boa_token_id": 256000
|
| 111 |
+
},
|
| 112 |
+
"search": {
|
| 113 |
+
"do_sample": true,
|
| 114 |
+
"early_stopping": true,
|
| 115 |
+
"max_length": 131072,
|
| 116 |
+
"min_length": 0,
|
| 117 |
+
"num_beams": 1,
|
| 118 |
+
"num_return_sequences": 1,
|
| 119 |
+
"past_present_share_buffer": false,
|
| 120 |
+
"repetition_penalty": 1.0,
|
| 121 |
+
"temperature": 1.0,
|
| 122 |
+
"top_k": 1,
|
| 123 |
+
"top_p": 1.0
|
| 124 |
+
}
|
| 125 |
+
}
|
openvino-epcontext/image_processor.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"processor": {
|
| 3 |
+
"name": "gemma_4_image_processing",
|
| 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": "gemma4_image_transform",
|
| 17 |
+
"type": "Gemma4ImageTransform",
|
| 18 |
+
"attrs": {
|
| 19 |
+
"patch_size": 16,
|
| 20 |
+
"max_soft_tokens": 280,
|
| 21 |
+
"pooling_kernel_size": 3
|
| 22 |
+
}
|
| 23 |
+
}
|
| 24 |
+
}
|
| 25 |
+
]
|
| 26 |
+
}
|
| 27 |
+
}
|
openvino-epcontext/tokenizer.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cc8d3a0ce36466ccc1278bf987df5f71db1719b9ca6b4118264f45cb627bfe0f
|
| 3 |
+
size 32169626
|
openvino-epcontext/tokenizer_config.json
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"audio_token": "<|audio|>",
|
| 3 |
+
"backend": "tokenizers",
|
| 4 |
+
"boa_token": "<|audio>",
|
| 5 |
+
"boi_token": "<|image>",
|
| 6 |
+
"bos_token": "<bos>",
|
| 7 |
+
"eoa_token": "<audio|>",
|
| 8 |
+
"eoc_token": "<channel|>",
|
| 9 |
+
"eoi_token": "<image|>",
|
| 10 |
+
"eos_token": "<eos>",
|
| 11 |
+
"eot_token": "<turn|>",
|
| 12 |
+
"escape_token": "<|\"|>",
|
| 13 |
+
"etc_token": "<tool_call|>",
|
| 14 |
+
"etd_token": "<tool|>",
|
| 15 |
+
"etr_token": "<tool_response|>",
|
| 16 |
+
"extra_special_tokens": [
|
| 17 |
+
"<|video|>"
|
| 18 |
+
],
|
| 19 |
+
"image_token": "<|image|>",
|
| 20 |
+
"mask_token": "<mask>",
|
| 21 |
+
"model_max_length": 1000000000000000019884624838656,
|
| 22 |
+
"pad_token": "<pad>",
|
| 23 |
+
"padding_side": "left",
|
| 24 |
+
"processor_class": "Gemma4Processor",
|
| 25 |
+
"response_schema": {
|
| 26 |
+
"type": "object",
|
| 27 |
+
"properties": {
|
| 28 |
+
"role": {
|
| 29 |
+
"const": "assistant"
|
| 30 |
+
},
|
| 31 |
+
"thinking": {
|
| 32 |
+
"type": "string"
|
| 33 |
+
},
|
| 34 |
+
"content": {
|
| 35 |
+
"type": "string"
|
| 36 |
+
},
|
| 37 |
+
"tool_calls": {
|
| 38 |
+
"x-regex-iterator": "<\\|tool_call>(.*?)<tool_call\\|>",
|
| 39 |
+
"type": "array",
|
| 40 |
+
"items": {
|
| 41 |
+
"type": "object",
|
| 42 |
+
"properties": {
|
| 43 |
+
"type": {
|
| 44 |
+
"const": "function"
|
| 45 |
+
},
|
| 46 |
+
"function": {
|
| 47 |
+
"type": "object",
|
| 48 |
+
"x-regex": "call\\:(?P<name>\\w+)(?P<arguments>\\{.*\\})",
|
| 49 |
+
"properties": {
|
| 50 |
+
"name": {
|
| 51 |
+
"type": "string"
|
| 52 |
+
},
|
| 53 |
+
"arguments": {
|
| 54 |
+
"type": "object",
|
| 55 |
+
"x-parser": "gemma4-tool-call",
|
| 56 |
+
"additionalProperties": {}
|
| 57 |
+
}
|
| 58 |
+
}
|
| 59 |
+
}
|
| 60 |
+
}
|
| 61 |
+
}
|
| 62 |
+
}
|
| 63 |
+
},
|
| 64 |
+
"x-regex": "(\\<\\|channel\\>thought\\n(?P<thinking>.*?)\\<channel\\|\\>)?(?P<tool_calls>\\<\\|tool_call\\>.*\\<tool_call\\|\\>)?(?P<content>(?:(?!\\<turn\\|\\>)(?!\\<\\|tool_response\\>).)+)?(?:\\<turn\\|\\>|\\<\\|tool_response\\>)?"
|
| 65 |
+
},
|
| 66 |
+
"soc_token": "<|channel>",
|
| 67 |
+
"sot_token": "<|turn>",
|
| 68 |
+
"stc_token": "<|tool_call>",
|
| 69 |
+
"std_token": "<|tool>",
|
| 70 |
+
"str_token": "<|tool_response>",
|
| 71 |
+
"think_token": "<|think|>",
|
| 72 |
+
"tokenizer_class": "GemmaTokenizer",
|
| 73 |
+
"unk_token": "<unk>",
|
| 74 |
+
"chat_template": "{%- macro format_parameters(properties, required, filter_keys=false) -%}\n {%- set standard_keys = ['description', 'type', 'properties', 'required', 'nullable'] -%}\n {%- set ns = namespace(found_first=false) -%}\n {%- for key, value in properties | dictsort -%}\n {%- set add_comma = false -%}\n {%- if not filter_keys or key not in standard_keys -%}\n {%- if ns.found_first %},{% endif -%}\n {%- set ns.found_first = true -%}\n {{ key }}:{\n {%- if value['description'] -%}\n description:<|\"|>{{ value['description'] }}<|\"|>\n {%- set add_comma = true -%}\n {%- endif -%}\n {%- if value['type'] | upper == 'STRING' -%}\n {%- if value['enum'] -%}\n {%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}\n enum:{{ format_argument(value['enum']) }}\n {%- endif -%}\n {%- elif value['type'] | upper == 'ARRAY' -%}\n {%- if value['items'] is mapping and value['items'] -%}\n {%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}\n items:{\n {%- set ns_items = namespace(found_first=false) -%}\n {%- for item_key, item_value in value['items'] | dictsort -%}\n {%- if item_value is not none -%}\n {%- if ns_items.found_first %},{% endif -%}\n {%- set ns_items.found_first = true -%}\n {%- if item_key == 'properties' -%}\n properties:{\n {%- if item_value is mapping -%}\n {{- format_parameters(item_value, value['items']['required'] | default([])) -}}\n {%- endif -%}\n }\n {%- elif item_key == 'required' -%}\n required:[\n {%- for req_item in item_value -%}\n <|\"|>{{- req_item -}}<|\"|>\n {%- if not loop.last %},{% endif -%}\n {%- endfor -%}\n ]\n {%- elif item_key == 'type' -%}\n {%- if item_value is string -%}\n type:{{ format_argument(item_value | upper) }}\n {%- else -%}\n type:{{ format_argument(item_value | map('upper') | list) }}\n {%- endif -%}\n {%- else -%}\n {{ item_key }}:{{ format_argument(item_value) }}\n {%- endif -%}\n {%- endif -%}\n {%- endfor -%}\n }\n {%- endif -%}\n {%- endif -%}\n {%- if value['nullable'] %}\n {%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}\n nullable:true\n {%- endif -%}\n {%- if value['type'] | upper == 'OBJECT' -%}\n {%- if value['properties'] is defined and value['properties'] is mapping -%}\n {%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}\n properties:{\n {{- format_parameters(value['properties'], value['required'] | default([])) -}}\n }\n {%- elif value is mapping -%}\n {%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}\n properties:{\n {{- format_parameters(value, value['required'] | default([]), filter_keys=true) -}}\n }\n {%- endif -%}\n {%- if value['required'] -%}\n {%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}\n required:[\n {%- for item in value['required'] | default([]) -%}\n <|\"|>{{- item -}}<|\"|>\n {%- if not loop.last %},{% endif -%}\n {%- endfor -%}\n ]\n {%- endif -%}\n {%- endif -%}\n {%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}\n type:<|\"|>{{ value['type'] | upper }}<|\"|>}\n {%- endif -%}\n {%- endfor -%}\n{%- endmacro -%}\n{%- macro format_function_declaration(tool_data) -%}\n declaration:{{- tool_data['function']['name'] -}}{description:<|\"|>{{- tool_data['function']['description'] -}}<|\"|>\n {%- set params = tool_data['function']['parameters'] -%}\n {%- if params -%}\n ,parameters:{\n {%- if params['properties'] -%}\n properties:{ {{- format_parameters(params['properties'], params['required']) -}} },\n {%- endif -%}\n {%- if params['required'] -%}\n required:[\n {%- for item in params['required'] -%}\n <|\"|>{{- item -}}<|\"|>\n {{- ',' if not loop.last -}}\n {%- endfor -%}\n ],\n {%- endif -%}\n {%- if params['type'] -%}\n type:<|\"|>{{- params['type'] | upper -}}<|\"|>}\n {%- endif -%}\n {%- endif -%}\n {%- if 'response' in tool_data['function'] -%}\n {%- set response_declaration = tool_data['function']['response'] -%}\n ,response:{\n {%- if response_declaration['description'] -%}\n description:<|\"|>{{- response_declaration['description'] -}}<|\"|>,\n {%- endif -%}\n {%- if response_declaration['type'] | upper == 'OBJECT' -%}\n type:<|\"|>{{- response_declaration['type'] | upper -}}<|\"|>}\n {%- endif -%}\n {%- endif -%}\n }\n{%- endmacro -%}\n{%- macro format_argument(argument, escape_keys=True) -%}\n {%- if argument is string -%}\n {{- '<|\"|>' + argument + '<|\"|>' -}}\n {%- elif argument is boolean -%}\n {{- 'true' if argument else 'false' -}}\n {%- elif argument is mapping -%}\n {{- '{' -}}\n {%- set ns = namespace(found_first=false) -%}\n {%- for key, value in argument | dictsort -%}\n {%- if ns.found_first %},{% endif -%}\n {%- set ns.found_first = true -%}\n {%- if escape_keys -%}\n {{- '<|\"|>' + key + '<|\"|>' -}}\n {%- else -%}\n {{- key -}}\n {%- endif -%}\n :{{- format_argument(value, escape_keys=escape_keys) -}}\n {%- endfor -%}\n {{- '}' -}}\n {%- elif argument is sequence -%}\n {{- '[' -}}\n {%- for item in argument -%}\n {{- format_argument(item, escape_keys=escape_keys) -}}\n {%- if not loop.last %},{% endif -%}\n {%- endfor -%}\n {{- ']' -}}\n {%- else -%}\n {{- argument -}}\n {%- endif -%}\n{%- endmacro -%}\n{%- macro strip_thinking(text) -%}\n {%- set ns = namespace(result='') -%}\n {%- for part in text.split('<channel|>') -%}\n {%- if '<|channel>' in part -%}\n {%- set ns.result = ns.result + part.split('<|channel>')[0] -%}\n {%- else -%}\n {%- set ns.result = ns.result + part -%}\n {%- endif -%}\n {%- endfor -%}\n {{- ns.result | trim -}}\n{%- endmacro -%}\n\n{%- macro format_tool_response_block(tool_name, response) -%}\n {{- '<|tool_response>' -}}\n {%- if response is mapping -%}\n {{- 'response:' + tool_name + '{' -}}\n {%- for key, value in response | dictsort -%}\n {{- key -}}:{{- format_argument(value, escape_keys=False) -}}\n {%- if not loop.last %},{% endif -%}\n {%- endfor -%}\n {{- '}' -}}\n {%- else -%}\n {{- 'response:' + tool_name + '{value:' + format_argument(response, escape_keys=False) + '}' -}}\n {%- endif -%}\n {{- '<tool_response|>' -}}\n{%- endmacro -%}\n\n{%- set ns = namespace(prev_message_type=None) -%}\n{%- set loop_messages = messages -%}\n{{- bos_token -}}\n{#- Handle System/Tool Definitions Block -#}\n{%- if (enable_thinking is defined and enable_thinking) or tools or messages[0]['role'] in ['system', 'developer'] -%}\n {{- '<|turn>system\\n' -}}\n {#- Inject Thinking token at the very top of the FIRST system turn -#}\n {%- if enable_thinking is defined and enable_thinking -%}\n {{- '<|think|>\\n' -}}\n {%- set ns.prev_message_type = 'think' -%}\n {%- endif -%}\n {%- if messages[0]['role'] in ['system', 'developer'] -%}\n {%- if messages[0]['content'] is string -%}\n {{- messages[0]['content'] | trim -}}\n {%- elif messages[0]['content'] is sequence -%}\n {%- for item in messages[0]['content'] -%}\n {{- item['text'] | trim + ' '-}}\n {%- endfor -%}\n {%- endif -%}\n {%- set loop_messages = messages[1:] -%}\n {%- endif -%}\n {%- if tools -%}\n {%- for tool in tools %}\n {{- '<|tool>' -}}\n {{- format_function_declaration(tool) | trim -}}\n {{- '<tool|>' -}}\n {%- endfor %}\n {%- set ns.prev_message_type = 'tool' -%}\n {%- endif -%}\n {{- '<turn|>\\n' -}}\n{%- endif %}\n\n{#- Pre-scan: find last user message index for reasoning guard -#}\n{%- set ns_turn = namespace(last_user_idx=-1) -%}\n{%- for i in range(loop_messages | length) -%}\n {%- if loop_messages[i]['role'] == 'user' -%}\n {%- set ns_turn.last_user_idx = i -%}\n {%- endif -%}\n{%- endfor -%}\n\n{#- Loop through messages -#}\n{%- for message in loop_messages -%}\n {%- if message['role'] != 'tool' -%}\n {%- set ns.prev_message_type = None -%}\n {%- set role = 'model' if message['role'] == 'assistant' else message['role'] -%}\n {#- Detect continuation: suppress duplicate <|turn>model when previous non-tool message was also assistant -#}\n {%- set prev_nt = namespace(role=None, found=false) -%}\n {%- if loop.index0 > 0 -%}\n {%- for j in range(loop.index0 - 1, -1, -1) -%}\n {%- if not prev_nt.found -%}\n {%- if loop_messages[j]['role'] != 'tool' -%}\n {%- set prev_nt.role = loop_messages[j]['role'] -%}\n {%- set prev_nt.found = true -%}\n {%- endif -%}\n {%- endif -%}\n {%- endfor -%}\n {%- endif -%}\n {%- set continue_same_model_turn = (role == 'model' and prev_nt.role == 'assistant') -%}\n {%- if not continue_same_model_turn -%}\n {{- '<|turn>' + role + '\\n' }}\n {%- endif -%}\n\n {#- Render reasoning/reasoning_content as thinking channel -#}\n {%- set thinking_text = message.get('reasoning') or message.get('reasoning_content') -%}\n {%- if thinking_text and loop.index0 > ns_turn.last_user_idx and message.get('tool_calls') -%}\n {{- '<|channel>thought\\n' + thinking_text + '\\n<channel|>' -}}\n {%- endif -%}\n\n {%- if message['tool_calls'] -%}\n {%- for tool_call in message['tool_calls'] -%}\n {%- set function = tool_call['function'] -%}\n {{- '<|tool_call>call:' + function['name'] + '{' -}}\n {%- if function['arguments'] is mapping -%}\n {%- set ns_args = namespace(found_first=false) -%}\n {%- for key, value in function['arguments'] | dictsort -%}\n {%- if ns_args.found_first %},{% endif -%}\n {%- set ns_args.found_first = true -%}\n {{- key -}}:{{- format_argument(value, escape_keys=False) -}}\n {%- endfor -%}\n {%- elif function['arguments'] is string -%}\n {{- function['arguments'] -}}\n {%- endif -%}\n {{- '}<tool_call|>' -}}\n {%- endfor -%}\n {%- set ns.prev_message_type = 'tool_call' -%}\n {%- endif -%}\n\n {%- set ns_tr_out = namespace(flag=false) -%}\n {%- if message.get('tool_responses') -%}\n {#- Legacy: tool_responses embedded on the assistant message (Google/Gemma native) -#}\n {%- for tool_response in message['tool_responses'] -%}\n {{- format_tool_response_block(tool_response['name'] | default('unknown'), tool_response['response']) -}}\n {%- set ns_tr_out.flag = true -%}\n {%- set ns.prev_message_type = 'tool_response' -%}\n {%- endfor -%}\n {%- elif message.get('tool_calls') -%}\n {#- OpenAI Chat Completions: forward-scan consecutive role:tool messages -#}\n {%- set ns_tool_scan = namespace(stopped=false) -%}\n {%- for k in range(loop.index0 + 1, loop_messages | length) -%}\n {%- if ns_tool_scan.stopped -%}\n {%- elif loop_messages[k]['role'] != 'tool' -%}\n {%- set ns_tool_scan.stopped = true -%}\n {%- else -%}\n {%- set follow = loop_messages[k] -%}\n {#- Resolve tool_call_id to function name -#}\n {%- set ns_tname = namespace(name=follow.get('name') | default('unknown')) -%}\n {%- for tc in message['tool_calls'] -%}\n {%- if tc.get('id') == follow.get('tool_call_id') -%}\n {%- set ns_tname.name = tc['function']['name'] -%}\n {%- endif -%}\n {%- endfor -%}\n {#- Handle content as string or content-parts array -#}\n {%- set tool_body = follow.get('content') -%}\n {%- if tool_body is string -%}\n {{- format_tool_response_block(ns_tname.name, tool_body) -}}\n {%- elif tool_body is sequence and tool_body is not string -%}\n {%- set ns_txt = namespace(s='') -%}\n {%- for part in tool_body -%}\n {%- if part.get('type') == 'text' -%}\n {%- set ns_txt.s = ns_txt.s + (part.get('text') | default('')) -%}\n {%- endif -%}\n {%- endfor -%}\n {{- format_tool_response_block(ns_tname.name, ns_txt.s) -}}\n {%- for part in tool_body -%}\n {%- if part.get('type') == 'image' -%}\n {{- '<|image|>' -}}\n {%- elif part.get('type') == 'audio' -%}\n {{- '<|audio|>' -}}\n {%- elif part.get('type') == 'video' -%}\n {{- '<|video|>' -}}\n {%- endif -%}\n {%- endfor -%}\n {%- else -%}\n {{- format_tool_response_block(ns_tname.name, tool_body) -}}\n {%- endif -%}\n {%- set ns_tr_out.flag = true -%}\n {%- set ns.prev_message_type = 'tool_response' -%}\n {%- endif -%}\n {%- endfor -%}\n {%- endif -%}\n\n {%- set captured_content -%}\n {%- if message['content'] is string -%}\n {%- if role == 'model' -%}\n {{- strip_thinking(message['content']) -}}\n {%- else -%}\n {{- message['content'] | trim -}}\n {%- endif -%}\n {%- elif message['content'] is sequence -%}\n {%- for item in message['content'] -%}\n {%- if item['type'] == 'text' -%}\n {%- if role == 'model' -%}\n {{- strip_thinking(item['text']) -}}\n {%- else -%}\n {{- item['text'] | trim -}}\n {%- endif -%}\n {%- elif item['type'] == 'image' -%}\n {{- '<|image|>' -}}\n {%- set ns.prev_message_type = 'image' -%}\n {%- elif item['type'] == 'audio' -%}\n {{- '<|audio|>' -}}\n {%- set ns.prev_message_type = 'audio' -%}\n {%- elif item['type'] == 'video' -%}\n {{- '<|video|>' -}}\n {%- set ns.prev_message_type = 'video' -%}\n {%- endif -%}\n {%- endfor -%}\n {%- endif -%}\n {%- endset -%}\n\n {{- captured_content -}}\n {%- set has_content = captured_content | trim | length > 0 -%}\n\n {%- if ns.prev_message_type == 'tool_call' and not ns_tr_out.flag -%}\n {{- '<|tool_response>' -}}\n {%- elif not (ns_tr_out.flag and not has_content) -%}\n {{- '<turn|>\\n' -}}\n {%- endif -%}\n {%- endif -%}\n{%- endfor -%}\n\n{%- if add_generation_prompt -%}\n {%- if ns.prev_message_type != 'tool_response' and ns.prev_message_type != 'tool_call' -%}\n {{- '<|turn>model\\n' -}}\n {%- endif -%}\n{%- endif -%}"
|
| 75 |
+
}
|
openvino-epcontext/vision_encoder/model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2353615bf90c78d6aa6934b94afcd9009c8344181fb62b03d7aafd6afbca13f4
|
| 3 |
+
size 121186980
|
openvino-epcontext/vision_encoder/model.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2b227f8330ae1d7c29f19cd6453670bf7851475a3a6e79e1789dc221b1eb7538
|
| 3 |
+
size 672
|
openvino-epcontext/vision_encoder/model.xml
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|