Update tokenizer_config.json
Browse files- tokenizer_config.json +1 -0
tokenizer_config.json
CHANGED
@@ -38,6 +38,7 @@
|
|
38 |
"bos_token": "<s>",
|
39 |
"clean_up_tokenization_spaces": false,
|
40 |
"eos_token": "</s>",
|
|
|
41 |
"legacy": false,
|
42 |
"model_max_length": 4096,
|
43 |
"pad_token": "<unk>",
|
|
|
38 |
"bos_token": "<s>",
|
39 |
"clean_up_tokenization_spaces": false,
|
40 |
"eos_token": "</s>",
|
41 |
+
"chat_template": "{% if messages[0]['role'] == 'system' %}{% set loop_messages = messages[1:] %}{% set system_message = messages[0]['content'].strip() + '\n\n' %}{% else %}{% set loop_messages = messages %}{% set system_message = '' %}{% endif %}{{ bos_token + system_message }}{% for message in loop_messages %}{% if (message['role'] == 'user') != (loop.index0 % 2 == 0) %}{{ raise_exception('Conversation roles must alternate user/assistant/user/assistant/...') }}{% endif %}{% if message['role'] == 'user' %}{{ 'USER: ' + message['content'].strip() + '\n' }}{% elif message['role'] == 'assistant' %}{{ 'ASSISTANT: ' + message['content'].strip() + eos_token + '\n' }}{% endif %}{% endfor %}{% if add_generation_prompt %}{{ 'ASSISTANT:' }}{% endif %}",
|
42 |
"legacy": false,
|
43 |
"model_max_length": 4096,
|
44 |
"pad_token": "<unk>",
|