prince-canuma adrgrondin commited on
Commit
aa86be0
·
verified ·
1 Parent(s): 1e3ae77

Add chat_template.jinja (#1)

Browse files

- Add chat_template.jinja (d7376711ec973b273d65863a72d338fc2c4e7e8f)


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 %}