Update chat_template
Browse filesreference: https://huggingface.co/ise-uiuc/Magicoder-S-DS-6.7B/discussions/4
- tokenizer_config.json +2 -1
tokenizer_config.json
CHANGED
@@ -188,5 +188,6 @@
|
|
188 |
"sp_model_kwargs": {},
|
189 |
"tokenizer_class": "LlamaTokenizer",
|
190 |
"unk_token": null,
|
191 |
-
"use_default_system_prompt": false
|
|
|
192 |
}
|
|
|
188 |
"sp_model_kwargs": {},
|
189 |
"tokenizer_class": "LlamaTokenizer",
|
190 |
"unk_token": null,
|
191 |
+
"use_default_system_prompt": false,
|
192 |
+
"chat_template": "{%- 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{%- endif %}\n{%- for message in messages %}\n {%- if message['role'] == 'system' %}\n{{ message['content'] + '\\n\\n' }}\n {%- else %}\n {%- if message['role'] == 'user' %}\n{{'@@ Instruction\\n' + message['content'] + '\\n\\n'}}\n {%- else %}\n{{'@@ Response\\n' + message['content'] + '\\n' + eos_token + '\\n'}}\n {%- endif %}\n {%- endif %}\n{%- endfor %}{% if add_generation_prompt %}{{ '@@ Response\n' }}{% endif %}"
|
193 |
}
|