rafaelwh commited on
Commit
f22d13a
·
verified ·
1 Parent(s): f08147b

Add chat_template to tokenizer_config.json

Browse files
Files changed (1) hide show
  1. tokenizer_config.json +1 -0
tokenizer_config.json CHANGED
@@ -102,6 +102,7 @@
102
  "<extra_id_99>"
103
  ],
104
  "clean_up_tokenization_spaces": true,
 
105
  "eos_token": "</s>",
106
  "extra_ids": 100,
107
  "model_max_length": 512,
 
102
  "<extra_id_99>"
103
  ],
104
  "clean_up_tokenization_spaces": true,
105
+ "chat_template": "{% if not add_generation_prompt is defined %}\n{% set add_generation_prompt = false %}\n{% endif %}\n{%- set ns = namespace(found=false) -%}\n{%- for message in messages -%}\n {%- if message['role'] == 'system' -%}\n {%- set ns.found = true -%}\n {%- endif -%}\n{%- endfor -%}\n{{bos_token}}{%- if not ns.found -%}\n{{'You are an AI programming assistant, utilizing the Deepseek Coder model, developed by Deepseek Company, and you only answer questions related to computer science. For politically sensitive questions, security and privacy issues, and other non-computer science questions, you will refuse to answer\\n'}}\n{%- endif %}\n{%- for message in messages %}\n {%- if message['role'] == 'system' %}\n{{ message['content'] }}\n {%- else %}\n {%- if message['role'] == 'user' %}\n{{'### Instruction:\\n' + message['content'] + '\\n'}}\n {%- else %}\n{{'### Response:\\n' + message['content'] + '\\n<|EOT|>\\n'}}\n {%- endif %}\n {%- endif %}\n{%- endfor %}\n{% if add_generation_prompt %}\n{{'### Response:'}}\n{% endif %}",
106
  "eos_token": "</s>",
107
  "extra_ids": 100,
108
  "model_max_length": 512,