jimfhahn commited on
Commit
4f83423
·
verified ·
1 Parent(s): 9650efe

Add chat_template for HuggingFace router compatibility

Browse files
Files changed (1) hide show
  1. tokenizer_config.json +1 -0
tokenizer_config.json CHANGED
@@ -229,6 +229,7 @@
229
  }
230
  },
231
  "bos_token": null,
 
232
  "clean_up_tokenization_spaces": true,
233
  "eos_token": "|||IP_ADDRESS|||",
234
  "extra_special_tokens": {},
 
229
  }
230
  },
231
  "bos_token": null,
232
+ "chat_template": "{% for message in messages %}{% if message['role'] == 'system' %}<|im_start|>system\n{{ message['content'] }}<|im_end|>\n{% elif message['role'] == 'user' %}<|im_start|>user\n{{ message['content'] }}<|im_end|>\n{% elif message['role'] == 'assistant' %}<|im_start|>assistant\n{{ message['content'] }}<|im_end|>\n{% endif %}{% endfor %}{% if add_generation_prompt %}<|im_start|>assistant\n{% endif %}",
233
  "clean_up_tokenization_spaces": true,
234
  "eos_token": "|||IP_ADDRESS|||",
235
  "extra_special_tokens": {},