Download chat_template.json from katuni4ka/tiny-random-llava-next: direct link, hf CLI and curl.
- Browser
- Download file 694 Bytes
-
https://huggingface.co/katuni4ka/tiny-random-llava-next/resolve/main/chat_template.json
- Command line
-
hf download hf://katuni4ka/tiny-random-llava-next/chat_template.json
-
curl -L -o chat_template.json https://huggingface.co/katuni4ka/tiny-random-llava-next/resolve/main/chat_template.json
694 Bytes
| { | |
| "chat_template": "{% for message in messages %}{% if message['role'] == 'system' %}{{ '<<SYS>>\n' + message['content'][0]['text'] + '\n<</SYS>>\n\n' }}{% elif message['role'] == 'user' %}{{ '[INST] ' }}{# Render all images first #}{% for content in message['content'] | selectattr('type', 'equalto', 'image') %}{{ '<image>\n' }}{% endfor %}{# Render all text next #}{% for content in message['content'] | selectattr('type', 'equalto', 'text') %}{{ content['text'] }}{% endfor %}{{' [/INST]' }}{% elif message['role'] == 'assistant' %}{{ ' ' + message['content'][0]['text'] + '<\\s> '}}{% else %}{{ raise_exception('Only user and assistant roles are supported!') }}{% endif %}{% endfor %}" | |
| } |