EC2 Default User commited on
Commit
6551fad
1 Parent(s): fb517dd

add chat prompt template

Browse files
Files changed (1) hide show
  1. tokenizer_config.json +1 -0
tokenizer_config.json CHANGED
@@ -38,5 +38,6 @@
38
  "spaces_between_special_tokens": false,
39
  "tokenizer_class": "LlamaTokenizer",
40
  "unk_token": "<unk>",
 
41
  "use_default_system_prompt": false
42
  }
 
38
  "spaces_between_special_tokens": false,
39
  "tokenizer_class": "LlamaTokenizer",
40
  "unk_token": "<unk>",
41
+ "chat_template": "{% for message in messages %}{% if message['role'] == 'user' %}{{ '\n\nHuman: ' + message['content']}}{% elif message['role'] == 'assistant' %}{{ '\n\nAssistant: ' + message['content'] + eos_token}}{% else %}{{ raise_exception('Only user and assistant roles are supported!') }}{% endif %}{% if loop.last and add_generation_prompt %}{{ '\n\nAssistant: ' }}{% endif %}{% endfor %}",
42
  "use_default_system_prompt": false
43
  }