TheMindExpansionNetwork commited on
Commit
75e9c9a
·
verified ·
1 Parent(s): dfb30b1

Upload tokenizer_config.json with huggingface_hub

Browse files
Files changed (1) hide show
  1. tokenizer_config.json +228 -16
tokenizer_config.json CHANGED
@@ -5,25 +5,237 @@
5
  "clean_up_tokenization_spaces": false,
6
  "eos_token": "<|im_end|>",
7
  "errors": "replace",
8
- "extra_special_tokens": {
9
- "<|im_start|>": "<|im_start|>",
10
- "<|im_end|>": "<|im_end|>",
11
- "<|object_ref_start|>": "<|object_ref_start|>",
12
- "<|object_ref_end|>": "<|object_ref_end|>",
13
- "<|box_start|>": "<|box_start|>",
14
- "<|box_end|>": "<|box_end|>",
15
- "<|quad_start|>": "<|quad_start|>",
16
- "<|quad_end|>": "<|quad_end|>",
17
- "<|vision_start|>": "<|vision_start|>",
18
- "<|vision_end|>": "<|vision_end|>",
19
- "<|vision_pad|>": "<|vision_pad|>",
20
- "<|image_pad|>": "<|image_pad|>",
21
- "<|video_pad|>": "<|video_pad|>"
22
- },
23
  "is_local": false,
24
  "model_max_length": 262144,
25
  "pad_token": "<|endoftext|>",
26
  "split_special_tokens": false,
27
  "tokenizer_class": "Qwen2Tokenizer",
28
- "unk_token": null
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
  }
 
5
  "clean_up_tokenization_spaces": false,
6
  "eos_token": "<|im_end|>",
7
  "errors": "replace",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  "is_local": false,
9
  "model_max_length": 262144,
10
  "pad_token": "<|endoftext|>",
11
  "split_special_tokens": false,
12
  "tokenizer_class": "Qwen2Tokenizer",
13
+ "unk_token": null,
14
+ "added_tokens_decoder": {
15
+ "151643": {
16
+ "content": "<|endoftext|>",
17
+ "lstrip": false,
18
+ "normalized": false,
19
+ "rstrip": false,
20
+ "single_word": false,
21
+ "special": true
22
+ },
23
+ "151644": {
24
+ "content": "<|im_start|>",
25
+ "lstrip": false,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false,
29
+ "special": true
30
+ },
31
+ "151645": {
32
+ "content": "<|im_end|>",
33
+ "lstrip": false,
34
+ "normalized": false,
35
+ "rstrip": false,
36
+ "single_word": false,
37
+ "special": true
38
+ },
39
+ "151646": {
40
+ "content": "<|object_ref_start|>",
41
+ "lstrip": false,
42
+ "normalized": false,
43
+ "rstrip": false,
44
+ "single_word": false,
45
+ "special": true
46
+ },
47
+ "151647": {
48
+ "content": "<|object_ref_end|>",
49
+ "lstrip": false,
50
+ "normalized": false,
51
+ "rstrip": false,
52
+ "single_word": false,
53
+ "special": true
54
+ },
55
+ "151648": {
56
+ "content": "<|box_start|>",
57
+ "lstrip": false,
58
+ "normalized": false,
59
+ "rstrip": false,
60
+ "single_word": false,
61
+ "special": true
62
+ },
63
+ "151649": {
64
+ "content": "<|box_end|>",
65
+ "lstrip": false,
66
+ "normalized": false,
67
+ "rstrip": false,
68
+ "single_word": false,
69
+ "special": true
70
+ },
71
+ "151650": {
72
+ "content": "<|quad_start|>",
73
+ "lstrip": false,
74
+ "normalized": false,
75
+ "rstrip": false,
76
+ "single_word": false,
77
+ "special": true
78
+ },
79
+ "151651": {
80
+ "content": "<|quad_end|>",
81
+ "lstrip": false,
82
+ "normalized": false,
83
+ "rstrip": false,
84
+ "single_word": false,
85
+ "special": true
86
+ },
87
+ "151652": {
88
+ "content": "<|vision_start|>",
89
+ "lstrip": false,
90
+ "normalized": false,
91
+ "rstrip": false,
92
+ "single_word": false,
93
+ "special": true
94
+ },
95
+ "151653": {
96
+ "content": "<|vision_end|>",
97
+ "lstrip": false,
98
+ "normalized": false,
99
+ "rstrip": false,
100
+ "single_word": false,
101
+ "special": true
102
+ },
103
+ "151654": {
104
+ "content": "<|vision_pad|>",
105
+ "lstrip": false,
106
+ "normalized": false,
107
+ "rstrip": false,
108
+ "single_word": false,
109
+ "special": true
110
+ },
111
+ "151655": {
112
+ "content": "<|image_pad|>",
113
+ "lstrip": false,
114
+ "normalized": false,
115
+ "rstrip": false,
116
+ "single_word": false,
117
+ "special": true
118
+ },
119
+ "151656": {
120
+ "content": "<|video_pad|>",
121
+ "lstrip": false,
122
+ "normalized": false,
123
+ "rstrip": false,
124
+ "single_word": false,
125
+ "special": true
126
+ },
127
+ "151657": {
128
+ "content": "<tool_call>",
129
+ "lstrip": false,
130
+ "normalized": false,
131
+ "rstrip": false,
132
+ "single_word": false,
133
+ "special": false
134
+ },
135
+ "151658": {
136
+ "content": "</tool_call>",
137
+ "lstrip": false,
138
+ "normalized": false,
139
+ "rstrip": false,
140
+ "single_word": false,
141
+ "special": false
142
+ },
143
+ "151659": {
144
+ "content": "<|fim_prefix|>",
145
+ "lstrip": false,
146
+ "normalized": false,
147
+ "rstrip": false,
148
+ "single_word": false,
149
+ "special": false
150
+ },
151
+ "151660": {
152
+ "content": "<|fim_middle|>",
153
+ "lstrip": false,
154
+ "normalized": false,
155
+ "rstrip": false,
156
+ "single_word": false,
157
+ "special": false
158
+ },
159
+ "151661": {
160
+ "content": "<|fim_suffix|>",
161
+ "lstrip": false,
162
+ "normalized": false,
163
+ "rstrip": false,
164
+ "single_word": false,
165
+ "special": false
166
+ },
167
+ "151662": {
168
+ "content": "<|fim_pad|>",
169
+ "lstrip": false,
170
+ "normalized": false,
171
+ "rstrip": false,
172
+ "single_word": false,
173
+ "special": false
174
+ },
175
+ "151663": {
176
+ "content": "<|repo_name|>",
177
+ "lstrip": false,
178
+ "normalized": false,
179
+ "rstrip": false,
180
+ "single_word": false,
181
+ "special": false
182
+ },
183
+ "151664": {
184
+ "content": "<|file_sep|>",
185
+ "lstrip": false,
186
+ "normalized": false,
187
+ "rstrip": false,
188
+ "single_word": false,
189
+ "special": false
190
+ },
191
+ "151665": {
192
+ "content": "<tool_response>",
193
+ "lstrip": false,
194
+ "normalized": false,
195
+ "rstrip": false,
196
+ "single_word": false,
197
+ "special": false
198
+ },
199
+ "151666": {
200
+ "content": "</tool_response>",
201
+ "lstrip": false,
202
+ "normalized": false,
203
+ "rstrip": false,
204
+ "single_word": false,
205
+ "special": false
206
+ },
207
+ "151667": {
208
+ "content": "<think>",
209
+ "lstrip": false,
210
+ "normalized": false,
211
+ "rstrip": false,
212
+ "single_word": false,
213
+ "special": false
214
+ },
215
+ "151668": {
216
+ "content": "</think>",
217
+ "lstrip": false,
218
+ "normalized": false,
219
+ "rstrip": false,
220
+ "single_word": false,
221
+ "special": false
222
+ }
223
+ },
224
+ "additional_special_tokens": [
225
+ "<|im_start|>",
226
+ "<|im_end|>",
227
+ "<|object_ref_start|>",
228
+ "<|object_ref_end|>",
229
+ "<|box_start|>",
230
+ "<|box_end|>",
231
+ "<|quad_start|>",
232
+ "<|quad_end|>",
233
+ "<|vision_start|>",
234
+ "<|vision_end|>",
235
+ "<|vision_pad|>",
236
+ "<|image_pad|>",
237
+ "<|video_pad|>"
238
+ ],
239
+ "chat_template": "{%- if tools %}\n {{- '<|im_start|>system\\n' }}\n {%- if messages[0].role == 'system' %}\n {{- messages[0].content + '\\n\\n' }}\n {%- endif %}\n {{- \"# Tools\\n\\nYou may call one or more functions to assist with the user query.\\n\\nYou are provided with function signatures within <tools></tools> XML tags:\\n<tools>\" }}\n {%- for tool in tools %}\n {{- \"\\n\" }}\n {{- tool | tojson }}\n {%- endfor %}\n {{- \"\\n</tools>\\n\\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\\n<tool_call>\\n{\\\"name\\\": <function-name>, \\\"arguments\\\": <args-json-object>}\\n</tool_call><|im_end|>\\n\" }}\n{%- else %}\n {%- if messages[0].role == 'system' %}\n {{- '<|im_start|>system\\n' + messages[0].content + '<|im_end|>\\n' }}\n {%- endif %}\n{%- endif %}\n{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}\n{%- for message in messages[::-1] %}\n {%- set index = (messages|length - 1) - loop.index0 %}\n {%- if ns.multi_step_tool and message.role == \"user\" and message.content is string and not(message.content.startswith('<tool_response>') and message.content.endswith('</tool_response>')) %}\n {%- set ns.multi_step_tool = false %}\n {%- set ns.last_query_index = index %}\n {%- endif %}\n{%- endfor %}\n{%- for message in messages %}\n {%- if message.content is string %}\n {%- set content = message.content %}\n {%- else %}\n {%- set content = '' %}\n {%- endif %}\n {%- if (message.role == \"user\") or (message.role == \"system\" and not loop.first) %}\n {{- '<|im_start|>' + message.role + '\\n' + content + '<|im_end|>' + '\\n' }}\n {%- elif message.role == \"assistant\" %}\n {%- set reasoning_content = '' %}\n {%- if message.reasoning_content is string %}\n {%- set reasoning_content = message.reasoning_content %}\n {%- else %}\n {%- if '</think>' in content %}\n {%- set reasoning_content = content.split('</think>')[0].rstrip('\\n').split('<think>')[-1].lstrip('\\n') %}\n {%- set content = content.split('</think>')[-1].lstrip('\\n') %}\n {%- endif %}\n {%- endif %}\n {%- if loop.index0 > ns.last_query_index %}\n {%- if loop.last or (not loop.last and reasoning_content) %}\n {{- '<|im_start|>' + message.role + '\\n<think>\\n' + reasoning_content.strip('\\n') + '\\n</think>\\n\\n' + content.lstrip('\\n') }}\n {%- else %}\n {{- '<|im_start|>' + message.role + '\\n' + content }}\n {%- endif %}\n {%- else %}\n {{- '<|im_start|>' + message.role + '\\n' + content }}\n {%- endif %}\n {%- if message.tool_calls %}\n {%- for tool_call in message.tool_calls %}\n {%- if (loop.first and content) or (not loop.first) %}\n {{- '\\n' }}\n {%- endif %}\n {%- if tool_call.function %}\n {%- set tool_call = tool_call.function %}\n {%- endif %}\n {{- '<tool_call>\\n{\"name\": \"' }}\n {{- tool_call.name }}\n {{- '\", \"arguments\": ' }}\n {%- if tool_call.arguments is string %}\n {{- tool_call.arguments }}\n {%- else %}\n {{- tool_call.arguments | tojson }}\n {%- endif %}\n {{- '}\\n</tool_call>' }}\n {%- endfor %}\n {%- endif %}\n {{- '<|im_end|>\\n' }}\n {%- elif message.role == \"tool\" %}\n {%- if loop.first or (messages[loop.index0 - 1].role != \"tool\") %}\n {{- '<|im_start|>user' }}\n {%- endif %}\n {{- '\\n<tool_response>\\n' }}\n {{- content }}\n {{- '\\n</tool_response>' }}\n {%- if loop.last or (messages[loop.index0 + 1].role != \"tool\") %}\n {{- '<|im_end|>\\n' }}\n {%- endif %}\n {%- endif %}\n{%- endfor %}\n{%- if add_generation_prompt %}\n {{- '<|im_start|>assistant\\n<think>\\n' }}\n{%- endif %}",
240
+ "add_bos_token": false
241
  }