Download chat_template.jinja from hf-tiny-v2/tiny-random-Dots1ForCausalLM: direct link, hf CLI and curl.
- Browser
- Download file 555 Bytes
-
https://huggingface.co/hf-tiny-v2/tiny-random-Dots1ForCausalLM/resolve/main/chat_template.jinja
- Command line
-
hf download hf://hf-tiny-v2/tiny-random-Dots1ForCausalLM/chat_template.jinja
-
curl -L -o chat_template.jinja https://huggingface.co/hf-tiny-v2/tiny-random-Dots1ForCausalLM/resolve/main/chat_template.jinja
555 Bytes
| {% if messages[0]['role'] == 'system' %}<|system|>{{ messages[0]['content'] }}<|endofsystem|>{% set start_idx = 1 %}{% else %}<|system|><|endofsystem|>{% set start_idx = 0 %}{% endif %}{% for idx in range(start_idx, messages|length) %}{% if messages[idx]['role'] == 'user' %}<|userprompt|>{{ messages[idx]['content'] }}<|endofuserprompt|>{% elif messages[idx]['role'] == 'assistant' %}<|response|>{{ messages[idx]['content'] }}<|endofresponse|>{% endif %}{% endfor %}{% if add_generation_prompt and messages[-1]['role'] == 'user' %}<|response|>{% endif %} |