Update chat_template.jinja
Browse files- chat_template.jinja +7 -23
chat_template.jinja
CHANGED
|
@@ -1,25 +1,9 @@
|
|
| 1 |
{% set system_query = 'You should follow the instructions carefully and explain your answers in detail.' %}
|
| 2 |
-
{% set default_query = 'Chart to table' %}
|
| 3 |
{% set num_patches = 16 %}
|
| 4 |
-
<|im_start|>system
|
| 5 |
-
{%
|
| 6 |
-
{%
|
| 7 |
-
|
| 8 |
-
{%
|
| 9 |
-
<
|
| 10 |
-
{%
|
| 11 |
-
{%- for i in range(num_pad) -%}
|
| 12 |
-
<imgpad>
|
| 13 |
-
{%- endfor -%}
|
| 14 |
-
</img>
|
| 15 |
-
{{ default_query }}
|
| 16 |
-
<|im_end|>
|
| 17 |
-
{%- elif message['role'] == 'assistant' -%}
|
| 18 |
-
<|im_start|>assistant\n
|
| 19 |
-
{{- message.get('content', '') -}}
|
| 20 |
-
<|im_end|>
|
| 21 |
-
{%- endif -%}
|
| 22 |
-
{%- endfor -%}
|
| 23 |
-
{%- if add_generation_prompt -%}
|
| 24 |
-
<|im_start|>assistant\n
|
| 25 |
-
{%- endif -%}
|
|
|
|
| 1 |
{% set system_query = 'You should follow the instructions carefully and explain your answers in detail.' %}
|
|
|
|
| 2 |
{% set num_patches = 16 %}
|
| 3 |
+
<|im_start|>system
|
| 4 |
+
{{ system_query }}<|im_end|>{% for message in messages %}{% if message['role'] == 'user' %}<|im_start|>user
|
| 5 |
+
<img>{% for _ in range(num_patches * num_patches) %}<imgpad>{% endfor %}</img>
|
| 6 |
+
|
| 7 |
+
Chart to table<|im_end|>{% elif message['role'] == 'assistant' %}<|im_start|>assistant
|
| 8 |
+
{{ message.get('content', '') }}<|im_end|>{% endif %}{% endfor %}{% if add_generation_prompt %}<|im_start|>assistant
|
| 9 |
+
{% endif %}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|