Upload tokenizer_config.json with huggingface_hub
Browse files- tokenizer_config.json +2 -2
tokenizer_config.json
CHANGED
@@ -302,10 +302,10 @@
|
|
302 |
"<|extra0|>"
|
303 |
],
|
304 |
"bos_token": "<|endoftext|>",
|
305 |
-
"chat_template": "{%
|
306 |
"clean_up_tokenization_spaces": true,
|
307 |
"eos_token": "<|endoftext|>",
|
308 |
-
"model_max_length":
|
309 |
"pad_token": "<|endoftext|>",
|
310 |
"tokenizer_class": "GPT2Tokenizer",
|
311 |
"unk_token": "<|endoftext|>"
|
|
|
302 |
"<|extra0|>"
|
303 |
],
|
304 |
"bos_token": "<|endoftext|>",
|
305 |
+
"chat_template": "{% for message in messages %}\n{% if message['role'] == 'user' %}\n{{ '<|user|>\n' + message['content'] + eos_token }}\n{% elif message['role'] == 'system' %}\n{{ '<|system|>\n' + message['content'] + eos_token }}\n{% elif message['role'] == 'assistant' %}\n{{ '<|assistant|>\n' + message['content'] + eos_token }}\n{% endif %}\n{% if loop.last and add_generation_prompt %}\n{{ '<|assistant|>' }}\n{% endif %}\n{% endfor %}",
|
306 |
"clean_up_tokenization_spaces": true,
|
307 |
"eos_token": "<|endoftext|>",
|
308 |
+
"model_max_length": 2048,
|
309 |
"pad_token": "<|endoftext|>",
|
310 |
"tokenizer_class": "GPT2Tokenizer",
|
311 |
"unk_token": "<|endoftext|>"
|