tiny-processor-pp_chart2table / chat_template.jinja
hf-transformers-bot's picture
Add tiny processor fixture for testing
b397932 verified
Raw
History Blame Contribute Delete
557 Bytes
{% set system_query = 'You should follow the instructions carefully and explain your answers in detail.' %}
{% set num_patches = 16 %}
<|im_start|>system
{{ system_query }}<|im_end|>{% for message in messages %}{% if message['role'] == 'user' %}<|im_start|>user
<img>{% for _ in range(num_patches * num_patches) %}<imgpad>{% endfor %}</img>
Chart to table<|im_end|>{% elif message['role'] == 'assistant' %}<|im_start|>assistant
{{ message.get('content', '') }}<|im_end|>{% endif %}{% endfor %}{% if add_generation_prompt %}<|im_start|>assistant
{% endif %}