Image-Text-to-Text
Transformers
TensorBoard
Safetensors
feature-extraction
conversational
custom_code
Instructions to use lmms-lab/LLaVA-OneVision-1.5-8B-Instruct 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-Instruct 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-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)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("lmms-lab/LLaVA-OneVision-1.5-8B-Instruct", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use lmms-lab/LLaVA-OneVision-1.5-8B-Instruct 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-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/LLaVA-OneVision-1.5-8B-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/LLaVA-OneVision-1.5-8B-Instruct
- SGLang
How to use lmms-lab/LLaVA-OneVision-1.5-8B-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/LLaVA-OneVision-1.5-8B-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/LLaVA-OneVision-1.5-8B-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/LLaVA-OneVision-1.5-8B-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/LLaVA-OneVision-1.5-8B-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/LLaVA-OneVision-1.5-8B-Instruct with Docker Model Runner:
docker model run hf.co/lmms-lab/LLaVA-OneVision-1.5-8B-Instruct
Commit History
Update README.md 9072dbf verified
Update README.md ae3e394 verified
Update README.md 80719a5 verified
Update README.md 75a1758 verified
Update README.md 59bcd19 verified
Update README.md 35f4ece verified
Delete .gitattributes 2e2c9d4 verified
Yiye commited on
Upload folder using huggingface_hub 9f0f75e verified
Yiye commited on
Update README.md ae3f2e6 verified
Update README.md 746e144 verified
Update README.md 491e88c verified
Yiye commited on
Update README.md e6a9a0d verified
Update README.md 391f872 verified
Upload 2 files f30a35d verified
Update README.md 813bbd9 verified
Update README.md b2e3f0c verified
Update README.md ec07908 verified
Upload 2 files 731bf0b verified
Rename tensorboard/instruct to tensorboard/instruct/README.md 47aa218 verified
Create instruct 2326204 verified
Create tensorboard/mid_training/README.md 778932b verified
Delete tensorboard/mid_training af82ecf verified
Create tensorboard/mid_training/ 0d4578c verified
Delete tensorboard/mid_training_85m 7d4543c verified
Upload 2 files 2128d00 verified
Create tensorboard/mid_training_85m/README.md 5850e72 verified
Upload modeling_llavaonevision1_5.py with huggingface_hub 1e8c3bf verified
Yiye commited on
Upload preprocessor_config.json with huggingface_hub 7852b29 verified
Yiye commited on
Update README.md 4025465 verified
Yiye commited on
Update README.md 8eb300d verified
Yiye commited on
Update README.md 193cd55 verified
Yiye commited on
Update README.md 5351272 verified
Yiye commited on
Upload tokenizer_config.json with huggingface_hub cc55440 verified
Yiye commited on
Upload preprocessor_config.json with huggingface_hub 7a4cd86 verified
Yiye commited on
Upload modeling_llavaonevision1_5.py with huggingface_hub 4f9eaf6 verified
Yiye commited on
Upload model-00003-of-00004.safetensors with huggingface_hub 8b7725a verified
Yiye commited on
Upload model-00001-of-00004.safetensors with huggingface_hub 8f815ad verified
Yiye commited on
Upload inference.py with huggingface_hub 47c9186 verified
Yiye commited on
Upload inference.py with huggingface_hub e843cc6 verified
Yiye commited on
Upload configuration_llavaonevision1_5.py with huggingface_hub 16dae6f verified
Yiye commited on
Upload chat_template.jinja with huggingface_hub c1b093d verified
Yiye commited on
Upload vocab.json with huggingface_hub 6070d3f verified
Yiye commited on
Update README.md 9718063 verified
Yiye commited on
Upload tokenizer.json with huggingface_hub 26bcb6c verified
Yiye commited on
Upload special_tokens_map.json with huggingface_hub a7b9dad verified
Yiye commited on
Upload model.safetensors.index.json with huggingface_hub d856cc7 verified
Yiye commited on
Upload model-00004-of-00004.safetensors with huggingface_hub da2748c verified
Yiye commited on