Instructions to use llava-hf/LLaVA-NeXT-Video-34B-hf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use llava-hf/LLaVA-NeXT-Video-34B-hf with Transformers:
# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("llava-hf/LLaVA-NeXT-Video-34B-hf") model = AutoModelForMultimodalLM.from_pretrained("llava-hf/LLaVA-NeXT-Video-34B-hf", device_map="auto") - Notebooks
- Google Colab
- Kaggle
File size: 666 Bytes
cf74f03 | 1 2 3 4 5 | {
"chat_template": "{% for message in messages %}{{'<|im_start|>' + message['role'] + '\n'}}{# Render all images first #}{% for content in message['content'] | selectattr('type', 'equalto', 'image') %}{{ '<image>\n' }}{% endfor %}{# Render all videos next #}{% for content in message['content'] | selectattr('type', 'equalto', 'video') %}{{ '<video>\n' }}{% endfor %}{# Render all text next #}{% for content in message['content'] | selectattr('type', 'equalto', 'text') %}{{ content['text'] }}{% endfor %}{{'<|im_end|>' + '\n'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}",
"processor_class": "LlavaNextVideoProcessor"
}
|