piotr25691 commited on
Commit
3438e81
1 Parent(s): f9d3ac0

enable system prompts

Browse files
Files changed (2) hide show
  1. special_tokens_map.json +2 -2
  2. tokenizer_config.json +3 -3
special_tokens_map.json CHANGED
@@ -1,7 +1,7 @@
1
  {
2
  "additional_special_tokens": [
3
- "<start_of_turn>",
4
- "<end_of_turn>"
5
  ],
6
  "bos_token": {
7
  "content": "<bos>",
 
1
  {
2
  "additional_special_tokens": [
3
+ "<start_of_turn>",
4
+ "<end_of_turn>"
5
  ],
6
  "bos_token": {
7
  "content": "<bos>",
tokenizer_config.json CHANGED
@@ -1996,11 +1996,11 @@
1996
  }
1997
  },
1998
  "additional_special_tokens": [
1999
- "<start_of_turn>",
2000
- "<end_of_turn>"
2001
  ],
2002
  "bos_token": "<bos>",
2003
- "chat_template": "{{ bos_token }}{% if messages[0]['role'] == 'system' %}{{ raise_exception('System role not supported') }}{% endif %}{% 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'] == 'assistant') %}{% set role = 'model' %}{% else %}{% set role = message['role'] %}{% endif %}{{ '<start_of_turn>' + role + '\n' + message['content'] | trim + '<end_of_turn>\n' }}{% endfor %}{% if add_generation_prompt %}{{'<start_of_turn>model\n'}}{% endif %}",
2004
  "clean_up_tokenization_spaces": false,
2005
  "eos_token": "<eos>",
2006
  "model_max_length": 1000000000000000019884624838656,
 
1996
  }
1997
  },
1998
  "additional_special_tokens": [
1999
+ "<start_of_turn>",
2000
+ "<end_of_turn>"
2001
  ],
2002
  "bos_token": "<bos>",
2003
+ "chat_template": "{{ bos_token }}{% if messages[0]['role'] == 'system' %}{{ messages[0]['content'] + '\n' }}{% endif %}{% for message in messages %}{% if (message['role'] == 'user') != ((loop.index0 + 1) % 2 == 0) %}{{ raise_exception('Conversation roles must alternate user/assistant/user/assistant/...') }}{% endif %}{% if (message['role'] == 'assistant') %}{% set role = 'model' %}{% else %}{% set role = message['role'] %}{% endif %}{{ '<start_of_turn>' + role + '\n' + message['content'] | trim + '<end_of_turn>\n' }}{% endfor %}{% if add_generation_prompt %}{{'<start_of_turn>model\n'}}{% endif %}",
2004
  "clean_up_tokenization_spaces": false,
2005
  "eos_token": "<eos>",
2006
  "model_max_length": 1000000000000000019884624838656,