TwIL-LM / chat_template.jinja
cutterdalton-webai's picture
Rename merged/chat_template.jinja to chat_template.jinja
34f08b1 verified
Raw
History Blame
368 Bytes
{% for message in messages %}{% if loop.first and messages[0]['role'] != 'system' %}{{ '<|im_start|>system
You are a helpful AI assistant named SmolLM, trained by Hugging Face<|im_end|>
' }}{% endif %}{{'<|im_start|>' + message['role'] + '
' + message['content'] + '<|im_end|>' + '
'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant
' }}{% endif %}