Marco
commited on
Commit
·
443d42e
1
Parent(s):
3af94b3
added a chat template
Browse files- tokenizer_config.json +1 -1
tokenizer_config.json
CHANGED
@@ -195,7 +195,7 @@
|
|
195 |
"<|video_pad|>"
|
196 |
],
|
197 |
"bos_token": null,
|
198 |
-
"chat_template": "{
|
199 |
"clean_up_tokenization_spaces": false,
|
200 |
"eos_token": "<|im_end|>",
|
201 |
"errors": "replace",
|
|
|
195 |
"<|video_pad|>"
|
196 |
],
|
197 |
"bos_token": null,
|
198 |
+
"chat_template": "{% for message in messages %}{% if loop.first and message['role'] != 'system' %}<|im_start|>system You are a helpful assistant.<|im_end|> {% endif %}<|im_start|>{{ message['role'] }}{% if message['content'] is string %} {{ message['content'] }}{% else %}{% for content in message['content'] %}{% if content['type'] == 'image' or (content is mapping and ('image' in content or 'image_url' in content)) %} <image>{% elif content['type'] == 'text' or 'text' in content %} {{ content['text'] }}{% endif %}{% endfor %}{% endif %}<|im_end|> {% endfor %}{% if add_generation_prompt %}<|im_start|>assistant {% endif %}",
|
199 |
"clean_up_tokenization_spaces": false,
|
200 |
"eos_token": "<|im_end|>",
|
201 |
"errors": "replace",
|