Update tokenizer_config.json
Browse files- tokenizer_config.json +26 -26
tokenizer_config.json
CHANGED
@@ -3,33 +3,33 @@
|
|
3 |
"add_eos_token": false,
|
4 |
"add_prefix_space": null,
|
5 |
"auto_map": {
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
},
|
31 |
"bos_token": "<|begin_of_text|>",
|
32 |
-
|
33 |
"clean_up_tokenization_spaces": false,
|
34 |
"eos_token": "<|end_of_text|>",
|
35 |
"legacy": true,
|
@@ -38,7 +38,7 @@
|
|
38 |
"padding_side": "left",
|
39 |
"sp_model_kwargs": {},
|
40 |
"tokenizer_class": "Qwen2Tokenizer",
|
41 |
-
|
42 |
"trust_remote_code": true,
|
43 |
"unk_token": null,
|
44 |
"use_default_system_prompt": false
|
|
|
3 |
"add_eos_token": false,
|
4 |
"add_prefix_space": null,
|
5 |
"auto_map": {
|
6 |
+
"AutoConfig": [
|
7 |
+
"configuration_qwen2.Qwen2Config",
|
8 |
+
"qwen2_config.Qwen2Config"
|
9 |
+
],
|
10 |
+
"AutoModel": [
|
11 |
+
"modeling_qwen2.Qwen2Model",
|
12 |
+
"qwen2.Qwen2ForCausalLM"
|
13 |
+
],
|
14 |
+
"AutoModelForCausalLM": [
|
15 |
+
"modeling_qwen2.Qwen2ForCausalLM",
|
16 |
+
"qwen2.Qwen2ForCausalLM"
|
17 |
+
],
|
18 |
+
"AutoModelForQuestionAnswering": [
|
19 |
+
"modeling_qwen2.Qwen2ForQuestionAnswering",
|
20 |
+
"qwen2.Qwen2ForQuestionAnswering"
|
21 |
+
],
|
22 |
+
"AutoModelForSequenceClassification": [
|
23 |
+
"modeling_qwen2.Qwen2ForSequenceClassification",
|
24 |
+
"qwen2.Qwen2ForSequenceClassification"
|
25 |
+
],
|
26 |
+
"AutoModelForTokenClassification": [
|
27 |
+
"modeling_qwen2.Qwen2ForTokenClassification",
|
28 |
+
"qwen2.Qwen2ForTokenClassification"
|
29 |
+
]
|
30 |
},
|
31 |
"bos_token": "<|begin_of_text|>",
|
32 |
+
"chat_template": "{% if not add_generation_prompt is defined %}{% set add_generation_prompt = false %}{% endif %}{% set ns = namespace(is_first=false, is_tool=false, is_output_first=true, system_prompt='') %}{%- for message in messages %}{%- if message['role'] == 'system' %}{% set ns.system_prompt = message['content'] %}{%- endif %}{%- endfor %}{{bos_token}}{{ns.system_prompt}}{%- for message in messages %}{%- if message['role'] == 'user' %}{%- set ns.is_tool = false -%}{{'<|User|>:' + message['content']}}{%- endif %}{%- if message['role'] == 'assistant' and message['content'] is none %}{%- set ns.is_tool = false -%}{%- for tool in message['tool_calls']%}{%- if not ns.is_first %}{{'<|Assistant|>:<|tool_calls|>:<|tool_call|>:' + tool['type'] + '<|tool_sep|>:' + tool['function']['name'] + '\\n' + '```json' + '\\n' + tool['function']['arguments'] + '\\n' + '```' + '<|tool_call_end|>'}}{%- set ns.is_first = true -%}{%- else %}{{'\\n' + '<|tool_call|>:' + tool['type'] + '<|tool_sep|>:' + tool['function']['name'] + '\\n' + '```json' + '\\n' + tool['function']['arguments'] + '\\n' + '```' + '<|tool_call_end|>'}}{{'<|tool_calls_end|>:<|end_of_text|>'}}{%- endif %}{%- endfor %}{%- endif %}{%- if message['role'] == 'assistant' and message['content'] is not none %}{%- if ns.is_tool %}{{'<|tool_outputs_end|>:' + message['content'] + '<|end_of_text|>'}}{%- set ns.is_tool = false -%}{%- else %}{% set content = message['content'] %}{% if '</think>' in content %}{% set content = content.split('</think>')[-1] %}{% endif %}{{'<|Assistant|>:' + content + '<|end_of_text|>'}}{%- endif %}{%- endif %}{%- if message['role'] == 'tool' %}{%- set ns.is_tool = true -%}{%- if ns.is_output_first %}{{'<|tool_outputs|>:<|tool_output|>:' + message['content'] + '<|tool_output_end|>'}}{%- set ns.is_output_first = false %}{%- else %}{{'\\n<|tool_output|>:' + message['content'] + '<|tool_output_end|>'}}{%- endif %}{%- endif %}{%- endfor -%}{% if ns.is_tool %}{{'<|tool_outputs_end|>'}}{% endif %}{% if add_generation_prompt and not ns.is_tool %}{{'<|Assistant|>:'}}{% endif %}",
|
33 |
"clean_up_tokenization_spaces": false,
|
34 |
"eos_token": "<|end_of_text|>",
|
35 |
"legacy": true,
|
|
|
38 |
"padding_side": "left",
|
39 |
"sp_model_kwargs": {},
|
40 |
"tokenizer_class": "Qwen2Tokenizer",
|
41 |
+
"transformers_version": "4.36.2",
|
42 |
"trust_remote_code": true,
|
43 |
"unk_token": null,
|
44 |
"use_default_system_prompt": false
|