prince-canuma adrgrondin commited on
Commit
6c672dc
·
verified ·
1 Parent(s): ec5e1aa

Add chat_template.jinja (#1)

Browse files

- Add chat_template.jinja (cbddd26ff85d8a33f9d8dc8306b226deafe7a820)


Co-authored-by: Adrien Grondin <adrgrondin@users.noreply.huggingface.co>

Files changed (1) hide show
  1. chat_template.jinja +4 -0
chat_template.jinja ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {{bos_token}}{% for message in messages %}{{'<|im_start|>' + message['role'] + '
2
+ '}}{% if message['content'] is string %}{{ message['content'] }}{% else %}{% for content in message['content'] %}{% if content['type'] == 'image' %}{{ '<image>' }}{% elif content['type'] == 'text' %}{{ content['text'] }}{% endif %}{% endfor %}{% endif %}{{'<|im_end|>
3
+ '}}{% endfor %}{% if add_generation_prompt %}{{'<|im_start|>assistant
4
+ ' }}{% endif %}