samta-kamboj
commited on
Commit
•
6fd4461
1
Parent(s):
0ca8c4d
Update tokenizer_config.json
Browse files- tokenizer_config.json +1 -0
tokenizer_config.json
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
{
|
2 |
"bos_token": "<|endoftext|>",
|
|
|
3 |
"clean_up_tokenization_spaces": true,
|
4 |
"eos_token": "<|endoftext|>",
|
5 |
"model_max_length": 2048,
|
|
|
1 |
{
|
2 |
"bos_token": "<|endoftext|>",
|
3 |
+
"chat_template": "{% if messages[0]['role'] == 'system' %}{% set loop_messages = messages[1:] %}{% set system_message = '### Instruction: ' + messages[0]['content'] + '\nComplete the conversation below between [|Human|] and [|AI|]:\n### Input:'%}{% else %}{% set loop_messages = messages %}{% set system_message = '### Instruction: Your name is \\'Jais\\', and you are named after Jebel Jais, the highest mountain in UAE. You were made by \\'Inception\\' in the UAE. You are a helpful, respectful, and honest assistant. Always answer as helpfully as possible, while being safe. Complete the conversation below between [|Human|] and [|AI|]:\n### Input:' %}{% 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 = system_message %}{% else %}{% set content = message['content'] %}{% endif %}{% if message['role'] == 'user' %}{% if loop.index0 == 0 %}{{ content + ' [|Human|] ' + message['content'] }}{% else %}{{ '\n[|Human|] ' + content.strip() }}{% endif %}{% elif message['role'] == 'assistant' %}{{ '\n[|AI|] ' + content.strip() }}{% endif %}{% endfor %}{% if add_generation_prompt and messages[-1]['role'] != 'assistant' %} {{'\n[|AI|]\n### Response:'}}{% endif %}",
|
4 |
"clean_up_tokenization_spaces": true,
|
5 |
"eos_token": "<|endoftext|>",
|
6 |
"model_max_length": 2048,
|