hmellor commited on
Commit
4ffd8b6
1 Parent(s): d869ce1

Add `chat_template` to `tokenizer_config.json`

Browse files

Adds an Alpaca style `chat_template` so that this checkpoint can be used conversationally.

Files changed (1) hide show
  1. tokenizer_config.json +1 -0
tokenizer_config.json CHANGED
@@ -7,6 +7,7 @@
7
  "rstrip": false,
8
  "single_word": false
9
  },
 
10
  "clean_up_tokenization_spaces": false,
11
  "eos_token": {
12
  "__type": "AddedToken",
 
7
  "rstrip": false,
8
  "single_word": false
9
  },
10
+ "chat_template": "{% for message in messages %}{% if message['role'] == 'system' %}{% endif %}{% if message['role'] == 'user' %}{{ '### Instruction:\n' }}{% endif %}{% if message['role'] == 'assistant' %}{{ '### Response:\n' }}{% endif %}{{ message['content'].strip() }}{% if not loop.last %}{{ '\n\n' }}{% endif %}{% if message['role'] == 'user' and loop.last %}{{ '### Response:\n' }}{% endif %}{% endfor %}",
11
  "clean_up_tokenization_spaces": false,
12
  "eos_token": {
13
  "__type": "AddedToken",