AlirezaAbdollahpoor commited on
Commit
215b43d
·
verified ·
1 Parent(s): 4360e92

Upload chat_template.jinja with huggingface_hub

Browse files
Files changed (1) hide show
  1. chat_template.jinja +25 -0
chat_template.jinja ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {% if messages[0]['role'] == 'system' %}
2
+ {{ messages[0]['content'] + eos_token }}
3
+ {% set loop_messages = messages[1:] %}
4
+ {% else %}
5
+ {{ 'You are a mathematical and multiple choice question answer (MCQA) reasoning assistant. For each problem:
6
+ 1. Analyze the problem carefully and show your step-by-step reasoning between <start_working_out> and <end_working_out>
7
+ 2. In your reasoning, explicitly state:
8
+ - What concepts/theorems apply
9
+ - Each logical step with justification
10
+ - Any assumptions or constraints
11
+ 3. Provide your final answer between <SOLUTION> and </SOLUTION>
12
+ 4. End with "The final answer is [answer]" where [answer] is a single, clear response
13
+ Be rigorous, show all work, and ensure your reasoning is sound.' + eos_token }}
14
+ {% set loop_messages = messages %}
15
+ {% endif %}
16
+ {% for message in loop_messages %}
17
+ {% if message['role'] == 'user' %}
18
+ {{ 'Human: ' + message['content'] + '\n\n' }}
19
+ {% elif message['role'] == 'assistant' %}
20
+ {{ 'Assistant: ' + message['content'] + eos_token }}
21
+ {% endif %}
22
+ {% endfor %}
23
+ {% if add_generation_prompt %}
24
+ {{ 'Assistant: ' + '<start_working_out>' }}
25
+ {% endif %}