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)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("lmms-lab/LLaVA-OneVision-1.5-8B-Instruct", 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-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
Verified signaturee137910
-
Update README.md
Verified signaturebdf9518 -
Update README.md
Verified signature9072dbf -
Update README.md
Verified signatureae3e394 -
Update README.md
Verified signature80719a5 -
Update README.md
Verified signature75a1758 -
Update README.md
Verified signature59bcd19 -
Update README.md
Verified signature35f4ece
-
Delete .gitattributes
YiyeVerified signature2e2c9d4 -
Upload folder using huggingface_hub
YiyeVerified signature9f0f75e
-
Update README.md
Verified signatureae3f2e6 -
Update README.md
Verified signature746e144 -
Improve model card: Add paper, project page, and code links (#3)
Verified signature- Improve model card: Add paper, project page, and code links (ece209326573a363a0515f91b1a4990963d10d2f) Co-authored-by: Niels Rogge <nielsr@users.noreply.huggingface.co>9206a19
-
Update README.md
YiyeVerified signature491e88c
-
Update README.md
Verified signaturee6a9a0d -
Update README.md
Verified signature391f872 -
Upload 2 files
Verified signaturef30a35d
-
Update README.md
Verified signature813bbd9 -
Update README.md
Verified signatureb2e3f0c -
Update README.md
Verified signatureec07908
-
Upload 2 files
Verified signature731bf0b -
Rename tensorboard/instruct to tensorboard/instruct/README.md
Verified signature47aa218 -
Create instruct
Verified signature2326204 -
Create tensorboard/mid_training/README.md
Verified signature778932b -
Delete tensorboard/mid_training
Verified signatureaf82ecf -
Create tensorboard/mid_training/
Verified signature0d4578c -
Delete tensorboard/mid_training_85m
Verified signature7d4543c -
Upload 2 files
Verified signature2128d00 -
Create tensorboard/mid_training_85m/README.md
Verified signature5850e72
-
Update the `library` tag for more visibility. (#1)
Yiye +1: ariG23498 Verified signature- Update the `library` tag for more visibility. (44a9fa6ba01d62f29e8e783fb32e821db0b56780) Co-authored-by: Aritra Roy Gosthipaty <ariG23498@users.noreply.huggingface.co>ad0b3fc
-
Upload modeling_llavaonevision1_5.py with huggingface_hub
YiyeVerified signature1e8c3bf
-
Upload preprocessor_config.json with huggingface_hub
YiyeVerified signature7852b29
-
Update README.md
YiyeVerified signature4025465
-
Update README.md
YiyeVerified signature8eb300d -
Update README.md
YiyeVerified signature193cd55 -
Update README.md
YiyeVerified signature5351272 -
Upload tokenizer_config.json with huggingface_hub
YiyeVerified signaturecc55440 -
Upload preprocessor_config.json with huggingface_hub
YiyeVerified signature7a4cd86 -
Upload modeling_llavaonevision1_5.py with huggingface_hub
YiyeVerified signature4f9eaf6 -
Upload model-00003-of-00004.safetensors with huggingface_hub
YiyeVerified signature8b7725a -
Upload model-00001-of-00004.safetensors with huggingface_hub
YiyeVerified signature8f815ad -
Upload inference.py with huggingface_hub
YiyeVerified signature47c9186 -
Upload inference.py with huggingface_hub
YiyeVerified signaturee843cc6 -
Upload configuration_llavaonevision1_5.py with huggingface_hub
YiyeVerified signature16dae6f -
Upload chat_template.jinja with huggingface_hub
YiyeVerified signaturec1b093d -
Upload vocab.json with huggingface_hub
YiyeVerified signature6070d3f -
Update README.md
YiyeVerified signature9718063 -
Upload tokenizer.json with huggingface_hub
YiyeVerified signature26bcb6c -
Upload special_tokens_map.json with huggingface_hub
YiyeVerified signaturea7b9dad -
Upload model.safetensors.index.json with huggingface_hub
YiyeVerified signatured856cc7