Matt
commited on
Commit
•
f41cf14
1
Parent(s):
2c41dea
Add custom tokenizer
Browse files- tokenizer_config.json +1 -0
tokenizer_config.json
CHANGED
@@ -8,6 +8,7 @@
|
|
8 |
]
|
9 |
},
|
10 |
"bos_token": "<s>",
|
|
|
11 |
"clean_up_tokenization_spaces": false,
|
12 |
"eos_token": "</s>",
|
13 |
"use_fast": false,
|
|
|
8 |
]
|
9 |
},
|
10 |
"bos_token": "<s>",
|
11 |
+
"chat_template": "{{ bos_token }}{% for message in messages %}{% if (message['role'] == 'user') != (loop.index0 % 2 == 0) %}{{ raise_exception('Conversation roles must alternate user/assistant/user/assistant/...') }}{% endif %}{% if loop.last and message['role'] != 'user' %}{{ raise_exception('Most recent message must come from user!') }}{% endif %}{% if message['role'] == 'user' %}{{ '<|User|>:' + message['content'] + '<eoh>\n'}}{% elif message['role'] == 'assistant' %}{{ '<|Bot|>:' + message['content'] + '<eoa>\n'}}{% else %}{{ raise_exception('Only user and assistant roles are supported in this model!') }}{% endif %}{% endfor %}{{ '<|Bot|>:' }}",
|
12 |
"clean_up_tokenization_spaces": false,
|
13 |
"eos_token": "</s>",
|
14 |
"use_fast": false,
|