ShinoharaHare commited on
Commit
35f99a4
·
verified ·
1 Parent(s): cc2b2d3

Upload processor

Browse files
Files changed (1) hide show
  1. tokenizer_config.json +1 -1
tokenizer_config.json CHANGED
@@ -125,7 +125,7 @@
125
  }
126
  },
127
  "bos_token": "<s>",
128
- "chat_template": "{% for message in messages %}{% if message['role'] == 'system' and message['content'] %}{{'<|system|>\n' + message['content'] + '<|end|>\n'}}{% elif message['role'] == 'user' %}{{'<|user|>\n' + message['content'] + '<|end|>\n'}}{% elif message['role'] == 'assistant' %}{{'<|assistant|>\n' + message['content'] + '<|end|>\n'}}{% endif %}{% endfor %}{% if add_generation_prompt %}{{ '<|assistant|>\n' }}{% else %}{{ eos_token }}{% endif %}",
129
  "clean_up_tokenization_spaces": false,
130
  "eos_token": "<|endoftext|>",
131
  "legacy": false,
 
125
  }
126
  },
127
  "bos_token": "<s>",
128
+ "chat_template": "{% set is_splitted = index is defined and length is defined %}\n{% for message in messages %}\n {% set content = message['content'] + '<|end|>\\n' %}\n {% if message['role'] != 'assistant' or not is_splitted %}\n {% set content = '<|' + message['role'] + '|>\\n' + content %}\n {% endif %}\n {% if (is_splitted and index == 0 and loop.index0 == 0) or (not is_splitted and loop.index0 == 0) %}\n {% set content = bos_token + content %}\n {% endif %}\n {{- content -}}\n{% endfor %}\n{% if add_generation_prompt %}\n {{- '<|assistant|>\\n' -}}\n{% endif %}\n",
129
  "clean_up_tokenization_spaces": false,
130
  "eos_token": "<|endoftext|>",
131
  "legacy": false,