Instructions to use lmms-lab/LLaVA-OneVision-1.5-4B-Base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use lmms-lab/LLaVA-OneVision-1.5-4B-Base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="lmms-lab/LLaVA-OneVision-1.5-4B-Base", 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)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("lmms-lab/LLaVA-OneVision-1.5-4B-Base", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use lmms-lab/LLaVA-OneVision-1.5-4B-Base with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "lmms-lab/LLaVA-OneVision-1.5-4B-Base" # 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/LLaVA-OneVision-1.5-4B-Base", "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/LLaVA-OneVision-1.5-4B-Base
- SGLang
How to use lmms-lab/LLaVA-OneVision-1.5-4B-Base 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/LLaVA-OneVision-1.5-4B-Base" \ --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/LLaVA-OneVision-1.5-4B-Base", "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/LLaVA-OneVision-1.5-4B-Base" \ --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/LLaVA-OneVision-1.5-4B-Base", "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/LLaVA-OneVision-1.5-4B-Base with Docker Model Runner:
docker model run hf.co/lmms-lab/LLaVA-OneVision-1.5-4B-Base
Improve model card: Add paper/code/demo links, sample usage, update title & citations
#1
by nielsr HF Staff - opened
This pull request significantly enhances the model card for LLaVA-OneVision-1.5 by:
- Updating the main title to align with the official paper title: "LLaVA-OneVision-1.5: Fully Open Framework for Democratized Multimodal Training".
- Adding prominent links to the Hugging Face paper page (
https://huggingface.co/papers/2509.23661), the GitHub repository (https://github.com/EvolvingLMMs-Lab/LLaVA-OneVision-1.5), and the Hugging Face Space demo (https://huggingface.co/spaces/lmms-lab/LLaVA-OneVision-1.5) for easy access. - Including a "Quick Start with HuggingFace" section with a Python code snippet from the GitHub README to guide users on model inference.
- Adding the
language: entag to the metadata for better discoverability. - Restructuring and expanding the model card content with detailed sections (Introduction, Models, Datasets, Evaluation Results, Training Guides, Roadmaps, Contributors, Citation, Acknowledgement) directly imported from the comprehensive GitHub README.
- Updating the "Citation" section with a more complete BibTeX entry from the GitHub README, including related papers.
These updates aim to provide a more complete, accurate, and user-friendly documentation for the model on the Hugging Face Hub.
Thank you so much for your help and support with the PR! I truly appreciate your effort and time in making this happen
xiangan changed pull request status to merged