alicecomfy commited on
Commit
cf06159
1 Parent(s): 88fea41

Partial reversion of changes.

Browse files
Files changed (1) hide show
  1. tokenizer_config.json +2 -2
tokenizer_config.json CHANGED
@@ -44,9 +44,9 @@
44
  }
45
  },
46
  "bos_token": "<s>",
47
- "chat_template": "{% for message in messages %}{{'<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>' + '\n'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}",
48
  "clean_up_tokenization_spaces": false,
49
- "eos_token": "<|im_end|>",
50
  "legacy": false,
51
  "model_max_length": 1000000000000000019884624838656,
52
  "pad_token": "<unk>",
 
44
  }
45
  },
46
  "bos_token": "<s>",
47
+ "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' %}{{ '[INST] ' + message['content'] + ' [/INST]' }}{% elif message['role'] == 'assistant' %}{{ message['content'] + eos_token}}{% else %}{{ raise_exception('Only user and assistant roles are supported!') }}{% endif %}{% endfor %}",
48
  "clean_up_tokenization_spaces": false,
49
+ "eos_token": "<s>",
50
  "legacy": false,
51
  "model_max_length": 1000000000000000019884624838656,
52
  "pad_token": "<unk>",