YokaiKoibito commited on
Commit
c4276c5
1 Parent(s): a94f6a8

Add chat_template value to tokenizer_config.json

Browse files

The original model's tokenizer_config.json lacked a tokenizer.chat_template setting, adding one based on its model card and observed behavior.

Files changed (1) hide show
  1. tokenizer_config.json +1 -0
tokenizer_config.json CHANGED
@@ -9,6 +9,7 @@
9
  "rstrip": false,
10
  "single_word": false
11
  },
 
12
  "clean_up_tokenization_spaces": false,
13
  "eos_token": {
14
  "__type": "AddedToken",
 
9
  "rstrip": false,
10
  "single_word": false
11
  },
12
+ "chat_template": "{{ bos_token }}{% 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'] == 'user' %}{{ ‘### HUMAN:\\n’ + message['content'] + ‘\\n\\n’ }}{% elif message['role'] == 'assistant' %}{{ ‘### RESPONSE:\\n’ + message['content'] + eos_token + ‘\\n\\n' }}{% else %}{{ raise_exception('Only user and assistant roles are supported!') }}{% endif %}{% endfor %}{{ ‘### RESPONSE:\\n’ }}",
13
  "clean_up_tokenization_spaces": false,
14
  "eos_token": {
15
  "__type": "AddedToken",