lemon-mint commited on
Commit
0dba581
1 Parent(s): f4cc6fc

Update tokenizer_config.json

Browse files
Files changed (1) hide show
  1. tokenizer_config.json +1 -1
tokenizer_config.json CHANGED
@@ -2061,7 +2061,7 @@
2061
  "<|none1|>"
2062
  ],
2063
  "bos_token": "<|begin_of_text|>",
2064
- "chat_template": "{% if messages[0]['role'] == 'system' %}{% set system_message = messages[0]['content'] %}{% endif %}{% if system_message is defined %}{{ system_message }}{% endif %}{% for message in messages %}{% set content = message['content'] %}{% if message['role'] == 'user' %}{{ content }}{% elif message['role'] == 'assistant' %}{{ content + '\\n' }}{% endif %}{% endfor %}",
2065
  "clean_up_tokenization_spaces": true,
2066
  "eos_token": "<|end_of_text|>",
2067
  "model_input_names": [
 
2061
  "<|none1|>"
2062
  ],
2063
  "bos_token": "<|begin_of_text|>",
2064
+ "chat_template": "{{ bos_token }}{% if messages[0]['role'] == 'system' %}{{ raise_exception('System role not supported') }}{% endif %}{% for message in messages %}{% if (message['role'] == 'user') != (loop.index0 % 2 == 0) %}{{ raise_exception('Conversation roles must alternate user/assistant/user/assistant/...') }}{% endif %}{% if (message['role'] == 'assistant') %}{% set role = 'assistant' %}{% else %}{% set role = message['role'] %}{% endif %}{{ '<|im_start|>' + role + '\n' + message['content'] | trim + '<|im_end|>\n' }}{% endfor %}{% if add_generation_prompt %}{{'<|im_start|>assistant\n'}}{% endif %}",
2065
  "clean_up_tokenization_spaces": true,
2066
  "eos_token": "<|end_of_text|>",
2067
  "model_input_names": [