liamcripwell commited on
Commit
5f77ca1
·
verified ·
1 Parent(s): b3fc539

Update chat template

Browse files
Files changed (1) hide show
  1. tokenizer_config.json +1 -1
tokenizer_config.json CHANGED
@@ -277,7 +277,7 @@
277
  "</box>"
278
  ],
279
  "bos_token": null,
280
- "chat_template": "{{% for message in messages %}\n {%- if message['role'] == 'user' and template -%}\n {{- '<|im_start|>' + message['role'] -}}\n {{ '\n# Template:' }}\n {{- '\n' + template }}\n {% if examples %}\n {{- '# Examples:' }}\n {% for example in examples %}\n {{- '## Input:\n' }}\n {{- example['input'] + '\n' }}\n {{- '## Output:\n' }}\n {{- example['output'] | trim }}\n {% endfor %}\n {%- endif %}\n {{- '# Context:' }}\n {% if message['content'] is string %}\n {{- message['content'] | trim }}\n {% else %}\n {% for content in message['content'] %}\n {%- if content is string %}\n {{- content | trim }}\n {%- elif content['type'] == 'text' %}\n {{- content['text'] | trim }}\n {%- endif %}\n {% endfor %}\n {% endif %}\n {{- '<|im_end|> '}}\n {% else %}\n {{- '<|im_start|>' + message['role'] }}\n {% if message['content'] is string %}\n {{- message['content'] | trim }}\n {% else %}\n {% for content in message['content'] %}\n {%- if content is string %}\n {{- content | trim }}\n {%- elif content['type'] == 'text' %}\n {{- content['text'] | trim }}\n {%- endif %}\n {% endfor %}\n {% endif %}\n {{- '<|im_end|> '}}\n {% endif %}\n{% endfor -%}\n{%- if add_generation_prompt %}\n {{- '<|im_start|>assistant' }}\n{% endif -%}\n",
281
  "clean_up_tokenization_spaces": false,
282
  "eos_token": "<|im_end|>",
283
  "errors": "replace",
 
277
  "</box>"
278
  ],
279
  "bos_token": null,
280
+ "chat_template": "{% for message in messages %}\n {%- if message['role'] == 'user' and template -%}\n {{- '<|im_start|>' + message['role'] -}}\n {{ '\n# Template:' }}\n {{- '\n' + template }}\n {% if examples %}\n {{- '# Examples:' }}\n {% for example in examples %}\n {{- '## Input:\n' }}\n {{- example['input'] + '\n' }}\n {{- '## Output:\n' }}\n {{- example['output'] | trim }}\n {% endfor %}\n {%- endif %}\n {{- '# Context:' }}\n {% if message['content'] is string %}\n {{- message['content'] | trim }}\n {% else %}\n {% for content in message['content'] %}\n {%- if content is string %}\n {{- content | trim }}\n {%- elif content['type'] == 'text' %}\n {{- content['text'] | trim }}\n {%- endif %}\n {% endfor %}\n {% endif %}\n {{- '<|im_end|> '}}\n {% else %}\n {{- '<|im_start|>' + message['role'] }}\n {% if message['content'] is string %}\n {{- message['content'] | trim }}\n {% else %}\n {% for content in message['content'] %}\n {%- if content is string %}\n {{- content | trim }}\n {%- elif content['type'] == 'text' %}\n {{- content['text'] | trim }}\n {%- endif %}\n {% endfor %}\n {% endif %}\n {{- '<|im_end|> '}}\n {% endif %}\n{% endfor -%}\n{%- if add_generation_prompt %}\n {{- '<|im_start|>assistant' }}\n{% endif -%}\n",
281
  "clean_up_tokenization_spaces": false,
282
  "eos_token": "<|im_end|>",
283
  "errors": "replace",