hf-transformers-bot HF Staff
Update tiny models for AudioFlamingo3ForConditionalGeneration
15b94ef verified Download chat_template.jinja from hf-tiny-v2/tiny-random-AudioFlamingo3ForConditionalGeneration: direct link, hf CLI and curl.
- Browser
- Download file 703 Bytes
-
https://huggingface.co/hf-tiny-v2/tiny-random-AudioFlamingo3ForConditionalGeneration/resolve/main/chat_template.jinja
- Command line
-
hf download hf://hf-tiny-v2/tiny-random-AudioFlamingo3ForConditionalGeneration/chat_template.jinja
-
curl -L -o chat_template.jinja https://huggingface.co/hf-tiny-v2/tiny-random-AudioFlamingo3ForConditionalGeneration/resolve/main/chat_template.jinja
703 Bytes
| {% if messages[0]['role'] != 'system' %}<|im_start|>system | |
| You are a helpful assistant.<|im_end|> | |
| {% endif %}{% for m in messages if m['content'] is not none %}<|im_start|>{{ m['role'] }} | |
| {% if m['content'] is string %}{{ m['content'] }}{% else %}{% set audio = namespace(found=False) %}{% set text_buf = namespace(v='') %}{% for c in m['content'] %}{% if c.get('type') == 'audio' or 'audio' in c %}{% set audio.found = True %}{% elif c.get('type') == 'text' or 'text' in c %}{% set text_buf.v = text_buf.v + c['text'] %}{% endif %}{% endfor %}{% if audio.found %}{{ '<sound>' }}{% endif %}{{ text_buf.v }}{% endif %}<|im_end|> | |
| {% endfor %}{% if add_generation_prompt %}<|im_start|>assistant | |
| {% endif %} |