Added Chat Template

#5
by lcahill - opened
Files changed (1) hide show
  1. tokenizer_config.json +1 -0
tokenizer_config.json CHANGED
@@ -33,6 +33,7 @@
33
  "model_max_length": 1000000000000000019884624838656,
34
  "pad_token": null,
35
  "sp_model_kwargs": {},
 
36
  "spaces_between_special_tokens": false,
37
  "tokenizer_class": "LlamaTokenizer",
38
  "unk_token": "<unk>",
 
33
  "model_max_length": 1000000000000000019884624838656,
34
  "pad_token": null,
35
  "sp_model_kwargs": {},
36
+ "chat_template": "{% for message in messages %}{% if message['role'] == 'system' %}{% if message['content']%}{{'### System:\n' + message['content']+'\n\n'}}{% endif %}{% elif message['role'] == 'user' %}{{'### User:\n' + message['content']+'\n\n'}}{% elif message['role'] == 'assistant' %}{{'### Assistant:\n' + message['content']}}{% endif %}{% if loop.last and add_generation_prompt %}{{ '### Assistant:\n' }}{% endif %}{% endfor %}",
37
  "spaces_between_special_tokens": false,
38
  "tokenizer_class": "LlamaTokenizer",
39
  "unk_token": "<unk>",