Added chat template to tokenizer
Browse files- special_tokens_map.json +21 -3
- tokenizer_config.json +1 -0
special_tokens_map.json
CHANGED
@@ -1,5 +1,23 @@
|
|
1 |
{
|
2 |
-
"bos_token":
|
3 |
-
|
4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
}
|
|
|
1 |
{
|
2 |
+
"bos_token": {
|
3 |
+
"content": "<|endoftext|>",
|
4 |
+
"lstrip": false,
|
5 |
+
"normalized": true,
|
6 |
+
"rstrip": false,
|
7 |
+
"single_word": false
|
8 |
+
},
|
9 |
+
"eos_token": {
|
10 |
+
"content": "<|endoftext|>",
|
11 |
+
"lstrip": false,
|
12 |
+
"normalized": true,
|
13 |
+
"rstrip": false,
|
14 |
+
"single_word": false
|
15 |
+
},
|
16 |
+
"unk_token": {
|
17 |
+
"content": "<|endoftext|>",
|
18 |
+
"lstrip": false,
|
19 |
+
"normalized": true,
|
20 |
+
"rstrip": false,
|
21 |
+
"single_word": false
|
22 |
+
}
|
23 |
}
|
tokenizer_config.json
CHANGED
@@ -11,6 +11,7 @@
|
|
11 |
}
|
12 |
},
|
13 |
"bos_token": "<|endoftext|>",
|
|
|
14 |
"clean_up_tokenization_spaces": false,
|
15 |
"eos_token": "<|endoftext|>",
|
16 |
"extra_special_tokens": {},
|
|
|
11 |
}
|
12 |
},
|
13 |
"bos_token": "<|endoftext|>",
|
14 |
+
"chat_template": "{% for message in messages %}{% if message['role'] == 'system' %}System: {{ message['content'] }}\n{% endif %}{% if message['role'] == 'user' %}User: {{ message['content'] }}\n{% endif %}{% if message['role'] == 'assistant' %}Assistant: {{ message['content'] }}\n{% endif %}{% endfor %}",
|
15 |
"clean_up_tokenization_spaces": false,
|
16 |
"eos_token": "<|endoftext|>",
|
17 |
"extra_special_tokens": {},
|