justinchuby commited on
Commit
3c8abc1
·
verified ·
1 Parent(s): c253cd1

Delete openvino

Browse files
openvino/npu/audio_encoder/model.onnx DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:c1f04a1267357d9a078c8e587b3ae505af60f4d61c53c40ff18928396cbeeebb
3
- size 1215996
 
 
 
 
openvino/npu/audio_encoder/model.onnx.data DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:e759042c750d6e842db3695f733fef61f3c8ef8decc572420b08203ca60406e8
3
- size 178257920
 
 
 
 
openvino/npu/audio_feature_extraction.json DELETED
@@ -1,30 +0,0 @@
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/npu/chat_template.jinja DELETED
@@ -1,360 +0,0 @@
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/npu/decoder/model.onnx DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:ff888500a66f7f03c5363d1c75e03ac7121ab84fc216b360a7ba4be9e821aa84
3
- size 868846
 
 
 
 
openvino/npu/decoder/model.onnx.data DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:76874cbb917bd2caaf2d5c810138d4cf1fe9630f001ed1131adadcf73bad05a1
3
- size 1511784448
 
 
 
 
openvino/npu/embedding/model.onnx DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:97ba5a119d7fbba575154b50f349ba73d49024a31220b757a3beb8c454b4bd99
3
- size 15214
 
 
 
 
openvino/npu/embedding/model.onnx.data DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:360ff4c2f55b426f0c9f386533067224dc1b9a85459aaf44bebe4f4cad9bb823
3
- size 5510922240
 
 
 
 
openvino/npu/genai_config.json DELETED
@@ -1,125 +0,0 @@
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/npu/image_processor.json DELETED
@@ -1,27 +0,0 @@
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/npu/tokenizer.json DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:cc8d3a0ce36466ccc1278bf987df5f71db1719b9ca6b4118264f45cb627bfe0f
3
- size 32169626
 
 
 
 
openvino/npu/tokenizer_config.json DELETED
@@ -1,75 +0,0 @@
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/npu/vision_encoder/model.onnx DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:15ebb2aacc45e46c24217a0f0f3be2e5bbdf0b7fe7fc155144d4e9d3f40e9c1d
3
- size 1186455
 
 
 
 
openvino/npu/vision_encoder/model.onnx.data DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:9355ec30e91a73736b8ee7a285f5afef92fe8616cf9ae7b5ebdd258ae9dd1b3f
3
- size 140902400