williambarberjr commited on
Commit
1442400
·
verified ·
1 Parent(s): 10e6adc

Upload template_chatml.jinja with huggingface_hub

Browse files
Files changed (1) hide show
  1. template_chatml.jinja +3 -0
template_chatml.jinja ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ {% for message in messages %}{{'<|im_start|>' + message['role'] + '\n' + message['content']}}{% if (loop.last and
2
+ add_generation_prompt) or not loop.last %}{{ '<|im_end|>' + '\n'}}{% endif %}{% endfor %}
3
+ {% if add_generation_prompt and messages[-1]['role'] != 'assistant' %}{{ '<|im_start|>assistant\n' }}{% endif %}