Commit ·
efddf86
1
Parent(s): da577e8
HF generation markers
Browse files66 unmodified lines67686970717273747576777816 unmodified lines959697989910010166 unmodified lines{%- endif %}{%- if loop.index0 > ns.last_query_index %}{%- if loop.last or (not loop.last and reasoning_content) %}{{- '<|im_start|>' + message.role + '\n<think>\n' + reasoning_content.strip('\n') + '\n</think>\n\n' + content.lstrip('\n') }}{%- else %}{{- '<|im_start|>' + message.role + '\n' + content }}{%- endif %}{%- else %}{{- '<|im_start|>' + message.role + '\n' + content }}{%- endif %}{%- if message.tool_calls %}{%- for tool_call in message.tool_calls %}16 unmodified lines{%- endif %}{{- '<|im_end|>\n' }}{%- else %}{{- render_block_turns(message.role, message.content) }}{%- if message.tool_calls %}{{- '<|im_start|>' + message.role + '\n' }}{%- for tool_call in message.tool_calls %}66 unmodified lines67686970717273747576777816 unmodified lines959697989910010110210310410510610766 unmodified lines{%- endif %}{%- if loop.index0 > ns.last_query_index %}{%- if loop.last or (not loop.last and reasoning_content) %}{{- '<|im_start|>' + message.role + '\n' }}{% generation %}{{- '<think>\n' + reasoning_content.strip('\n') + '\n</think>\n\n' + content.lstrip('\n') }}{% endgeneration %}{%- else %}{{- '<|im_start|>' + message.role + '\n' }}{% generation %}{{- content }}{% endgeneration %}{%- endif %}{%- else %}{{- '<|im_start|>' + message.role + '\n' }}{% generation %}{{- content }}{% endgeneration %}{%- endif %}{%- if message.tool_calls %}{%- for tool_call in message.tool_calls %}16 unmodified lines{%- endif %}{{- '<|im_end|>\n' }}{%- else %}{%- for content in message.content -%}{%- if content['type'] == 'image' or 'image' in content or 'image_url' in content -%}{{- '<|im_start|>' + message.role + '\n<image><|im_end|>\n' }}{%- elif 'text' in content -%}{{- '<|im_start|>' + message.role + '\n' }}{% generation %}{{- content['text'] }}{% endgeneration %}{{- '<|im_end|>\n' }}{%- endif -%}{%- endfor %}{%- if message.tool_calls %}{{- '<|im_start|>' + message.role + '\n' }}{%- for tool_call in message.tool_calls %}
chat_template.jinja+10-4