amir-ammar commited on
Commit
6bc2deb
·
verified ·
1 Parent(s): b121d05

Adaptive chat_template (head-to-head +0.092 vs old on clean Qs)

Browse files
Files changed (1) hide show
  1. chat_template.jinja +4 -2
chat_template.jinja CHANGED
@@ -1,5 +1,7 @@
1
  {%- set enable_thinking = true %}
2
- {%- if tools %}
 
 
3
  {{- '<|im_start|>system\n' }}
4
  {%- if messages[0].role == 'system' %}
5
  {{- messages[0].content + '\n\n' }}
@@ -87,4 +89,4 @@
87
  {%- if enable_thinking is defined and enable_thinking is false %}
88
  {{- '<think>\n\n</think>\n\n' }}
89
  {%- endif %}
90
- {%- endif %}
 
1
  {%- set enable_thinking = true %}
2
+ {%- set flab_boxed_instruction = "You are an expert multiple-choice solver. Decide how much to reason based on the question:\n- For questions needing calculation, multi-step deduction, or scientific reasoning (chemistry, physics, math, biology mechanisms, law analysis, economics), think step-by-step inside <think>...</think> before answering. Eliminate options one by one.\n- For simple factual recall (history dates, definitions, vocabulary), you may answer directly with a brief thought.\nALWAYS end every response with exactly one final answer in the form \\boxed{LETTER}, where LETTER is one of A B C D E F G H I J. Never omit the final boxed answer. If unsure, pick the most likely option and box it — never refuse." %}
3
+
4
+ {%- if flab_boxed_instruction %}{{ '<|im_start|>system\n' + flab_boxed_instruction + '<|im_end|>\n' }}{%- endif %}{%- if tools %}
5
  {{- '<|im_start|>system\n' }}
6
  {%- if messages[0].role == 'system' %}
7
  {{- messages[0].content + '\n\n' }}
 
89
  {%- if enable_thinking is defined and enable_thinking is false %}
90
  {{- '<think>\n\n</think>\n\n' }}
91
  {%- endif %}
92
+ {%- endif %}