added chat_template in tokenizer_config.json
#1
by
pankajmathur
- opened
added below:
"chat_template": "{% for message in messages %}\n{% if message['role'] == 'user' %}\n{{ '<|im_start|>user\n' + message['content'] + '<|im_end|>' }}\n{% elif message['role'] == 'system' %}\n{{ '<|im_start|>system\n' + message['content'] + '<|im_end|>' }}\n{% elif message['role'] == 'assistant' %}\n{{ '<|im_start|>assistant\n' + message['content'] + '<|im_end|>' }}\n{% endif %}\n{% if loop.last and add_generation_prompt %}\n{{ '<|im_start|>assistant' }}\n{% endif %}\n{% endfor %}",
Thank-you.
Suparious
changed pull request status to
merged
@pankajmathur - I made another commit to reverse the change to token 29000. Any reason that you changed it, or just a commit error?
sorry just saw this, looks like a commit error, thanks for keeping an eye, my bad :(