Image-Text-to-Text
Transformers
Safetensors
llava_onevision2_5
text-generation
multimodal
video-understanding
streaming
llava-onevision
conversational
custom_code
Instructions to use lmms-lab-encoder/LLaVA-OneVision-2.5-4B-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use lmms-lab-encoder/LLaVA-OneVision-2.5-4B-Instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="lmms-lab-encoder/LLaVA-OneVision-2.5-4B-Instruct", trust_remote_code=True) messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("lmms-lab-encoder/LLaVA-OneVision-2.5-4B-Instruct", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use lmms-lab-encoder/LLaVA-OneVision-2.5-4B-Instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "lmms-lab-encoder/LLaVA-OneVision-2.5-4B-Instruct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "lmms-lab-encoder/LLaVA-OneVision-2.5-4B-Instruct", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/lmms-lab-encoder/LLaVA-OneVision-2.5-4B-Instruct
- SGLang
How to use lmms-lab-encoder/LLaVA-OneVision-2.5-4B-Instruct 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 "lmms-lab-encoder/LLaVA-OneVision-2.5-4B-Instruct" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "lmms-lab-encoder/LLaVA-OneVision-2.5-4B-Instruct", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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 "lmms-lab-encoder/LLaVA-OneVision-2.5-4B-Instruct" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "lmms-lab-encoder/LLaVA-OneVision-2.5-4B-Instruct", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use lmms-lab-encoder/LLaVA-OneVision-2.5-4B-Instruct with Docker Model Runner:
docker model run hf.co/lmms-lab-encoder/LLaVA-OneVision-2.5-4B-Instruct
Model card: remove MMVU val row
Browse files- README.md +0 -1
- README_CN.md +0 -1
README.md
CHANGED
|
@@ -46,7 +46,6 @@ LLaVA-OneVision-2.5-4B-Instruct is a 4B vision-language model for single-image,
|
|
| 46 |
| MVBench | 64.0 <sup>64f×153,664</sup> | 72.0 <sup>64f×153,664</sup> | **75.5** <sup>TC64×313,600</sup> |
|
| 47 |
| NextQA MC test | 80.7 <sup>64f×153,664</sup> | 86.1 <sup>64f×153,664</sup> | **86.4** <sup>TC64×313,600</sup> |
|
| 48 |
| TempCompass MC | 73.4 <sup>64f×153,664</sup> | 75.8 <sup>64f×153,664</sup> | **79.7** <sup>TC64×313,600</sup> |
|
| 49 |
-
| MMVU val | **52.6** <sup>64f×153,664</sup> | 44.1 <sup>64f×153,664</sup> | -- |
|
| 50 |
| Video-MME-v2 | 15.5 <sup>64f×330,000</sup> | 16.4 <sup>64f×330,000</sup> | **17.2** <sup>TC64×313,600</sup> |
|
| 51 |
| EgoSchema subset | 68.2 <sup>64f×153,664</sup> | **80.0** <sup>64f×153,664</sup> | -- |
|
| 52 |
| Video-Index 512f | 19.6 <sup>task frames, ≤262,144/f</sup> | **20.0** <sup>task frames, ≤262,144/f</sup> | 19.8 <sup>TC≤256×313,600</sup> |
|
|
|
|
| 46 |
| MVBench | 64.0 <sup>64f×153,664</sup> | 72.0 <sup>64f×153,664</sup> | **75.5** <sup>TC64×313,600</sup> |
|
| 47 |
| NextQA MC test | 80.7 <sup>64f×153,664</sup> | 86.1 <sup>64f×153,664</sup> | **86.4** <sup>TC64×313,600</sup> |
|
| 48 |
| TempCompass MC | 73.4 <sup>64f×153,664</sup> | 75.8 <sup>64f×153,664</sup> | **79.7** <sup>TC64×313,600</sup> |
|
|
|
|
| 49 |
| Video-MME-v2 | 15.5 <sup>64f×330,000</sup> | 16.4 <sup>64f×330,000</sup> | **17.2** <sup>TC64×313,600</sup> |
|
| 50 |
| EgoSchema subset | 68.2 <sup>64f×153,664</sup> | **80.0** <sup>64f×153,664</sup> | -- |
|
| 51 |
| Video-Index 512f | 19.6 <sup>task frames, ≤262,144/f</sup> | **20.0** <sup>task frames, ≤262,144/f</sup> | 19.8 <sup>TC≤256×313,600</sup> |
|
README_CN.md
CHANGED
|
@@ -46,7 +46,6 @@ LLaVA-OneVision-2.5-4B-Instruct 是一个 4B 视觉语言模型,支持单图
|
|
| 46 |
| MVBench | 64.0 <sup>64f×153,664</sup> | 72.0 <sup>64f×153,664</sup> | **75.5** <sup>TC64×313,600</sup> |
|
| 47 |
| NextQA MC test | 80.7 <sup>64f×153,664</sup> | 86.1 <sup>64f×153,664</sup> | **86.4** <sup>TC64×313,600</sup> |
|
| 48 |
| TempCompass MC | 73.4 <sup>64f×153,664</sup> | 75.8 <sup>64f×153,664</sup> | **79.7** <sup>TC64×313,600</sup> |
|
| 49 |
-
| MMVU val | **52.6** <sup>64f×153,664</sup> | 44.1 <sup>64f×153,664</sup> | -- |
|
| 50 |
| Video-MME-v2 | 15.5 <sup>64f×330,000</sup> | 16.4 <sup>64f×330,000</sup> | **17.2** <sup>TC64×313,600</sup> |
|
| 51 |
| EgoSchema subset | 68.2 <sup>64f×153,664</sup> | **80.0** <sup>64f×153,664</sup> | -- |
|
| 52 |
| Video-Index 512f | 19.6 <sup>task frames, ≤262,144/f</sup> | **20.0** <sup>task frames, ≤262,144/f</sup> | 19.8 <sup>TC≤256×313,600</sup> |
|
|
|
|
| 46 |
| MVBench | 64.0 <sup>64f×153,664</sup> | 72.0 <sup>64f×153,664</sup> | **75.5** <sup>TC64×313,600</sup> |
|
| 47 |
| NextQA MC test | 80.7 <sup>64f×153,664</sup> | 86.1 <sup>64f×153,664</sup> | **86.4** <sup>TC64×313,600</sup> |
|
| 48 |
| TempCompass MC | 73.4 <sup>64f×153,664</sup> | 75.8 <sup>64f×153,664</sup> | **79.7** <sup>TC64×313,600</sup> |
|
|
|
|
| 49 |
| Video-MME-v2 | 15.5 <sup>64f×330,000</sup> | 16.4 <sup>64f×330,000</sup> | **17.2** <sup>TC64×313,600</sup> |
|
| 50 |
| EgoSchema subset | 68.2 <sup>64f×153,664</sup> | **80.0** <sup>64f×153,664</sup> | -- |
|
| 51 |
| Video-Index 512f | 19.6 <sup>task frames, ≤262,144/f</sup> | **20.0** <sup>task frames, ≤262,144/f</sup> | 19.8 <sup>TC≤256×313,600</sup> |
|