Multimodal AI
Collection
Large multimodal models • 17 items • Updated • 2
How to use shi-labs/vcoder_llava-v1.5-7b with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="shi-labs/vcoder_llava-v1.5-7b") # Load model directly
from transformers import AutoModelForCausalLM
model = AutoModelForCausalLM.from_pretrained("shi-labs/vcoder_llava-v1.5-7b", dtype="auto")How to use shi-labs/vcoder_llava-v1.5-7b with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "shi-labs/vcoder_llava-v1.5-7b"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "shi-labs/vcoder_llava-v1.5-7b",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/shi-labs/vcoder_llava-v1.5-7b
How to use shi-labs/vcoder_llava-v1.5-7b with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "shi-labs/vcoder_llava-v1.5-7b" \
--host 0.0.0.0 \
--port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "shi-labs/vcoder_llava-v1.5-7b",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'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 "shi-labs/vcoder_llava-v1.5-7b" \
--host 0.0.0.0 \
--port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "shi-labs/vcoder_llava-v1.5-7b",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use shi-labs/vcoder_llava-v1.5-7b with Docker Model Runner:
docker model run hf.co/shi-labs/vcoder_llava-v1.5-7b
VCoder LLaVA-1.5-7b was trained on COST training dataset in December 2023. It uses the pretrained LLaVA-1.5-7b model weights. It was introduced by Jain et al. in this repository.
VCoder is an adapter for improving existing Multimodal LLMs at object-level perception tasks with the use of perception modalities as control inputs while retaining performance on other tasks.
@article{jain2023vcoder,
title={{VCoder: Versatile Vision Encoders for Multimodal Large Language Models}},
author={Jitesh Jain and Jianwei Yang and Humphrey Shi},
journal={arXiv},
year={2023}
}