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, AutoModelForImageTextToText processor = AutoProcessor.from_pretrained("llava-hf/LLaVA-NeXT-Video-34B-hf") model = AutoModelForImageTextToText.from_pretrained("llava-hf/LLaVA-NeXT-Video-34B-hf") - Notebooks
- Google Colab
- Kaggle
| { | |
| "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" | |
| } | |