Add bos token to chat_template
Browse files- tokenizer_config.json +1 -1
tokenizer_config.json
CHANGED
@@ -43,7 +43,7 @@
|
|
43 |
},
|
44 |
"additional_special_tokens": [],
|
45 |
"bos_token": "<s>",
|
46 |
-
"chat_template": "{% if messages[0]['role'] == 'system' %}{% set loop_messages = messages[1:] %}{% set system_message = messages[0]['content'] %}{% else %}{% set loop_messages = messages %}{% set system_message = 'You are a helpful assistant. Please give a long and detailed answer.' %}{% endif %}{% if not add_generation_prompt is defined %}{% set add_generation_prompt = false %}{% endif %}{% for message in loop_messages %}{% if loop.index0 == 0 %}{{'<|im_start|>system\n' + system_message + '<|im_end|>\n'}}{% endif %}{{'<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>' + '\n'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}",
|
47 |
"clean_up_tokenization_spaces": false,
|
48 |
"eos_token": "</s>",
|
49 |
"legacy": true,
|
|
|
43 |
},
|
44 |
"additional_special_tokens": [],
|
45 |
"bos_token": "<s>",
|
46 |
+
"chat_template": "{{'<s>'}}{% if messages[0]['role'] == 'system' %}{% set loop_messages = messages[1:] %}{% set system_message = messages[0]['content'] %}{% else %}{% set loop_messages = messages %}{% set system_message = 'You are a helpful assistant. Please give a long and detailed answer.' %}{% endif %}{% if not add_generation_prompt is defined %}{% set add_generation_prompt = false %}{% endif %}{% for message in loop_messages %}{% if loop.index0 == 0 %}{{'<|im_start|>system\n' + system_message + '<|im_end|>\n'}}{% endif %}{{'<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>' + '\n'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}",
|
47 |
"clean_up_tokenization_spaces": false,
|
48 |
"eos_token": "</s>",
|
49 |
"legacy": true,
|