Instructions to use lmms-lab/LLaVA-OneVision-1.5-8B-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-8B-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-8B-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-8B-Base", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use lmms-lab/LLaVA-OneVision-1.5-8B-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-8B-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-8B-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-8B-Base
- SGLang
How to use lmms-lab/LLaVA-OneVision-1.5-8B-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-8B-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-8B-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-8B-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-8B-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-8B-Base with Docker Model Runner:
docker model run hf.co/lmms-lab/LLaVA-OneVision-1.5-8B-Base
Commit History
Create README.md 0ee4560 verified
Yiye commited on
Upload configuration_llavaonevision1_5.py with huggingface_hub 7a7cf09 verified
Yiye commited on
Upload generation_config.json with huggingface_hub 01b3cba verified
Yiye commited on
Upload config.json with huggingface_hub bef9daa verified
Yiye commited on
Upload modeling_llavaonevision1_5.py with huggingface_hub 1f28aa3 verified
Yiye commited on
Upload vocab.json with huggingface_hub 0afe81b verified
Yiye commited on
Upload tokenizer.json with huggingface_hub 8668888 verified
Yiye commited on
Upload special_tokens_map.json with huggingface_hub 68d03fc verified
Yiye commited on
Upload model.safetensors.index.json with huggingface_hub 7b73f02 verified
Yiye commited on
Upload model-00003-of-00004.safetensors with huggingface_hub 2df8636 verified
Yiye commited on
Upload model-00001-of-00004.safetensors with huggingface_hub 2805325 verified
Yiye commited on
Upload chat_template.jinja with huggingface_hub 33a1f52 verified
Yiye commited on
Upload tokenizer_config.json with huggingface_hub f5203b5 verified
Yiye commited on
Upload preprocessor_config.json with huggingface_hub 33110f9 verified
Yiye commited on
Upload model-00004-of-00004.safetensors with huggingface_hub 274bb76 verified
Yiye commited on
Upload model-00002-of-00004.safetensors with huggingface_hub a2c49a6 verified
Yiye commited on
Upload merges.txt with huggingface_hub bb9b4ab verified
Yiye commited on
Upload added_tokens.json with huggingface_hub afdd0f6 verified
Yiye commited on
initial commit 6d96105 verified
Yiye commited on