neph1 commited on
Commit
2f6aec0
·
verified ·
1 Parent(s): fa8abcc

Upload tokenizer

Browse files
Files changed (1) hide show
  1. tokenizer_config.json +1 -1
tokenizer_config.json CHANGED
@@ -203,7 +203,7 @@
203
  "<|video_pad|>"
204
  ],
205
  "bos_token": null,
206
- "chat_template": "{% if 'role' in messages[0] %}{{ bos_token }}{% if messages[0]['role'] == 'system' %}{% if messages[1]['role'] == 'user' %}{{ '[INST] ' + messages[0]['content'] + ' ' + messages[1]['content'] + ' [/INST]' }}{% set loop_messages = messages[2:] %}{% else %}{{ '[INST] ' + messages[0]['content'] + ' [/INST]' }}{% set loop_messages = messages[1:] %}{% endif %}{% else %}{% set loop_messages = messages %}{% endif %}{% for message in loop_messages %}{% 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 %}{% else %}{{ bos_token }}{% if messages[0]['from'] == 'system' %}{% if messages[1]['from'] == 'human' %}{{ '[INST] ' + messages[0]['value'] + ' ' + messages[1]['value'] + ' [/INST]' }}{% set loop_messages = messages[2:] %}{% else %}{{ '[INST] ' + messages[0]['value'] + ' [/INST]' }}{% set loop_messages = messages[1:] %}{% endif %}{% else %}{% set loop_messages = messages %}{% endif %}{% for message in loop_messages %}{% if message['from'] == 'human' %}{{ '[INST] ' + message['value'] + ' [/INST]' }}{% elif message['from'] == 'gpt' %}{{ message['value'] + eos_token }}{% else %}{{ raise_exception('Only user and assistant roles are supported!') }}{% endif %}{% endfor %}{% endif %}",
207
  "clean_up_tokenization_spaces": false,
208
  "eos_token": "<|im_end|>",
209
  "errors": "replace",
 
203
  "<|video_pad|>"
204
  ],
205
  "bos_token": null,
206
+ "chat_template": "{% if 'role' in messages[0] %}{{ bos_token }}{% if messages[0]['role'] == 'system' %}{{ messages[0]['content'] + '\n' }}{% set loop_messages = messages[1:] %}{% else %}{{ 'You are a helpful assistant to the user\n' }}{% set loop_messages = messages %}{% endif %}{% for message in loop_messages %}{% if message['role'] == 'user' %}{{ '>>> User: ' + message['content'] + '\n' }}{% elif message['role'] == 'assistant' %}{{ '>>> Assistant: ' + message['content'] + eos_token + '\n' }}{% else %}{{ raise_exception('Only user and assistant roles are supported!') }}{% endif %}{% endfor %}{% if add_generation_prompt %}{{ '>>> Assistant: ' }}{% endif %}{% else %}{{ bos_token }}{% if messages[0]['from'] == 'system' %}{{ messages[0]['value'] + '\n' }}{% set loop_messages = messages[1:] %}{% else %}{{ 'You are a helpful assistant to the user\n' }}{% set loop_messages = messages %}{% endif %}{% for message in loop_messages %}{% if message['from'] == 'human' %}{{ '>>> User: ' + message['value'] + '\n' }}{% elif message['from'] == 'gpt' %}{{ '>>> Assistant: ' + message['value'] + eos_token + '\n' }}{% else %}{{ raise_exception('Only user and assistant roles are supported!') }}{% endif %}{% endfor %}{% if add_generation_prompt %}{{ '>>> Assistant: ' }}{% endif %}{% endif %}",
207
  "clean_up_tokenization_spaces": false,
208
  "eos_token": "<|im_end|>",
209
  "errors": "replace",