OSCaR: Object State Captioning and State Change Representation
Paper • 2402.17128 • Published
How to use ali-vosoughi/oscar-llava-v1.5-7b-projector with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="ali-vosoughi/oscar-llava-v1.5-7b-projector") # Load model directly
from transformers import AutoProcessor, AutoModelForMultimodalLM
processor = AutoProcessor.from_pretrained("ali-vosoughi/oscar-llava-v1.5-7b-projector")
model = AutoModelForMultimodalLM.from_pretrained("ali-vosoughi/oscar-llava-v1.5-7b-projector")How to use ali-vosoughi/oscar-llava-v1.5-7b-projector with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "ali-vosoughi/oscar-llava-v1.5-7b-projector"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "ali-vosoughi/oscar-llava-v1.5-7b-projector",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/ali-vosoughi/oscar-llava-v1.5-7b-projector
How to use ali-vosoughi/oscar-llava-v1.5-7b-projector with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "ali-vosoughi/oscar-llava-v1.5-7b-projector" \
--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": "ali-vosoughi/oscar-llava-v1.5-7b-projector",
"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 "ali-vosoughi/oscar-llava-v1.5-7b-projector" \
--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": "ali-vosoughi/oscar-llava-v1.5-7b-projector",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use ali-vosoughi/oscar-llava-v1.5-7b-projector with Docker Model Runner:
docker model run hf.co/ali-vosoughi/oscar-llava-v1.5-7b-projector
This repository contains the projector artifact staged for the OSCaR public release.
llava-v1.5-7b-pretrain-projectorali-vosoughi/oscar-llava-v1.5-7b-projectorconfig.jsonmm_projector.binThis is a projector-only release. It is intended for the pretraining and fine-tuning workflow documented in the OSCaR code repository.
Example:
bash scripts/train/pretrain_v1_5_13b_projector.sh
1282562e-42048https://github.com/nguyennm1024/OSCaRhttps://huggingface.co/datasets/ali-vosoughi/oscar-datasethttps://arxiv.org/abs/2402.17128Base model
openai/clip-vit-large-patch14-336