Text Generation
Transformers
Safetensors
PyTorch
English
llama
nvidia
llama-3
conversational
text-generation-inference
ameyasunilm commited on
Commit
d30e510
·
verified ·
1 Parent(s): 572ada0

Adding system block with "detailed thinking off" even when system role not present in messages

Browse files
llama_nemotron_nano_generic_tool_calling.jinja CHANGED
@@ -1,7 +1,9 @@
1
  {%- if tools %}
2
  {{- '<|begin_of_text|><|start_header_id|>system<|end_header_id|>\n\n' -}}
3
- {%- if messages[0].role == 'system' -%}
4
  {{- messages[0].content + '\n\n' -}}
 
 
5
  {%- endif -%}
6
  {{- '<AVAILABLE_TOOLS>[' -}}
7
  {%- for tool in tools -%}
@@ -9,9 +11,13 @@
9
  {%- endfor -%}
10
  {{- ']</AVAILABLE_TOOLS>' -}}{{- '<|eot_id|>' -}}
11
  {%- else %}
12
- {%- if messages[0].role == 'system' %}
13
- {{- '<|begin_of_text|><|start_header_id|>system<|end_header_id|>\n\n' + messages[0].content + '<|eot_id|>' -}}
 
 
 
14
  {%- endif %}
 
15
  {%- endif %}
16
  {%- for message in messages -%}
17
  {%- if (message.role == 'user') -%}
 
1
  {%- if tools %}
2
  {{- '<|begin_of_text|><|start_header_id|>system<|end_header_id|>\n\n' -}}
3
+ {%- if messages[0].role == 'system' and messages[0].content != '' -%}
4
  {{- messages[0].content + '\n\n' -}}
5
+ {%- else -%}
6
+ {{- 'detailed thinking off\n\n' -}}
7
  {%- endif -%}
8
  {{- '<AVAILABLE_TOOLS>[' -}}
9
  {%- for tool in tools -%}
 
11
  {%- endfor -%}
12
  {{- ']</AVAILABLE_TOOLS>' -}}{{- '<|eot_id|>' -}}
13
  {%- else %}
14
+ {{- '<|begin_of_text|><|start_header_id|>system<|end_header_id|>\n\n' -}}
15
+ {%- if messages[0].role == 'system' and messages[0].content != '' -%}
16
+ {{- messages[0].content -}}
17
+ {%- else -%}
18
+ {{- 'detailed thinking off' -}}
19
  {%- endif %}
20
+ {{- '<|eot_id|>' -}}
21
  {%- endif %}
22
  {%- for message in messages -%}
23
  {%- if (message.role == 'user') -%}