Upload tokenizer
Browse files- special_tokens_map.json +13 -105
- tokenizer.json +1 -1
- tokenizer_config.json +5 -7
special_tokens_map.json
CHANGED
@@ -1,110 +1,18 @@
|
|
1 |
{
|
2 |
"additional_special_tokens": [
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
},
|
17 |
-
{
|
18 |
-
"content": "<|object_ref_start|>",
|
19 |
-
"lstrip": false,
|
20 |
-
"normalized": false,
|
21 |
-
"rstrip": false,
|
22 |
-
"single_word": false
|
23 |
-
},
|
24 |
-
{
|
25 |
-
"content": "<|object_ref_end|>",
|
26 |
-
"lstrip": false,
|
27 |
-
"normalized": false,
|
28 |
-
"rstrip": false,
|
29 |
-
"single_word": false
|
30 |
-
},
|
31 |
-
{
|
32 |
-
"content": "<|box_start|>",
|
33 |
-
"lstrip": false,
|
34 |
-
"normalized": false,
|
35 |
-
"rstrip": false,
|
36 |
-
"single_word": false
|
37 |
-
},
|
38 |
-
{
|
39 |
-
"content": "<|box_end|>",
|
40 |
-
"lstrip": false,
|
41 |
-
"normalized": false,
|
42 |
-
"rstrip": false,
|
43 |
-
"single_word": false
|
44 |
-
},
|
45 |
-
{
|
46 |
-
"content": "<|quad_start|>",
|
47 |
-
"lstrip": false,
|
48 |
-
"normalized": false,
|
49 |
-
"rstrip": false,
|
50 |
-
"single_word": false
|
51 |
-
},
|
52 |
-
{
|
53 |
-
"content": "<|quad_end|>",
|
54 |
-
"lstrip": false,
|
55 |
-
"normalized": false,
|
56 |
-
"rstrip": false,
|
57 |
-
"single_word": false
|
58 |
-
},
|
59 |
-
{
|
60 |
-
"content": "<|vision_start|>",
|
61 |
-
"lstrip": false,
|
62 |
-
"normalized": false,
|
63 |
-
"rstrip": false,
|
64 |
-
"single_word": false
|
65 |
-
},
|
66 |
-
{
|
67 |
-
"content": "<|vision_end|>",
|
68 |
-
"lstrip": false,
|
69 |
-
"normalized": false,
|
70 |
-
"rstrip": false,
|
71 |
-
"single_word": false
|
72 |
-
},
|
73 |
-
{
|
74 |
-
"content": "<|vision_pad|>",
|
75 |
-
"lstrip": false,
|
76 |
-
"normalized": false,
|
77 |
-
"rstrip": false,
|
78 |
-
"single_word": false
|
79 |
-
},
|
80 |
-
{
|
81 |
-
"content": "<|image_pad|>",
|
82 |
-
"lstrip": false,
|
83 |
-
"normalized": false,
|
84 |
-
"rstrip": false,
|
85 |
-
"single_word": false
|
86 |
-
},
|
87 |
-
{
|
88 |
-
"content": "<|video_pad|>",
|
89 |
-
"lstrip": false,
|
90 |
-
"normalized": false,
|
91 |
-
"rstrip": false,
|
92 |
-
"single_word": false
|
93 |
-
},
|
94 |
-
{
|
95 |
-
"content": "<think>",
|
96 |
-
"lstrip": false,
|
97 |
-
"normalized": false,
|
98 |
-
"rstrip": false,
|
99 |
-
"single_word": false
|
100 |
-
},
|
101 |
-
{
|
102 |
-
"content": "</think>",
|
103 |
-
"lstrip": false,
|
104 |
-
"normalized": false,
|
105 |
-
"rstrip": false,
|
106 |
-
"single_word": false
|
107 |
-
}
|
108 |
],
|
109 |
"eos_token": {
|
110 |
"content": "<|im_end|>",
|
|
|
1 |
{
|
2 |
"additional_special_tokens": [
|
3 |
+
"<|im_start|>",
|
4 |
+
"<|im_end|>",
|
5 |
+
"<|object_ref_start|>",
|
6 |
+
"<|object_ref_end|>",
|
7 |
+
"<|box_start|>",
|
8 |
+
"<|box_end|>",
|
9 |
+
"<|quad_start|>",
|
10 |
+
"<|quad_end|>",
|
11 |
+
"<|vision_start|>",
|
12 |
+
"<|vision_end|>",
|
13 |
+
"<|vision_pad|>",
|
14 |
+
"<|image_pad|>",
|
15 |
+
"<|video_pad|>"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
],
|
17 |
"eos_token": {
|
18 |
"content": "<|im_end|>",
|
tokenizer.json
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 11422265
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:6fb3aae6d45fa4a15c9546a0bb628f161cea617ed2bbc3ffbdf61f9f372c3deb
|
3 |
size 11422265
|
tokenizer_config.json
CHANGED
@@ -181,18 +181,18 @@
|
|
181 |
"151665": {
|
182 |
"content": "<think>",
|
183 |
"lstrip": false,
|
184 |
-
"normalized":
|
185 |
"rstrip": false,
|
186 |
"single_word": false,
|
187 |
-
"special":
|
188 |
},
|
189 |
"151666": {
|
190 |
"content": "</think>",
|
191 |
"lstrip": false,
|
192 |
-
"normalized":
|
193 |
"rstrip": false,
|
194 |
"single_word": false,
|
195 |
-
"special":
|
196 |
}
|
197 |
},
|
198 |
"additional_special_tokens": [
|
@@ -208,9 +208,7 @@
|
|
208 |
"<|vision_end|>",
|
209 |
"<|vision_pad|>",
|
210 |
"<|image_pad|>",
|
211 |
-
"<|video_pad|>"
|
212 |
-
"<think>",
|
213 |
-
"</think>"
|
214 |
],
|
215 |
"bos_token": null,
|
216 |
"chat_template": "{%- if tools %}\n {{- '<|im_start|>system\\n' }}\n {%- if messages[0]['role'] == 'system' %}\n {{- messages[0]['content'] }}\n {%- else %}\n {{- 'You are Qwen, created by Alibaba Cloud. You are a helpful assistant.' }}\n {%- endif %}\n {{- \"\\n\\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 {%- else %}\n {{- '<|im_start|>system\\nYou are Qwen, created by Alibaba Cloud. You are a helpful assistant.<|im_end|>\\n' }}\n {%- endif %}\n{%- endif %}\n{%- for message in messages %}\n {%- if (message.role == \"user\") or (message.role == \"system\" and not loop.first) or (message.role == \"assistant\" and not message.tool_calls) %}\n {{- '<|im_start|>' + message.role + '\\n' + message.content + '<|im_end|>' + '\\n' }}\n {%- elif message.role == \"assistant\" %}\n {{- '<|im_start|>' + message.role }}\n {%- if message.content %}\n {{- '\\n' + message.content }}\n {%- endif %}\n {%- for tool_call in message.tool_calls %}\n {%- if tool_call.function is defined %}\n {%- set tool_call = tool_call.function %}\n {%- endif %}\n {{- '\\n<tool_call>\\n{\"name\": \"' }}\n {{- tool_call.name }}\n {{- '\", \"arguments\": ' }}\n {{- tool_call.arguments | tojson }}\n {{- '}\\n</tool_call>' }}\n {%- endfor %}\n {{- '<|im_end|>\\n' }}\n {%- elif message.role == \"tool\" %}\n {%- if (loop.index0 == 0) or (messages[loop.index0 - 1].role != \"tool\") %}\n {{- '<|im_start|>user' }}\n {%- endif %}\n {{- '\\n<tool_response>\\n' }}\n {{- message.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' }}\n{%- endif %}\n",
|
|
|
181 |
"151665": {
|
182 |
"content": "<think>",
|
183 |
"lstrip": false,
|
184 |
+
"normalized": true,
|
185 |
"rstrip": false,
|
186 |
"single_word": false,
|
187 |
+
"special": false
|
188 |
},
|
189 |
"151666": {
|
190 |
"content": "</think>",
|
191 |
"lstrip": false,
|
192 |
+
"normalized": true,
|
193 |
"rstrip": false,
|
194 |
"single_word": false,
|
195 |
+
"special": false
|
196 |
}
|
197 |
},
|
198 |
"additional_special_tokens": [
|
|
|
208 |
"<|vision_end|>",
|
209 |
"<|vision_pad|>",
|
210 |
"<|image_pad|>",
|
211 |
+
"<|video_pad|>"
|
|
|
|
|
212 |
],
|
213 |
"bos_token": null,
|
214 |
"chat_template": "{%- if tools %}\n {{- '<|im_start|>system\\n' }}\n {%- if messages[0]['role'] == 'system' %}\n {{- messages[0]['content'] }}\n {%- else %}\n {{- 'You are Qwen, created by Alibaba Cloud. You are a helpful assistant.' }}\n {%- endif %}\n {{- \"\\n\\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 {%- else %}\n {{- '<|im_start|>system\\nYou are Qwen, created by Alibaba Cloud. You are a helpful assistant.<|im_end|>\\n' }}\n {%- endif %}\n{%- endif %}\n{%- for message in messages %}\n {%- if (message.role == \"user\") or (message.role == \"system\" and not loop.first) or (message.role == \"assistant\" and not message.tool_calls) %}\n {{- '<|im_start|>' + message.role + '\\n' + message.content + '<|im_end|>' + '\\n' }}\n {%- elif message.role == \"assistant\" %}\n {{- '<|im_start|>' + message.role }}\n {%- if message.content %}\n {{- '\\n' + message.content }}\n {%- endif %}\n {%- for tool_call in message.tool_calls %}\n {%- if tool_call.function is defined %}\n {%- set tool_call = tool_call.function %}\n {%- endif %}\n {{- '\\n<tool_call>\\n{\"name\": \"' }}\n {{- tool_call.name }}\n {{- '\", \"arguments\": ' }}\n {{- tool_call.arguments | tojson }}\n {{- '}\\n</tool_call>' }}\n {%- endfor %}\n {{- '<|im_end|>\\n' }}\n {%- elif message.role == \"tool\" %}\n {%- if (loop.index0 == 0) or (messages[loop.index0 - 1].role != \"tool\") %}\n {{- '<|im_start|>user' }}\n {%- endif %}\n {{- '\\n<tool_response>\\n' }}\n {{- message.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' }}\n{%- endif %}\n",
|