Robin Ding
commited on
Commit
•
256e1e7
1
Parent(s):
ff39b20
add chat template for NL2Code
Browse files- tokenizer_config.json +1 -0
tokenizer_config.json
CHANGED
@@ -181,6 +181,7 @@
|
|
181 |
}
|
182 |
},
|
183 |
"bos_token": "<|begin▁of▁sentence|>",
|
|
|
184 |
"clean_up_tokenization_spaces": false,
|
185 |
"eos_token": "<|end▁of▁sentence|>",
|
186 |
"legacy": true,
|
|
|
181 |
}
|
182 |
},
|
183 |
"bos_token": "<|begin▁of▁sentence|>",
|
184 |
+
"chat_template": "{{bos_token}}{{'You are an exceptionally intelligent coding assistant that consistently delivers accurate and reliable <Code> according to <NL_Description>\n\n'}}\n{%- for message in messages %}\n {%- if message['role'] == 'system' %}\n {{ raise_exception('System messages are not allowed in this template.') }}\n {%- else %}\n {%- if message['role'] == 'user' %}\n{{'<NL_Description>\n' + message['content'] + '\n\n'}}\n {%- else %}\n{{'<Code>\n' + message['content'] + eos_token + '\n\n'}}\n {%- endif %}\n {%- endif %}\n{%- endfor %}\n{{'<Code>\n'}}",
|
185 |
"clean_up_tokenization_spaces": false,
|
186 |
"eos_token": "<|end▁of▁sentence|>",
|
187 |
"legacy": true,
|