Files
Llama-3.2-1B-glyph-translat…/chat_template.jinja

12 lines
491 B
Plaintext
Raw Permalink Normal View History

{{- bos_token }}
{%- if messages[0]['role'] == 'system' %}
{{- '<|start_header_id|>system<|end_header_id|>\n\n' + messages[0]['content'] | trim + '<|eot_id|>' }}
{%- set messages = messages[1:] %}
{%- endif %}
{%- for message in messages %}
{{- '<|start_header_id|>' + message['role'] + '<|end_header_id|>\n\n' + message['content'] | trim + '<|eot_id|>' }}
{%- endfor %}
{%- if add_generation_prompt %}
{{- '<|start_header_id|>assistant<|end_header_id|>\n\n' }}
{%- endif %}