Upload chat_template.jinja with huggingface_hub
Browse files- chat_template.jinja +14 -0
chat_template.jinja
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{% for m in messages %}
|
| 2 |
+
{% if m['role'] == 'system' %}
|
| 3 |
+
<|im_start|>system
|
| 4 |
+
{{ m['content'] }}<|im_end|>
|
| 5 |
+
{% elif m['role'] == 'user' %}
|
| 6 |
+
<|im_start|>user
|
| 7 |
+
{{ m['content'] }}<|im_end|>
|
| 8 |
+
{% elif m['role'] == 'assistant' %}
|
| 9 |
+
<|im_start|>assistant
|
| 10 |
+
{% generation %}{{ m['content'] }}{{ eos_token }}{% endgeneration %}
|
| 11 |
+
{% endif %}
|
| 12 |
+
{% endfor %}
|
| 13 |
+
{% if add_generation_prompt %}<|im_start|>assistant
|
| 14 |
+
{% endif %}
|