garycaokai commited on
Commit
5007d45
1 Parent(s): 6a9e43b

add chat_template

Browse files
Files changed (1) hide show
  1. tokenizer_config.json +1 -0
tokenizer_config.json CHANGED
@@ -14,5 +14,6 @@
14
  "padding_side": "left",
15
  "remove_space": false,
16
  "tokenizer_class": "ZhinaoTokenizer",
 
17
  "unk_token": "<unk>"
18
  }
 
14
  "padding_side": "left",
15
  "remove_space": false,
16
  "tokenizer_class": "ZhinaoTokenizer",
17
+ "chat_template": "{% for message in messages %}{% if loop.first and messages[0]['role'] != 'system' %}{{ '<|im_start|>system\nYou are a helpful assistant<|im_end|>\n' }}{% endif %}{{'<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>' + '\n'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}",
18
  "unk_token": "<unk>"
19
  }