Add `chat_template` to `tokenizer_config.json`
#31
by
hmellor
HF staff
- opened
- tokenizer_config.json +1 -0
tokenizer_config.json
CHANGED
@@ -7,6 +7,7 @@
|
|
7 |
"rstrip": false,
|
8 |
"single_word": false
|
9 |
},
|
|
|
10 |
"clean_up_tokenization_spaces": false,
|
11 |
"eos_token": {
|
12 |
"__type": "AddedToken",
|
|
|
7 |
"rstrip": false,
|
8 |
"single_word": false
|
9 |
},
|
10 |
+
"chat_template": "{% for message in messages %}{% if message['role'] == 'system' %}{% endif %}{% if message['role'] == 'user' %}{{ '### Instruction:\n' }}{% endif %}{% if message['role'] == 'assistant' %}{{ '### Response:\n' }}{% endif %}{{ message['content'].strip() }}{% if not loop.last %}{{ '\n\n' }}{% endif %}{% if message['role'] == 'user' and loop.last %}{{ '### Response:\n' }}{% endif %}{% endfor %}",
|
11 |
"clean_up_tokenization_spaces": false,
|
12 |
"eos_token": {
|
13 |
"__type": "AddedToken",
|