fix: align tokenizer_config.json with upstream instruct prompt format
#2
by
justinthelaw
- opened
- tokenizer_config.json +2 -2
tokenizer_config.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
{
|
2 |
-
"add_bos_token":
|
3 |
"add_eos_token": false,
|
4 |
"added_tokens_decoder": {
|
5 |
"0": {
|
@@ -116,7 +116,7 @@
|
|
116 |
}
|
117 |
},
|
118 |
"bos_token": "<s>",
|
119 |
-
"chat_template": "{
|
120 |
"clean_up_tokenization_spaces": false,
|
121 |
"eos_token": "<|endoftext|>",
|
122 |
"legacy": false,
|
|
|
1 |
{
|
2 |
+
"add_bos_token": false,
|
3 |
"add_eos_token": false,
|
4 |
"added_tokens_decoder": {
|
5 |
"0": {
|
|
|
116 |
}
|
117 |
},
|
118 |
"bos_token": "<s>",
|
119 |
+
"chat_template": "{% for message in messages %}{% if message['role'] == 'system' %}{{'<|system|>\n' + message['content'] + '<|end|>\n'}}{% elif message['role'] == 'user' %}{{'<|user|>\n' + message['content'] + '<|end|>\n'}}{% elif message['role'] == 'assistant' %}{{'<|assistant|>\n' + message['content'] + '<|end|>\n'}}{% endif %}{% endfor %}{% if add_generation_prompt %}{{ '<|assistant|>\n' }}{% else %}{{ eos_token }}{% endif %}",
|
120 |
"clean_up_tokenization_spaces": false,
|
121 |
"eos_token": "<|endoftext|>",
|
122 |
"legacy": false,
|