FuxiTranyu-8B-SFT / tokenizer_config.json
rrjin's picture
Upload tokenizer_config.json with huggingface_hub
e698fdb verified
{
"add_prefix_space": false,
"added_tokens_decoder": {
"0": {
"content": "<|endoftext|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
}
},
"bos_token": "<|endoftext|>",
"chat_template": "{% if messages[0]['role'] == 'system' %}{% set loop_messages = messages[1:] %}{% set system_message = messages[0]['content'] %}{{ system_message }}{% else %}{% set loop_messages = messages %}{% endif %}{% for message in loop_messages %}{% if (message['role'] == 'user') != (loop.index0 % 2 == 0) %}{{ raise_exception('Conversation roles must alternate user/assistant/user/assistant/...') }}{% elif (message['role'] == 'assistant') != (loop.index0 % 2 == 1) %}{{ raise_exception('Conversation roles must alternate user/assistant/user/assistant/...') }}{% endif %}{% if message['role'] == 'user' %}{{'\n\n' + 'Human: ' + message['content']}}{% elif message['role'] == 'assistant' %}{{'\n\n' + 'Assistant: ' + message['content']}}{% endif %}{% endfor %}{% if add_generation_prompt and messages[-1]['role'] == 'user' %}{{ '\n\n' + 'Assistant:' }}{% endif %}",
"clean_up_tokenization_spaces": true,
"eos_token": "<|endoftext|>",
"model_max_length": 1024,
"pad_token": "<|endoftext|>",
"tokenizer_class": "GPT2Tokenizer",
"unk_token": "<|endoftext|>"
}