Download chat_template.jinja from datedgpt/datedgpt-2016-instruct: direct link, hf CLI and curl.
- Browser
- Download file 580 Bytes
-
https://huggingface.co/datedgpt/datedgpt-2016-instruct/resolve/main/chat_template.jinja
- Command line
-
hf download hf://datedgpt/datedgpt-2016-instruct/chat_template.jinja
-
curl -L -o chat_template.jinja https://huggingface.co/datedgpt/datedgpt-2016-instruct/resolve/main/chat_template.jinja
580 Bytes
| {% if messages[0]['role'] == 'system' %}{% set loop_messages = messages[1:] %}{% set system_message = messages[0]['content'] %}{% else %}{% set loop_messages = messages %}{% endif %}{% for message in loop_messages %}{% if loop.index0 == 0 and system_message is defined %}{% set content = '<<SYS>> | |
| ' + system_message + ' | |
| <</SYS>> | |
| ' + message['content'] %}{% else %}{% set content = message['content'] %}{% endif %}{% if message['role'] == 'user' %}{{ '<s>' + '[INST] ' + content + ' [/INST]' }}{% elif message['role'] == 'assistant' %}{{ content + '</s>' }}{% endif %}{% endfor %} |