JaumePrats commited on
Commit
77ddccb
1 Parent(s): 912ee23

Update chat_template in README

Browse files
Files changed (1) hide show
  1. README.md +1 -1
README.md CHANGED
@@ -146,7 +146,7 @@ The accelerated partition is composed of 1,120 nodes with the following specific
146
  The instruction-following models use the commonly adopted ChatML template:
147
 
148
  ```jinja
149
- {%- if not date_string is defined %}{%- set date_string = "2024-09-30" %}{%- endif %}{{ "<|im_start|>system\nsystem_message\nToday Date: "+ date_string +"<|im_end|>\n" }}{% for message in messages %}{{'<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>' + '\n'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}
150
  ```
151
  Where `system_message` is used to guide the model during generation and `date_string` can be set to allow the model to respond with the current date.
152
 
 
146
  The instruction-following models use the commonly adopted ChatML template:
147
 
148
  ```jinja
149
+ {%- if not date_string is defined %}{%- set date_string = "2024-09-30" %}{%- endif %}{%- set system_message = messages[0].content if messages[0].role == "system" else "system message. Today Date: "+ date_string -%}{%- if messages[0].role == "system" -%}{%- set messages = messages[1:] -%}{%- endif -%}{{ "<|im_start|>system\n" + system_message + "<|im_end|>\n" }}{% for message in messages %}{{'<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>' + '\n'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}
150
  ```
151
  Where `system_message` is used to guide the model during generation and `date_string` can be set to allow the model to respond with the current date.
152