Instructions to use lmms-lab/llava-onevision-qwen2-7b-ov-chat with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use lmms-lab/llava-onevision-qwen2-7b-ov-chat with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="lmms-lab/llava-onevision-qwen2-7b-ov-chat") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("lmms-lab/llava-onevision-qwen2-7b-ov-chat", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use lmms-lab/llava-onevision-qwen2-7b-ov-chat 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-qwen2-7b-ov-chat" # 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-qwen2-7b-ov-chat", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/lmms-lab/llava-onevision-qwen2-7b-ov-chat
- SGLang
How to use lmms-lab/llava-onevision-qwen2-7b-ov-chat 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-qwen2-7b-ov-chat" \ --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-qwen2-7b-ov-chat", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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-qwen2-7b-ov-chat" \ --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-qwen2-7b-ov-chat", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use lmms-lab/llava-onevision-qwen2-7b-ov-chat with Docker Model Runner:
docker model run hf.co/lmms-lab/llava-onevision-qwen2-7b-ov-chat
Download model-00003-of-00004.safetensors from lmms-lab/llava-onevision-qwen2-7b-ov-chat: direct link, hf CLI and curl.
- Browser
- Download file 4.99 GB
-
https://huggingface.co/lmms-lab/llava-onevision-qwen2-7b-ov-chat/resolve/refs%2Fpr%2F2/model-00003-of-00004.safetensors
- Command line
-
hf download hf://lmms-lab/llava-onevision-qwen2-7b-ov-chat@refs/pr/2/model-00003-of-00004.safetensors
-
curl -L -o model-00003-of-00004.safetensors https://huggingface.co/lmms-lab/llava-onevision-qwen2-7b-ov-chat/resolve/refs%2Fpr%2F2/model-00003-of-00004.safetensors
4.99 GB
- Xet hash:
- 6dfebd1cbc2f0d8b540dd99616e1f454b4bda6c874bba519dd51104c0758957c
- Size of remote file:
- 4.99 GB
- SHA256:
- 0660937b3896ddecf8bac6b931c455041b234869e251850feb38b609ca6679a2
·
Xet efficiently stores Large Files inside Git, intelligently splitting files into unique chunks and accelerating uploads and downloads. More info.