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
Commit History
Yesterday
-
Model card: put badges on one line
Verified signature7ce9a7e -
Link GitHub repository in model card
Verified signatureb4ecf0b -
Clean stale comments and docstrings (no code change)
Verified signatured13683f -
Clear local path from text_config._name_or_path; pin install to released transformers
Verified signature7df09b2 -
Video-Index: show frames/Qwen resolution as 55,296, matching codec
Verified signature145f6a2 -
Streaming table: label OV2.5-4B column as codec, 24 fps
Verified signature8342117 -
Model card: label input frame rate in streaming table headers
Verified signature5cfef7b -
Model card: drop footnote marks from streaming table
Verified signature1432359 -
Model card: remove OneStreamer column from streaming table
Verified signatureb1a3d75 -
Model card: use full names for streaming baselines
Verified signature779f39c -
Model card: remove FAR timing row from streaming table
Verified signature52b2826 -
Model card: add streaming benchmark table
Verified signature28cacc0 -
Model card: TOMATO codec result at the matched budget
Verified signature919f3e3 -
Model card: correct Video-Index settings
Verified signaturec93e466 -
Model card: add TOMATO per-frame pixel budget
Verified signature743f281 -
Model card: show actual settings instead of official labels
Verified signature2a51ad4 -
Model card: restore Video-MME-v2 setting labels
Verified signatureccea5b0 -
Model card: mark Video-MME-v2 settings as official
Verified signature55f6285 -
Model card: rename Video-Index row, mark settings as official
Verified signature7a03f6f -
Model card: TOMATO results under the official setting
Verified signaturefbb031a -
Model card: reorder benchmark columns (OV2.5 first, Qwen last)
Verified signature21d0914 -
Model card: update Video-Index codec result
Verified signature78a770b -
Model card: fix empty header row in model overview table
Verified signaturec36801a -
Model card: drop tagline, add EgoSchema codec result
Verified signaturea5af679 -
Model card: render both benchmark tables at full, equal width
Verified signatureab67cba -
Model card: add MLVU dev codec result
Verified signature92f1ac4 -
Model card: remove MMVU val row
Verified signaturebbb0357 -
Model card: remove MMOU test-mini row
Verified signaturec1de068 -
Model card: drop benchmark count from codec highlight
Verified signature2e2dd7b -
Model card: add Qwen3.5-4B VideoMME subtitle result (matched run)
Verified signatureffd8845 -
Model card: average VideoMME splits, drop video-spatial rows, benchmark figure and results highlight
Verified signature3948ec8
2 days ago
-
Model card: remove usage tips section
Verified signatureb0d235b -
Model card: remove citation section for now
Verified signature92bf9c7 -
Model card: shorter quickstart, settings as superscripts in the video table
Verified signaturecfd2b25 -
Model card: coming-soon placeholders for GitHub, project page and technical report
Verified signature54be389 -
Model card: trim image table to selected benchmarks
Verified signature8cc4282 -
Model card: redesigned layout with benchmark figure, no collapsed sections
Verified signature9a8d128 -
Model card: compact benchmark tables, collapse settings/notes/usage details
Verified signature4826424 -
TimeLens ActivityNet: Qwen score at the aligned setting
Verified signaturebf93051 -
BLINK judged score; per-model settings in the video table
Verified signature099bdbd -
Restructure model cards along the Qwen3.5 card layout
Verified signaturee4bb786 -
Add benchmark tables vs Qwen3.5-4B (iter11750)
Verified signature2f1237d -
Tighten model cards (-47% lines)
Verified signature89a83c4 -
Rename remote-code modules to *_llava_onevision2_5 (class names and model_type unchanged)
Verified signature165351a -
Point model cards at the real repo id
Verified signature6afadee -
Add LLaVA-OneVision-2.5-4B-Instruct (weights, remote code, model cards)
Verified signatureebb5018 -
initial commit
Verified signature9e1ede2