Instructions to use LeroyDyer/Mistral-OneVisionlm with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Adapters
How to use LeroyDyer/Mistral-OneVisionlm with Adapters:
from adapters import AutoAdapterModel model = AutoAdapterModel.from_pretrained("<base-model-id>") model.load_adapter("LeroyDyer/Mistral-OneVisionlm", set_active=True) - Notebooks
- Google Colab
- Kaggle
Download Processor/chat_template.json from LeroyDyer/Mistral-OneVisionlm: direct link, hf CLI and curl.
- Browser
- Download file 826 Bytes
-
https://huggingface.co/LeroyDyer/Mistral-OneVisionlm/resolve/main/Processor/chat_template.json
- Command line
-
hf download hf://LeroyDyer/Mistral-OneVisionlm/Processor/chat_template.json
-
curl -L -o chat_template.json https://huggingface.co/LeroyDyer/Mistral-OneVisionlm/resolve/main/Processor/chat_template.json
826 Bytes
| { | |
| "chat_template": "{% for message in messages %}{{'<|im_start|>' + message['role'] + ' '}}{# Render all images first #}{% for content in message['content'] | selectattr('type', 'equalto', 'image') %}{{ '<image>' }}{% endfor %}{# Render all video then #}{% for content in message['content'] | selectattr('type', 'equalto', 'video') %}{{ '<video>' }}{% endfor %}{# Render all text next #}{% if message['role'] != 'assistant' %}{% for content in message['content'] | selectattr('type', 'equalto', 'text') %}{{ '\n' + content['text'] }}{% endfor %}{% else %}{% for content in message['content'] | selectattr('type', 'equalto', 'text') %}{% generation %}{{ '\n' + content['text'] }}{% endgeneration %}{% endfor %}{% endif %}{{'<|im_end|>'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}" | |
| } | |