Instructions to use Salesforce/instructblip-vicuna-13b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Salesforce/instructblip-vicuna-13b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="Salesforce/instructblip-vicuna-13b")# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("Salesforce/instructblip-vicuna-13b") model = AutoModelForMultimodalLM.from_pretrained("Salesforce/instructblip-vicuna-13b", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Salesforce/instructblip-vicuna-13b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Salesforce/instructblip-vicuna-13b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Salesforce/instructblip-vicuna-13b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Salesforce/instructblip-vicuna-13b
- SGLang
How to use Salesforce/instructblip-vicuna-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 "Salesforce/instructblip-vicuna-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": "Salesforce/instructblip-vicuna-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 "Salesforce/instructblip-vicuna-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": "Salesforce/instructblip-vicuna-13b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Salesforce/instructblip-vicuna-13b with Docker Model Runner:
docker model run hf.co/Salesforce/instructblip-vicuna-13b
Commit History
-
Update README.md
Verified signature91271ed
-
Update for `transformers` changes (#5)
Verified signature- update (8ecee597dccd0f8ee2e0c4e057109f85ad7b4b1e) - add video index (c2ef27c0dcfaf3b06114e31c0f7bdeae6695e2a1) - add pipeline (3f553d44d832eb790714955f131f7c76f2288098) Co-authored-by: Raushan Turganbay <RaushanTurganbay@users.noreply.huggingface.co>cc1362c
-
Update config.json (#3)
Verified signature- Update config.json (1bec64094ab758d338075b2a59c5b8eceb6d00bb) Co-authored-by: Raushan Turganbay <RaushanTurganbay@users.noreply.huggingface.co>164da4f
-
Adding `safetensors` variant of this model (#2)
Verified signature- Adding `safetensors` variant of this model (0f05154aba9e05045322ae1ab1c0eb09ac8c8881) Co-authored-by: Safetensors convertbot <SFconvertbot@users.noreply.huggingface.co>a06c2c5
-
Update README.md
e35db05
-
Upload InstructBlipForConditionalGeneration
c4a18ce -
Upload processor
501f38b
-
Update README.md
7aaadac -
Upload processor
b43222a
-
Upload processor
8adeff7 -
Update README.md
822f494 -
Update README.md
2037845
-
Update README.md
0b8851d -
Update README.md
2c45a5b -
Create README.md
9240c60
-
Upload InstructBlipForConditionalGeneration
d193a7d -
Upload processor
337d7bd -
Upload processor
7086443 -
initial commit
37255f0