AIFunOver commited on
Commit
6d53122
1 Parent(s): 15fd7c6

Upload openvino_detokenizer.xml with huggingface_hub

Browse files
Files changed (1) hide show
  1. openvino_detokenizer.xml +263 -0
openvino_detokenizer.xml ADDED
@@ -0,0 +1,263 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <net name="detokenizer" version="11">
3
+ <layers>
4
+ <layer id="0" name="Parameter_1800347" type="Parameter" version="opset1">
5
+ <data shape="?,?" element_type="i64" />
6
+ <output>
7
+ <port id="0" precision="I64" names="Parameter_1800347">
8
+ <dim>-1</dim>
9
+ <dim>-1</dim>
10
+ </port>
11
+ </output>
12
+ </layer>
13
+ <layer id="1" name="Convert_1800364" 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_1800314" type="Const" version="opset1">
29
+ <data element_type="u8" shape="2955910" offset="0" size="2955910" />
30
+ <output>
31
+ <port id="0" precision="U8">
32
+ <dim>2955910</dim>
33
+ </port>
34
+ </output>
35
+ </layer>
36
+ <layer id="3" name="StringTensorUnpack_1800315" type="StringTensorUnpack" version="extension">
37
+ <data mode="begins_ends" />
38
+ <input>
39
+ <port id="0" precision="U8">
40
+ <dim>2955910</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_1800348" type="VocabDecoder" version="extension">
56
+ <data skip_tokens="0, 1, 2, 3, 106, 107" />
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_1800350" type="Const" version="opset1">
91
+ <data element_type="u8" shape="3" offset="2955910" 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_1800352" type="Const" version="opset1">
99
+ <data element_type="u8" shape="1" offset="2955913" 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_1800353" 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_1800354" 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_1800355" 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="StringTensorPack_1800356" type="StringTensorPack" version="extension">
186
+ <data mode="begins_ends" />
187
+ <input>
188
+ <port id="0" precision="I32">
189
+ <dim>-1</dim>
190
+ </port>
191
+ <port id="1" precision="I32">
192
+ <dim>-1</dim>
193
+ </port>
194
+ <port id="2" precision="U8">
195
+ <dim>-1</dim>
196
+ </port>
197
+ </input>
198
+ <output>
199
+ <port id="3" precision="STRING" names="string_output">
200
+ <dim>-1</dim>
201
+ </port>
202
+ </output>
203
+ </layer>
204
+ <layer id="11" name="Result_1800357" type="Result" version="opset1">
205
+ <input>
206
+ <port id="0" precision="STRING">
207
+ <dim>-1</dim>
208
+ </port>
209
+ </input>
210
+ </layer>
211
+ </layers>
212
+ <edges>
213
+ <edge from-layer="0" from-port="0" to-layer="1" to-port="0" />
214
+ <edge from-layer="1" from-port="1" to-layer="4" to-port="0" />
215
+ <edge from-layer="2" from-port="0" to-layer="3" to-port="0" />
216
+ <edge from-layer="3" from-port="1" to-layer="4" to-port="1" />
217
+ <edge from-layer="3" from-port="2" to-layer="4" to-port="2" />
218
+ <edge from-layer="3" from-port="3" to-layer="4" to-port="3" />
219
+ <edge from-layer="4" from-port="6" to-layer="7" to-port="0" />
220
+ <edge from-layer="4" from-port="7" to-layer="7" to-port="1" />
221
+ <edge from-layer="4" from-port="8" to-layer="7" to-port="2" />
222
+ <edge from-layer="4" from-port="5" to-layer="9" to-port="1" />
223
+ <edge from-layer="4" from-port="4" to-layer="9" to-port="0" />
224
+ <edge from-layer="5" from-port="0" to-layer="7" to-port="3" />
225
+ <edge from-layer="6" from-port="0" to-layer="7" to-port="4" />
226
+ <edge from-layer="7" from-port="5" to-layer="8" to-port="0" />
227
+ <edge from-layer="7" from-port="7" to-layer="8" to-port="2" />
228
+ <edge from-layer="7" from-port="6" to-layer="8" to-port="1" />
229
+ <edge from-layer="8" from-port="3" to-layer="9" to-port="2" />
230
+ <edge from-layer="8" from-port="4" to-layer="9" to-port="3" />
231
+ <edge from-layer="8" from-port="5" to-layer="10" to-port="2" />
232
+ <edge from-layer="9" from-port="4" to-layer="10" to-port="0" />
233
+ <edge from-layer="9" from-port="5" to-layer="10" to-port="1" />
234
+ <edge from-layer="10" from-port="3" to-layer="11" to-port="0" />
235
+ </edges>
236
+ <rt_info>
237
+ <add_attention_mask value="True" />
238
+ <add_prefix_space />
239
+ <add_special_tokens value="True" />
240
+ <bos_token_id value="2" />
241
+ <chat_template value="{{ bos_token }}{% if messages[0]['role'] == 'system' %}{{ raise_exception('System role not supported') }}{% endif %}{% for message in messages %}{% if (message['role'] == 'user') != (loop.index0 % 2 == 0) %}{{ raise_exception('Conversation roles must alternate user/assistant/user/assistant/...') }}{% endif %}{% if (message['role'] == 'assistant') %}{% set role = 'model' %}{% else %}{% set role = message['role'] %}{% endif %}{{ '&lt;start_of_turn>' + role + '&#10;' + message['content'] | trim + '&lt;end_of_turn>&#10;' }}{% endfor %}{% if add_generation_prompt %}{{'&lt;start_of_turn>model&#10;'}}{% endif %}" />
242
+ <clean_up_tokenization_spaces />
243
+ <detokenizer_input_type value="i64" />
244
+ <eos_token_id value="1" />
245
+ <handle_special_tokens_with_re />
246
+ <number_of_inputs value="1" />
247
+ <openvino_tokenizers_version value="2024.5.0.0.dev20241030" />
248
+ <openvino_version value="2024.5.0.dev20241030" />
249
+ <original_tokenizer_class value="&lt;class 'transformers.models.gemma.tokenization_gemma_fast.GemmaTokenizerFast'>" />
250
+ <pad_token_id value="0" />
251
+ <sentencepiece_version value="0.2.0" />
252
+ <skip_special_tokens value="True" />
253
+ <streaming_detokenizer value="False" />
254
+ <tiktoken_version value="0.8.0" />
255
+ <tokenizer_output_type value="i64" />
256
+ <tokenizers_version value="0.20.1" />
257
+ <transformers_version value="4.45.2" />
258
+ <use_max_padding value="False" />
259
+ <use_sentencepiece_backend value="False" />
260
+ <utf8_replace_mode />
261
+ <with_detokenizer value="True" />
262
+ </rt_info>
263
+ </net>