Instructions to use Salesforce/instructblip-vicuna-7b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Salesforce/instructblip-vicuna-7b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="Salesforce/instructblip-vicuna-7b")# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("Salesforce/instructblip-vicuna-7b") model = AutoModelForMultimodalLM.from_pretrained("Salesforce/instructblip-vicuna-7b", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Salesforce/instructblip-vicuna-7b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Salesforce/instructblip-vicuna-7b" # 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-7b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Salesforce/instructblip-vicuna-7b
- SGLang
How to use Salesforce/instructblip-vicuna-7b 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-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": "Salesforce/instructblip-vicuna-7b", "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-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": "Salesforce/instructblip-vicuna-7b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Salesforce/instructblip-vicuna-7b with Docker Model Runner:
docker model run hf.co/Salesforce/instructblip-vicuna-7b
Commit History
-
Update README.md
Verified signature19103d0
-
Update model for latest `transformers` changes (#14)
Verified signature- update the files (92cb457daed1ceefd6fd7f53294ee42085575cdc) - add video token index also (4fd0ddbb2172352d120b7ff982274f32f6fe278f) - add pipeline (190f6f4c0fad60d9d597a011c67cd9c213cd60af) Co-authored-by: Raushan Turganbay <RaushanTurganbay@users.noreply.huggingface.co>9e55477
-
Update config.json (#12)
Verified signature- Update config.json (fd620a961eae9fd7d678cbeb8232b5e58ff6889d) Co-authored-by: Raushan Turganbay <RaushanTurganbay@users.noreply.huggingface.co>52ba0cb
-
Adding `safetensors` variant of this model (#11)
Verified signature- Adding `safetensors` variant of this model (80ed1a65bf7c2e92ee9ad68275534f93398d8e5e) Co-authored-by: Safetensors convertbot <SFconvertbot@users.noreply.huggingface.co>d322c47
-
Update README.md
ef9d8b3
-
Upload InstructBlipForConditionalGeneration
c344252 -
Upload processor
b5bc015
-
Update README.md
f46d9e4 -
Upload processor
00c7cf0
-
Update config.json
50ead02
-
Upload processor
385488c -
Update README.md
2e05f2c -
Update README.md
d54fb30
-
Update README.md
78f805a -
Update README.md
904cf0a -
Create README.md
60c7257
-
Upload processor
bb806d8
-
Upload InstructBlipForConditionalGeneration
968a2ad -
Upload processor
291e8a3 -
initial commit
9bffbfc