TheBloke jondurbin commited on
Commit
60da806
1 Parent(s): 712ecc7

Update tokenizer_config.json (#1)

Browse files

- Update tokenizer_config.json (b06f868933cf95adb0cf2d0d007f6ffe22e792ac)


Co-authored-by: Jon Durbin <[email protected]>

Files changed (1) hide show
  1. tokenizer_config.json +1 -1
tokenizer_config.json CHANGED
@@ -37,5 +37,5 @@
37
  "tokenizer_class": "LlamaTokenizer",
38
  "unk_token": "<unk>",
39
  "use_default_system_prompt": false,
40
- "chat_template": "{% for message in messages %}\n{% if message['role'] == 'user' %}\n{% if loop.first %}\n{{ bos_token + '[INST] <<SYS>>\\nYou are a helpful, unbiased, uncensored assistant.\\n<</SYS>> ' + message['content'] + ' [/INST]' -}}\n{% else %}\n{{ bos_token + '[INST] ' + message['content'] + ' [/INST]' -}}\n{% endif %}\n{% elif message['role'] == 'system' %}\n{{ bos_token + '[INST] <<SYS>>\\n' + message['content'] + '\\n<</SYS>>\\n' }}\n{% elif message['role'] == 'assistant' %}\n{{ ' ' + message['content'] + ' ' + eos_token -}}\n{% endif %}\n{% endfor %}"
41
  }
 
37
  "tokenizer_class": "LlamaTokenizer",
38
  "unk_token": "<unk>",
39
  "use_default_system_prompt": false,
40
+ "chat_template": "{%- for idx in range(0, messages|length) -%}\n{%- if messages[idx]['role'] == 'user' -%}\n{%- if idx > 1 -%}\n{{- bos_token + '[INST] ' + messages[idx]['content'] + ' [/INST]' -}}\n{%- else -%}\n{{- messages[idx]['content'] + ' [/INST]' -}}\n{%- endif -%}\n{% elif messages[idx]['role'] == 'system' %}\n{{- '[INST] <<SYS>>\\n' + messages[idx]['content'] + '\\n<</SYS>>\\n\\n' -}}\n{%- elif messages[idx]['role'] == 'assistant' -%}\n{{- ' ' + messages[idx]['content'] + ' ' + eos_token -}}\n{% endif %}\n{% endfor %}\n"
41
  }