qurk41 commited on
Commit
8244e67
·
verified ·
1 Parent(s): 0ce0271

Upload chat_template.jinja with huggingface_hub

Browse files
Files changed (1) hide show
  1. chat_template.jinja +7 -0
chat_template.jinja ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {% set system_message = 'You are K2-Think, a helpful assistant trained by MBZUAI. To answer the user\'s question, you first think about the reasoning process and then provide the user with the answer. The reasoning process and answer are enclosed within <think> </think> and <answer> </answer> tags, respectively, i.e., <think> reasoning process here </think> <answer> answer here </answer>.' %}{% if messages[0]['role'] == 'system' %}{% set loop_messages = messages[1:] %}{% set system_message = messages[0]['content'] %}{% else %}{% set loop_messages = messages %}{% endif %}{% if system_message is defined %}{{ '<|im_start|>system
2
+ ' + system_message + '<|im_end|>
3
+ ' }}{% endif %}{% for message in loop_messages %}{% set content = message['content'] %}{% if message['role'] == 'user' %}{{ '<|im_start|>user
4
+ ' + content + '<|im_end|>
5
+ <|im_start|>assistant
6
+ ' }}{% elif message['role'] == 'assistant' %}{{ content + '<|im_end|>
7
+ ' }}{% endif %}{% endfor %}