Update tokenizer_config.json
Browse files- tokenizer_config.json +1 -1
tokenizer_config.json
CHANGED
@@ -279,7 +279,7 @@
|
|
279 |
"<delim>"
|
280 |
],
|
281 |
"bos_token": null,
|
282 |
-
"chat_template": "{
|
283 |
"clean_up_tokenization_spaces": false,
|
284 |
"eos_token": "<|im_end|>",
|
285 |
"errors": "replace",
|
|
|
279 |
"<delim>"
|
280 |
],
|
281 |
"bos_token": null,
|
282 |
+
"chat_template": "{% if messages[0]['role'] != 'system' %}{{ '<|im_start|>system\nYou are a helpful assistant.<|im_end|>\n' }}{% else %}{{ '<|im_start|>system\n' + messages[0]['content'] + '<|im_end|>\n' }}{% endif %}{% for message in messages %}{{ '<|im_start|>' + message['role'] + '\n' }}{# Render all images first #}{% for content in message['content'] | selectattr('type', 'equalto', 'image') %}{{ '<image>\n' }}{% endfor %}{# Render all text next #}{% if message['role'] != 'assistant' %}{% for content in message['content'] | selectattr('type', 'equalto', 'text') %}{{ content['text'] }}{% endfor %}{% else %}{% for content in message['content'] | selectattr('type', 'equalto', 'text') %}{% generation %}{{ content['text'] }}{% endgeneration %}{% endfor %}{% endif %}{{ '<|im_end|>\n' }}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}",
|
283 |
"clean_up_tokenization_spaces": false,
|
284 |
"eos_token": "<|im_end|>",
|
285 |
"errors": "replace",
|