Instructions to use zzxslp/som-llava-v1.5-13b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use zzxslp/som-llava-v1.5-13b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="zzxslp/som-llava-v1.5-13b")# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("zzxslp/som-llava-v1.5-13b", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use zzxslp/som-llava-v1.5-13b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "zzxslp/som-llava-v1.5-13b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "zzxslp/som-llava-v1.5-13b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/zzxslp/som-llava-v1.5-13b
- SGLang
How to use zzxslp/som-llava-v1.5-13b 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 "zzxslp/som-llava-v1.5-13b" \ --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": "zzxslp/som-llava-v1.5-13b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "zzxslp/som-llava-v1.5-13b" \ --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": "zzxslp/som-llava-v1.5-13b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use zzxslp/som-llava-v1.5-13b with Docker Model Runner:
docker model run hf.co/zzxslp/som-llava-v1.5-13b
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 "zzxslp/som-llava-v1.5-13b" \
--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": "zzxslp/som-llava-v1.5-13b",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
SoM-LLaVA Model Card
LLaVA-v1.5 mixed trained with SoM style data (QA+listing).
The model can understand tag-style visual prompts on the image (e.g., what is the object tagged with id 9?), also gained improved performance on MLLM benchmarks (POPE, MME, SEED, MM-Vet, LLav-wild), even when the input testing images has no tags.
For more information about SoM-LLaVA, check our github page and paper!
Getting Started
This model should be used in the official LLaVA repo for training and evalution.
If you would like to load the model in HF style, check the converted model weights: [SoM-LLaVA-v1.5-13B-HF]
Citation
If you find our data or model useful for your research and applications, please cite our paper:
@article{yan2024list,
title={List Items One by One: A New Data Source and Learning Paradigm for Multimodal LLMs},
author={Yan, An and Yang, Zhengyuan and Wu, Junda and Zhu, Wanrong and Yang, Jianwei and Li, Linjie and Lin, Kevin and Wang, Jianfeng and McAuley, Julian and Gao, Jianfeng and others},
journal={arXiv preprint arXiv:2404.16375},
year={2024}
}
- Downloads last month
- 11
Install from pip and serve model
# Install SGLang from pip: pip install sglang# Start the SGLang server: python3 -m sglang.launch_server \ --model-path "zzxslp/som-llava-v1.5-13b" \ --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": "zzxslp/som-llava-v1.5-13b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'