Ahmadzei's picture
update 1
57bdca5
raw
history blame
393 Bytes
Our default template for models that don't have a class-specific template follows the
ChatML format, and this is a good, flexible choice for many use-cases. It looks like this:
{% for message in messages %}
{{'<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>' + '\n'}}
{% endfor %}
If you like this one, here it is in one-liner form, ready to copy into your code.