updated chat_template
Browse files- tokenizer_config.json +1 -1
tokenizer_config.json
CHANGED
@@ -229,7 +229,7 @@
|
|
229 |
"AutoProcessor": "preprocessing_molmo.MolmoProcessor"
|
230 |
},
|
231 |
"bos_token": "<|endoftext|>",
|
232 |
-
"chat_template": "{% for message in messages
|
233 |
"clean_up_tokenization_spaces": false,
|
234 |
"eos_token": "<|endoftext|>",
|
235 |
"model_max_length": 8192,
|
|
|
229 |
"AutoProcessor": "preprocessing_molmo.MolmoProcessor"
|
230 |
},
|
231 |
"bos_token": "<|endoftext|>",
|
232 |
+
"chat_template": "{% for message in messages -%}\n {%- if (loop.index % 2 == 1 and message['role'] != 'user') or \n (loop.index % 2 == 0 and message['role'].lower() != 'assistant') -%}\n {{ raise_exception('Conversation roles must alternate user/assistant/user/assistant/...') }}\n {%- endif -%}\n {{ message['role'].capitalize() + ': ' + message['content'] }}\n {%- if not loop.last -%}\n {{ ' ' }}\n {%- endif %}\n {%- endfor -%}\n {%- if add_generation_prompt -%}\n {{ ' Assistant:' }}\n {%- endif %}",
|
233 |
"clean_up_tokenization_spaces": false,
|
234 |
"eos_token": "<|endoftext|>",
|
235 |
"model_max_length": 8192,
|