Instructions to use LanguageBind/Video-LLaVA-7B-hf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use LanguageBind/Video-LLaVA-7B-hf with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="LanguageBind/Video-LLaVA-7B-hf")# Load model directly from transformers import AutoProcessor, AutoModelForImageTextToText processor = AutoProcessor.from_pretrained("LanguageBind/Video-LLaVA-7B-hf") model = AutoModelForImageTextToText.from_pretrained("LanguageBind/Video-LLaVA-7B-hf") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use LanguageBind/Video-LLaVA-7B-hf with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "LanguageBind/Video-LLaVA-7B-hf" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "LanguageBind/Video-LLaVA-7B-hf", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/LanguageBind/Video-LLaVA-7B-hf
- SGLang
How to use LanguageBind/Video-LLaVA-7B-hf with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "LanguageBind/Video-LLaVA-7B-hf" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "LanguageBind/Video-LLaVA-7B-hf", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "LanguageBind/Video-LLaVA-7B-hf" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "LanguageBind/Video-LLaVA-7B-hf", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use LanguageBind/Video-LLaVA-7B-hf with Docker Model Runner:
docker model run hf.co/LanguageBind/Video-LLaVA-7B-hf
Unable to import VideoLlavaProcessor and VideoLlavaForConditionalGeneration
Is this issue related to the transformers package? I am unable to import VideoLlavaProcessor and VideoLlavaForConditionalGeneration in the latest version of transformers(4.40.2).
Same issue here
upgrade transformers
pip install -U transformers
This did not work for me. I get the same error. I have transformers version 4.40.2.
This did not work for me. I get the same error. I have transformers version 4.40.2.
Try again. Thanks!
@LanguageBind hello dev , i cant Unable to import VideoLlavaProcessor but my VideoLlavaForConditionalGeneration i can use , i use tokenizers-0.21.0 transformers-4.47.1 and already pip install -U transformers in 09:47 06/01/68
how to fix it?
@LanguageBind hello dev , i cant Unable to import VideoLlavaProcessor but my VideoLlavaForConditionalGeneration i can use , i use tokenizers-0.21.0 transformers-4.47.1 and already pip install -U transformers in 09:47 06/01/68
how to fix it?
i try pip install git+https://github.com/huggingface/transformers it can work , my VideoLlavaProcessor it already have , i try to run code but i got Loading checkpoint shards Killed , how to fix it?
@LanguageBind hello dev , i cant Unable to import VideoLlavaProcessor but my VideoLlavaForConditionalGeneration i can use , i use tokenizers-0.21.0 transformers-4.47.1 and already pip install -U transformers in 09:47 06/01/68
how to fix it?i try pip install git+https://github.com/huggingface/transformers it can work , my VideoLlavaProcessor it already have , i try to run code but i got Loading checkpoint shards Killed , how to fix it?
i have same issue . i got Loading checkpoint shards Killed and kernel crashed
@LanguageBind hello dev , i cant Unable to import VideoLlavaProcessor but my VideoLlavaForConditionalGeneration i can use , i use tokenizers-0.21.0 transformers-4.47.1 and already pip install -U transformers in 09:47 06/01/68
how to fix it?i try pip install git+https://github.com/huggingface/transformers it can work , my VideoLlavaProcessor it already have , i try to run code but i got Loading checkpoint shards Killed , how to fix it?
i have same issue . i got Loading checkpoint shards Killed and kernel crashed
bro u can change to use llava video 7b qwen2 is so better and easy to use, i try in a30 gpu for 18 frame
@n3xt1lxs bro . I need some resources for fine-tune video-llava or any other VLM for videos. I have RTX 4090 locally. That's my email: shahiduljahid71@gmail.com. Can you share some resources with me like blogs, code references, or tutorials? that will be helpful. thanks bro .
@n3xt1lxs bro . I need some resources for fine-tune video-llava or any other VLM for videos. I have RTX 4090 locally. That's my email: shahiduljahid71@gmail.com. Can you share some resources with me like blogs, code references, or tutorials? that will be helpful. thanks bro .
I'm sorry for the late reply. There was no notification. I had to check on huggıngface myself.
can go talk in discord? if you can , add me discord : n3xt1lxs
