Instructions to use WafaaFraih/blip-image-captioning-base-blip2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use WafaaFraih/blip-image-captioning-base-blip2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="WafaaFraih/blip-image-captioning-base-blip2")# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("WafaaFraih/blip-image-captioning-base-blip2") model = AutoModelForMultimodalLM.from_pretrained("WafaaFraih/blip-image-captioning-base-blip2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use WafaaFraih/blip-image-captioning-base-blip2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "WafaaFraih/blip-image-captioning-base-blip2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "WafaaFraih/blip-image-captioning-base-blip2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/WafaaFraih/blip-image-captioning-base-blip2
- SGLang
How to use WafaaFraih/blip-image-captioning-base-blip2 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 "WafaaFraih/blip-image-captioning-base-blip2" \ --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": "WafaaFraih/blip-image-captioning-base-blip2", "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 "WafaaFraih/blip-image-captioning-base-blip2" \ --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": "WafaaFraih/blip-image-captioning-base-blip2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use WafaaFraih/blip-image-captioning-base-blip2 with Docker Model Runner:
docker model run hf.co/WafaaFraih/blip-image-captioning-base-blip2
Commit History
-
End of training
Verified signaturebf98b78 -
Training in progress, step 1600
Verified signature4d8c584 -
Training in progress, step 1550
Verified signature37d352a -
Training in progress, step 1500
Verified signature5d3d017 -
Training in progress, step 1450
Verified signature5d10b46 -
Training in progress, step 1400
Verified signature6804270 -
Training in progress, step 1350
Verified signaturee499f64 -
Training in progress, step 1300
Verified signature50e9972 -
Training in progress, step 1250
Verified signaturec15dcde -
Training in progress, step 1200
Verified signature8010621 -
Training in progress, step 1150
Verified signaturefc0f7f5 -
Training in progress, step 1100
Verified signaturef2a2cf5 -
Training in progress, step 1050
Verified signature8ec999b -
Training in progress, step 1000
Verified signaturebe4dd62 -
Training in progress, step 950
Verified signaturefb16846 -
Training in progress, step 900
Verified signaturec5518ec -
Training in progress, step 850
Verified signaturea803f77 -
Training in progress, step 800
Verified signature71e3627 -
Training in progress, step 750
Verified signaturec02eb4f -
Training in progress, step 700
Verified signatureb575208 -
Training in progress, step 650
Verified signature1aa6a97 -
Training in progress, step 600
Verified signaturead0ae2e -
Training in progress, step 550
Verified signature291e649 -
Training in progress, step 500
Verified signatureac66987 -
Training in progress, step 450
Verified signature08464e5
-
Training in progress, step 400
Verified signature8dc5584 -
Training in progress, step 350
Verified signaturee38d6df -
Training in progress, step 300
Verified signature2b760ab -
Training in progress, step 250
Verified signature20b7652 -
Training in progress, step 200
Verified signature2335055 -
Training in progress, step 150
Verified signature1c1d58a -
Training in progress, step 100
Verified signature9e0799d -
Training in progress, step 50
Verified signature8174ff0 -
initial commit
Verified signature65ed3cd