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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<net name="detokenizer" version="11">
|
3 |
+
<layers>
|
4 |
+
<layer id="0" name="Parameter_301097" type="Parameter" version="opset1">
|
5 |
+
<data shape="?,?" element_type="i64" />
|
6 |
+
<output>
|
7 |
+
<port id="0" precision="I64" names="Parameter_301097">
|
8 |
+
<dim>-1</dim>
|
9 |
+
<dim>-1</dim>
|
10 |
+
</port>
|
11 |
+
</output>
|
12 |
+
</layer>
|
13 |
+
<layer id="1" name="Convert_301119" type="Convert" version="opset1">
|
14 |
+
<data destination_type="i32" />
|
15 |
+
<input>
|
16 |
+
<port id="0" precision="I64">
|
17 |
+
<dim>-1</dim>
|
18 |
+
<dim>-1</dim>
|
19 |
+
</port>
|
20 |
+
</input>
|
21 |
+
<output>
|
22 |
+
<port id="1" precision="I32">
|
23 |
+
<dim>-1</dim>
|
24 |
+
<dim>-1</dim>
|
25 |
+
</port>
|
26 |
+
</output>
|
27 |
+
</layer>
|
28 |
+
<layer id="2" name="Constant_301067" type="Const" version="opset1">
|
29 |
+
<data element_type="u8" shape="339140" offset="0" size="339140" />
|
30 |
+
<output>
|
31 |
+
<port id="0" precision="U8">
|
32 |
+
<dim>339140</dim>
|
33 |
+
</port>
|
34 |
+
</output>
|
35 |
+
</layer>
|
36 |
+
<layer id="3" name="StringTensorUnpack_301068" type="StringTensorUnpack" version="extension">
|
37 |
+
<data mode="begins_ends" />
|
38 |
+
<input>
|
39 |
+
<port id="0" precision="U8">
|
40 |
+
<dim>339140</dim>
|
41 |
+
</port>
|
42 |
+
</input>
|
43 |
+
<output>
|
44 |
+
<port id="1" precision="I32">
|
45 |
+
<dim>-1</dim>
|
46 |
+
</port>
|
47 |
+
<port id="2" precision="I32">
|
48 |
+
<dim>-1</dim>
|
49 |
+
</port>
|
50 |
+
<port id="3" precision="U8">
|
51 |
+
<dim>-1</dim>
|
52 |
+
</port>
|
53 |
+
</output>
|
54 |
+
</layer>
|
55 |
+
<layer id="4" name="VocabDecoder_301098" type="VocabDecoder" version="extension">
|
56 |
+
<data skip_tokens="0, 1, 32000, 32001, 32002, 32003, 32004, 32005, 32006, 32007, 32008, 32009, 32010" />
|
57 |
+
<input>
|
58 |
+
<port id="0" precision="I32">
|
59 |
+
<dim>-1</dim>
|
60 |
+
<dim>-1</dim>
|
61 |
+
</port>
|
62 |
+
<port id="1" precision="I32">
|
63 |
+
<dim>-1</dim>
|
64 |
+
</port>
|
65 |
+
<port id="2" precision="I32">
|
66 |
+
<dim>-1</dim>
|
67 |
+
</port>
|
68 |
+
<port id="3" precision="U8">
|
69 |
+
<dim>-1</dim>
|
70 |
+
</port>
|
71 |
+
</input>
|
72 |
+
<output>
|
73 |
+
<port id="4" precision="I32">
|
74 |
+
<dim>-1</dim>
|
75 |
+
</port>
|
76 |
+
<port id="5" precision="I32">
|
77 |
+
<dim>-1</dim>
|
78 |
+
</port>
|
79 |
+
<port id="6" precision="I32">
|
80 |
+
<dim>-1</dim>
|
81 |
+
</port>
|
82 |
+
<port id="7" precision="I32">
|
83 |
+
<dim>-1</dim>
|
84 |
+
</port>
|
85 |
+
<port id="8" precision="U8">
|
86 |
+
<dim>-1</dim>
|
87 |
+
</port>
|
88 |
+
</output>
|
89 |
+
</layer>
|
90 |
+
<layer id="5" name="Constant_301100" type="Const" version="opset1">
|
91 |
+
<data element_type="u8" shape="3" offset="339140" size="3" />
|
92 |
+
<output>
|
93 |
+
<port id="0" precision="U8">
|
94 |
+
<dim>3</dim>
|
95 |
+
</port>
|
96 |
+
</output>
|
97 |
+
</layer>
|
98 |
+
<layer id="6" name="Constant_301102" type="Const" version="opset1">
|
99 |
+
<data element_type="u8" shape="1" offset="339143" size="1" />
|
100 |
+
<output>
|
101 |
+
<port id="0" precision="U8">
|
102 |
+
<dim>1</dim>
|
103 |
+
</port>
|
104 |
+
</output>
|
105 |
+
</layer>
|
106 |
+
<layer id="7" name="RegexNormalization_301103" type="RegexNormalization" version="extension">
|
107 |
+
<data global_replace="true" />
|
108 |
+
<input>
|
109 |
+
<port id="0" precision="I32">
|
110 |
+
<dim>-1</dim>
|
111 |
+
</port>
|
112 |
+
<port id="1" precision="I32">
|
113 |
+
<dim>-1</dim>
|
114 |
+
</port>
|
115 |
+
<port id="2" precision="U8">
|
116 |
+
<dim>-1</dim>
|
117 |
+
</port>
|
118 |
+
<port id="3" precision="U8">
|
119 |
+
<dim>3</dim>
|
120 |
+
</port>
|
121 |
+
<port id="4" precision="U8">
|
122 |
+
<dim>1</dim>
|
123 |
+
</port>
|
124 |
+
</input>
|
125 |
+
<output>
|
126 |
+
<port id="5" precision="I32">
|
127 |
+
<dim>-1</dim>
|
128 |
+
</port>
|
129 |
+
<port id="6" precision="I32">
|
130 |
+
<dim>-1</dim>
|
131 |
+
</port>
|
132 |
+
<port id="7" precision="U8">
|
133 |
+
<dim>-1</dim>
|
134 |
+
</port>
|
135 |
+
</output>
|
136 |
+
</layer>
|
137 |
+
<layer id="8" name="ByteFallback_301104" type="ByteFallback" version="extension">
|
138 |
+
<input>
|
139 |
+
<port id="0" precision="I32">
|
140 |
+
<dim>-1</dim>
|
141 |
+
</port>
|
142 |
+
<port id="1" precision="I32">
|
143 |
+
<dim>-1</dim>
|
144 |
+
</port>
|
145 |
+
<port id="2" precision="U8">
|
146 |
+
<dim>-1</dim>
|
147 |
+
</port>
|
148 |
+
</input>
|
149 |
+
<output>
|
150 |
+
<port id="3" precision="I32">
|
151 |
+
<dim>-1</dim>
|
152 |
+
</port>
|
153 |
+
<port id="4" precision="I32">
|
154 |
+
<dim>-1</dim>
|
155 |
+
</port>
|
156 |
+
<port id="5" precision="U8">
|
157 |
+
<dim>-1</dim>
|
158 |
+
</port>
|
159 |
+
</output>
|
160 |
+
</layer>
|
161 |
+
<layer id="9" name="FuzeRagged_301105" type="FuzeRagged" version="extension">
|
162 |
+
<input>
|
163 |
+
<port id="0" precision="I32">
|
164 |
+
<dim>-1</dim>
|
165 |
+
</port>
|
166 |
+
<port id="1" precision="I32">
|
167 |
+
<dim>-1</dim>
|
168 |
+
</port>
|
169 |
+
<port id="2" precision="I32">
|
170 |
+
<dim>-1</dim>
|
171 |
+
</port>
|
172 |
+
<port id="3" precision="I32">
|
173 |
+
<dim>-1</dim>
|
174 |
+
</port>
|
175 |
+
</input>
|
176 |
+
<output>
|
177 |
+
<port id="4" precision="I32">
|
178 |
+
<dim>-1</dim>
|
179 |
+
</port>
|
180 |
+
<port id="5" precision="I32">
|
181 |
+
<dim>-1</dim>
|
182 |
+
</port>
|
183 |
+
</output>
|
184 |
+
</layer>
|
185 |
+
<layer id="10" name="Constant_301107" type="Const" version="opset1">
|
186 |
+
<data element_type="u8" shape="2" offset="339144" size="2" />
|
187 |
+
<output>
|
188 |
+
<port id="0" precision="U8">
|
189 |
+
<dim>2</dim>
|
190 |
+
</port>
|
191 |
+
</output>
|
192 |
+
</layer>
|
193 |
+
<layer id="11" name="Constant_301109" type="Const" version="opset1">
|
194 |
+
<data element_type="u8" shape="0" offset="339146" size="1" />
|
195 |
+
<output>
|
196 |
+
<port id="0" precision="U8">
|
197 |
+
<dim>0</dim>
|
198 |
+
</port>
|
199 |
+
</output>
|
200 |
+
</layer>
|
201 |
+
<layer id="12" name="RegexNormalization_301110" type="RegexNormalization" version="extension">
|
202 |
+
<data global_replace="true" />
|
203 |
+
<input>
|
204 |
+
<port id="0" precision="I32">
|
205 |
+
<dim>-1</dim>
|
206 |
+
</port>
|
207 |
+
<port id="1" precision="I32">
|
208 |
+
<dim>-1</dim>
|
209 |
+
</port>
|
210 |
+
<port id="2" precision="U8">
|
211 |
+
<dim>-1</dim>
|
212 |
+
</port>
|
213 |
+
<port id="3" precision="U8">
|
214 |
+
<dim>2</dim>
|
215 |
+
</port>
|
216 |
+
<port id="4" precision="U8">
|
217 |
+
<dim>0</dim>
|
218 |
+
</port>
|
219 |
+
</input>
|
220 |
+
<output>
|
221 |
+
<port id="5" precision="I32">
|
222 |
+
<dim>-1</dim>
|
223 |
+
</port>
|
224 |
+
<port id="6" precision="I32">
|
225 |
+
<dim>-1</dim>
|
226 |
+
</port>
|
227 |
+
<port id="7" precision="U8">
|
228 |
+
<dim>-1</dim>
|
229 |
+
</port>
|
230 |
+
</output>
|
231 |
+
</layer>
|
232 |
+
<layer id="13" name="StringTensorPack_301111" type="StringTensorPack" version="extension">
|
233 |
+
<data mode="begins_ends" />
|
234 |
+
<input>
|
235 |
+
<port id="0" precision="I32">
|
236 |
+
<dim>-1</dim>
|
237 |
+
</port>
|
238 |
+
<port id="1" precision="I32">
|
239 |
+
<dim>-1</dim>
|
240 |
+
</port>
|
241 |
+
<port id="2" precision="U8">
|
242 |
+
<dim>-1</dim>
|
243 |
+
</port>
|
244 |
+
</input>
|
245 |
+
<output>
|
246 |
+
<port id="3" precision="STRING" names="string_output">
|
247 |
+
<dim>-1</dim>
|
248 |
+
</port>
|
249 |
+
</output>
|
250 |
+
</layer>
|
251 |
+
<layer id="14" name="Result_301112" type="Result" version="opset1">
|
252 |
+
<input>
|
253 |
+
<port id="0" precision="STRING">
|
254 |
+
<dim>-1</dim>
|
255 |
+
</port>
|
256 |
+
</input>
|
257 |
+
</layer>
|
258 |
+
</layers>
|
259 |
+
<edges>
|
260 |
+
<edge from-layer="0" from-port="0" to-layer="1" to-port="0" />
|
261 |
+
<edge from-layer="1" from-port="1" to-layer="4" to-port="0" />
|
262 |
+
<edge from-layer="2" from-port="0" to-layer="3" to-port="0" />
|
263 |
+
<edge from-layer="3" from-port="1" to-layer="4" to-port="1" />
|
264 |
+
<edge from-layer="3" from-port="2" to-layer="4" to-port="2" />
|
265 |
+
<edge from-layer="3" from-port="3" to-layer="4" to-port="3" />
|
266 |
+
<edge from-layer="4" from-port="6" to-layer="7" to-port="0" />
|
267 |
+
<edge from-layer="4" from-port="7" to-layer="7" to-port="1" />
|
268 |
+
<edge from-layer="4" from-port="8" to-layer="7" to-port="2" />
|
269 |
+
<edge from-layer="4" from-port="5" to-layer="9" to-port="1" />
|
270 |
+
<edge from-layer="4" from-port="4" to-layer="9" to-port="0" />
|
271 |
+
<edge from-layer="5" from-port="0" to-layer="7" to-port="3" />
|
272 |
+
<edge from-layer="6" from-port="0" to-layer="7" to-port="4" />
|
273 |
+
<edge from-layer="7" from-port="7" to-layer="8" to-port="2" />
|
274 |
+
<edge from-layer="7" from-port="6" to-layer="8" to-port="1" />
|
275 |
+
<edge from-layer="7" from-port="5" to-layer="8" to-port="0" />
|
276 |
+
<edge from-layer="8" from-port="3" to-layer="9" to-port="2" />
|
277 |
+
<edge from-layer="8" from-port="4" to-layer="9" to-port="3" />
|
278 |
+
<edge from-layer="8" from-port="5" to-layer="12" to-port="2" />
|
279 |
+
<edge from-layer="9" from-port="4" to-layer="12" to-port="0" />
|
280 |
+
<edge from-layer="9" from-port="5" to-layer="12" to-port="1" />
|
281 |
+
<edge from-layer="10" from-port="0" to-layer="12" to-port="3" />
|
282 |
+
<edge from-layer="11" from-port="0" to-layer="12" to-port="4" />
|
283 |
+
<edge from-layer="12" from-port="5" to-layer="13" to-port="0" />
|
284 |
+
<edge from-layer="12" from-port="6" to-layer="13" to-port="1" />
|
285 |
+
<edge from-layer="12" from-port="7" to-layer="13" to-port="2" />
|
286 |
+
<edge from-layer="13" from-port="3" to-layer="14" to-port="0" />
|
287 |
+
</edges>
|
288 |
+
<rt_info>
|
289 |
+
<add_attention_mask value="True" />
|
290 |
+
<add_prefix_space />
|
291 |
+
<add_special_tokens value="True" />
|
292 |
+
<bos_token_id value="1" />
|
293 |
+
<chat_template value="{% for message in messages %}{% if message['role'] == 'system' and message['content'] %}{{'<|system|> ' + message['content'] + '<|end|> '}}{% elif message['role'] == 'user' %}{{'<|user|> ' + message['content'] + '<|end|> '}}{% elif message['role'] == 'assistant' %}{{'<|assistant|> ' + message['content'] + '<|end|> '}}{% endif %}{% endfor %}{% if add_generation_prompt %}{{ '<|assistant|> ' }}{% else %}{{ eos_token }}{% endif %}" />
|
294 |
+
<clean_up_tokenization_spaces />
|
295 |
+
<detokenizer_input_type value="i64" />
|
296 |
+
<eos_token_id value="32000" />
|
297 |
+
<handle_special_tokens_with_re />
|
298 |
+
<number_of_inputs value="1" />
|
299 |
+
<openvino_tokenizers_version value="2024.5.0.0.dev20241030" />
|
300 |
+
<openvino_version value="2024.5.0.dev20241030" />
|
301 |
+
<original_tokenizer_class value="<class 'transformers.models.llama.tokenization_llama_fast.LlamaTokenizerFast'>" />
|
302 |
+
<pad_token_id value="32000" />
|
303 |
+
<sentencepiece_version value="0.2.0" />
|
304 |
+
<skip_special_tokens value="True" />
|
305 |
+
<streaming_detokenizer value="False" />
|
306 |
+
<tiktoken_version value="0.8.0" />
|
307 |
+
<tokenizer_output_type value="i64" />
|
308 |
+
<tokenizers_version value="0.20.1" />
|
309 |
+
<transformers_version value="4.45.2" />
|
310 |
+
<use_max_padding value="False" />
|
311 |
+
<use_sentencepiece_backend value="False" />
|
312 |
+
<utf8_replace_mode />
|
313 |
+
<with_detokenizer value="True" />
|
314 |
+
</rt_info>
|
315 |
+
</net>
|