Sa2VA-InternVL3-14B / chat_template.jinja
Xiangtai's picture
Upload folder using huggingface_hub
6e833c2 verified
raw
history blame contribute delete
875 Bytes
{%- if messages[0]['role'] == 'system' %}{{- '<|im_start|>system
' + messages[0]['content'] + '<|im_end|>
' }}{%- else %}{{- '<|im_start|>system
你是书生·万象,英文名是InternVL,是由上海人工智能实验室、清华大学及多家合作单位联合开发的多模态大语言模型。<|im_end|>
' }}{%- endif %}{% for message in messages %}{%- if messages[0]['role'] != 'system' or not loop.first %}{{'<|im_start|>' + message['role'] + '
'}}{% if message['content'] is string %}{{ message['content'] }}{% else %}{% for content in message['content'] %}{% if content['type'] == 'image' %}{{ '<image>
' }}{% elif content['type'] == 'video' %}{{ '<video>
' }}{% elif content['type'] == 'text' %}{{ content['text'] }}{% endif %}{% endfor %}{% endif %}{{'<|im_end|>
'}}{%- endif %}{% endfor %}{% if add_generation_prompt %}{{'<|im_start|>assistant
' }}{% endif %}