add newlines and thinking tokens to template to avoid having to compute 3 extra tokens per generation in chat completion+reasoning

#83
Files changed (1) hide show
  1. chat_template.jinja +2 -2
chat_template.jinja CHANGED
@@ -339,9 +339,9 @@
339
 
340
  {%- if add_generation_prompt -%}
341
  {%- if ns.prev_message_type != 'tool_response' and ns.prev_message_type != 'tool_call' -%}
342
- {{- '<|turn>model\n' -}}
343
  {%- if not enable_thinking | default(false) -%}
344
- {{- '<|channel>thought\n<channel|>' -}}
345
  {%- endif -%}
346
  {%- endif -%}
347
  {%- endif -%}
 
339
 
340
  {%- if add_generation_prompt -%}
341
  {%- if ns.prev_message_type != 'tool_response' and ns.prev_message_type != 'tool_call' -%}
342
+ {{- '<|turn>model\n<|channel>thought\n' -}}
343
  {%- if not enable_thinking | default(false) -%}
344
+ {{- '<channel|>' -}}
345
  {%- endif -%}
346
  {%- endif -%}
347
  {%- endif -%}