Tostino commited on
Commit
aed7c2d
1 Parent(s): 723f53b

Update template for more testing.

Browse files
Files changed (1) hide show
  1. tokenizer_config.json +1 -1
tokenizer_config.json CHANGED
@@ -37,7 +37,7 @@
37
  },
38
  "additional_special_tokens": [],
39
  "bos_token": "<s>",
40
- "chat_template": "<#meta#>\n- Date: {{ date }}\n- Task: {{ task }}\n<#system#>\n{{ system_message }}\n<#chat#>\n{% for message in messages %}{% if message['role'] == 'user' %}<#user#>\n{{ message['content'] }}{% elif message['role'] == 'bot' %}<#bot#>\n{{ message['content'] }}{% elif message['role'] == 'user_context' %}<#user_context#>\n{{ message['content'] }}{% endif %}{% endfor %}",
41
  "clean_up_tokenization_spaces": false,
42
  "eos_token": "</s>",
43
  "legacy": false,
 
37
  },
38
  "additional_special_tokens": [],
39
  "bos_token": "<s>",
40
+ "chat_template": "<#meta#>\n- Date: {{ (messages|selectattr('role', 'equalto', 'meta-current_date')|list|last).content if (messages|selectattr('role', 'equalto', 'meta-current_date')|list) else '' }}\n- Task: {{ (messages|selectattr('role', 'equalto', 'meta-task_name')|list|last).content if (messages|selectattr('role', 'equalto', 'meta-task_name')|list) else '' }}\n<#system#>\n{{ (messages|selectattr('role', 'equalto', 'system')|list|last).content if (messages|selectattr('role', 'equalto', 'system')|list) else '' }}\n<#chat#>\n{% for message in messages %}\n {% if message['role'] == 'user' %}\n<#user#>\n{{ message['content'] }}\n {% elif message['role'] == 'bot' %}\n<#bot#>\n{{ message['content'] }}\n{% elif message['role'] == 'user_context' %}\n<#user_context#>\n{{ message['content'] }}\n{% endif %}\n{% endfor %}\n{% if add_generation_prompt or (messages[-1]['role'] == 'user' or messages[-1]['role'] == 'user_context') %}\n<#bot#>\n{% endif %}",
41
  "clean_up_tokenization_spaces": false,
42
  "eos_token": "</s>",
43
  "legacy": false,