molmo-7b-d-awq / chat_template.jinja
ronantakizawa's picture
Upload AWQ 4-bit quantized Molmo-7B-D (~5.2GB, 63.0% reduction)
710c556 verified
raw
history blame contribute delete
559 Bytes
{% for message in messages -%}
{%- if (loop.index % 2 == 1 and message['role'] != 'user') or
(loop.index % 2 == 0 and message['role'].lower() != 'assistant') -%}
{{ raise_exception('Conversation roles must alternate user/assistant/user/assistant/...') }}
{%- endif -%}
{{ message['role'].capitalize() + ': ' + message['content'] }}
{%- if not loop.last -%}
{{ ' ' }}
{%- endif %}
{%- endfor -%}
{%- if add_generation_prompt -%}
{{ ' Assistant:' }}
{%- endif %}