YongganFu commited on
Commit
7c1ba37
·
verified ·
1 Parent(s): 1c8770d

Upload tokenizer

Browse files
Files changed (1) hide show
  1. chat_template.jinja +0 -7
chat_template.jinja CHANGED
@@ -11,7 +11,6 @@
11
  {% endmacro %}
12
  {%- set enable_thinking = enable_thinking if enable_thinking is defined else False %}
13
  {%- set truncate_history_thinking = truncate_history_thinking if truncate_history_thinking is defined else True %}
14
-
15
  {%- set ns = namespace(last_user_idx = -1) %}
16
  {%- set loop_messages = messages %}
17
  {%- for m in loop_messages %}
@@ -19,7 +18,6 @@
19
  {%- set ns.last_user_idx = loop.index0 %}
20
  {%- endif %}
21
  {%- endfor %}
22
-
23
  {%- if messages[0]["role"] == "system" %}
24
  {%- set system_message = messages[0]["content"] %}
25
  {%- set loop_messages = messages[1:] %}
@@ -88,11 +86,8 @@
88
  {{- '\n</function>' }}
89
  {%- endfor %}
90
  {{- "\n</tools>" }}
91
-
92
  {{- '\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n<tool_call>\n<function=example_function_name>\n<parameter=example_parameter_1>\nvalue_1\n</parameter>\n<parameter=example_parameter_2>\nThis is the value for the second parameter\nthat can span\nmultiple lines\n</parameter>\n</function>\n</tool_call>\n\n<IMPORTANT>\nReminder:\n- Function calls MUST follow the specified format: an inner <function=...></function> block must be nested within <tool_call></tool_call> XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls\n</IMPORTANT>' }}
93
  {%- endif %}
94
-
95
-
96
  {%- if system_message is defined %}
97
  {{- '<|im_end|>\n' }}
98
  {%- else %}
@@ -100,7 +95,6 @@
100
  {{- '<|im_end|>\n' }}
101
  {%- endif %}
102
  {%- endif %}
103
-
104
  {%- for message in loop_messages %}
105
  {%- if message.role == "assistant" %}
106
  {# Add reasoning content in to content field for unified processing below. #}
@@ -194,7 +188,6 @@
194
  {{- '<|im_start|>' + message.role + '\n' + message.content + '<|im_end|>\n' }}
195
  {%- endif %}
196
  {%- endfor %}
197
-
198
  {%- if add_generation_prompt %}
199
  {%- if enable_thinking %}
200
  {{- '<|im_start|>assistant\n<think>\n' }}
 
11
  {% endmacro %}
12
  {%- set enable_thinking = enable_thinking if enable_thinking is defined else False %}
13
  {%- set truncate_history_thinking = truncate_history_thinking if truncate_history_thinking is defined else True %}
 
14
  {%- set ns = namespace(last_user_idx = -1) %}
15
  {%- set loop_messages = messages %}
16
  {%- for m in loop_messages %}
 
18
  {%- set ns.last_user_idx = loop.index0 %}
19
  {%- endif %}
20
  {%- endfor %}
 
21
  {%- if messages[0]["role"] == "system" %}
22
  {%- set system_message = messages[0]["content"] %}
23
  {%- set loop_messages = messages[1:] %}
 
86
  {{- '\n</function>' }}
87
  {%- endfor %}
88
  {{- "\n</tools>" }}
 
89
  {{- '\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n<tool_call>\n<function=example_function_name>\n<parameter=example_parameter_1>\nvalue_1\n</parameter>\n<parameter=example_parameter_2>\nThis is the value for the second parameter\nthat can span\nmultiple lines\n</parameter>\n</function>\n</tool_call>\n\n<IMPORTANT>\nReminder:\n- Function calls MUST follow the specified format: an inner <function=...></function> block must be nested within <tool_call></tool_call> XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls\n</IMPORTANT>' }}
90
  {%- endif %}
 
 
91
  {%- if system_message is defined %}
92
  {{- '<|im_end|>\n' }}
93
  {%- else %}
 
95
  {{- '<|im_end|>\n' }}
96
  {%- endif %}
97
  {%- endif %}
 
98
  {%- for message in loop_messages %}
99
  {%- if message.role == "assistant" %}
100
  {# Add reasoning content in to content field for unified processing below. #}
 
188
  {{- '<|im_start|>' + message.role + '\n' + message.content + '<|im_end|>\n' }}
189
  {%- endif %}
190
  {%- endfor %}
 
191
  {%- if add_generation_prompt %}
192
  {%- if enable_thinking %}
193
  {{- '<|im_start|>assistant\n<think>\n' }}