Commit
•
6641766
1
Parent(s):
5db4fb4
Update tokenizer_config.json
Browse files- tokenizer_config.json +2 -1
tokenizer_config.json
CHANGED
@@ -58,5 +58,6 @@
|
|
58 |
"spaces_between_special_tokens": false,
|
59 |
"tokenizer_class": "LlamaTokenizer",
|
60 |
"unk_token": "<unk>",
|
61 |
-
"use_default_system_prompt": false
|
|
|
62 |
}
|
|
|
58 |
"spaces_between_special_tokens": false,
|
59 |
"tokenizer_class": "LlamaTokenizer",
|
60 |
"unk_token": "<unk>",
|
61 |
+
"use_default_system_prompt": false,
|
62 |
+
"chat_template": "{{ bos_token }}{% if messages[0]['role'] == 'system' %}{% set loop_messages = messages[1:] %}{% set system_message = messages[0]['content'] %}{% else %}{% set loop_messages = messages %}{% set system_message = false %}{% endif %}{% 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 loop.index0 == 0 and system_message != false %}{% set content = '<<SYS>>\\n' + system_message + '\\n<</SYS>>\\n\\n' + message['content'] %}{% else %}{% set content = message['content'] %}{% endif %}{% if message['role'] == 'user' %}{{ '[INST] ' + content.strip() + ' [/INST]' }}{% elif message['role'] == 'assistant' %}{{ content.strip() + eos_token }}{% endif %}{% endfor %}"
|
63 |
}
|