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
Update README.md
Browse files
README.md
CHANGED
|
@@ -17,6 +17,11 @@ Base LLM: [lmsys/vicuna-13b-v1.5](https://huggingface.co/lmsys/vicuna-13b-v1.5)
|
|
| 17 |
The model can generate interleaving images and videos, despite the absence of image-video pairs in the dataset. Video-LLaVa is uses an encoder trained for unified visual representation through alignment prior to projection.
|
| 18 |
Extensive experiments demonstrate the complementarity of modalities, showcasing significant superiority when compared to models specifically designed for either images or videos.
|
| 19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
**Paper or resources for more information:**
|
| 21 |
https://github.com/PKU-YuanGroup/Video-LLaVA
|
| 22 |
|
|
|
|
| 17 |
The model can generate interleaving images and videos, despite the absence of image-video pairs in the dataset. Video-LLaVa is uses an encoder trained for unified visual representation through alignment prior to projection.
|
| 18 |
Extensive experiments demonstrate the complementarity of modalities, showcasing significant superiority when compared to models specifically designed for either images or videos.
|
| 19 |
|
| 20 |
+
<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/model_doc/videollava_example.png"
|
| 21 |
+
alt="drawing" width="600"/>
|
| 22 |
+
|
| 23 |
+
<small> VideoLLaVa example. Taken from the <a href="https://arxiv.org/abs/2311.10122">original paper.</a> </small>
|
| 24 |
+
|
| 25 |
**Paper or resources for more information:**
|
| 26 |
https://github.com/PKU-YuanGroup/Video-LLaVA
|
| 27 |
|