Instructions to use ayyuce/blip-vqa-rad with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ayyuce/blip-vqa-rad with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="ayyuce/blip-vqa-rad")# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("ayyuce/blip-vqa-rad") model = AutoModelForMultimodalLM.from_pretrained("ayyuce/blip-vqa-rad", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ayyuce/blip-vqa-rad with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ayyuce/blip-vqa-rad" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ayyuce/blip-vqa-rad", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ayyuce/blip-vqa-rad
- SGLang
How to use ayyuce/blip-vqa-rad 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 "ayyuce/blip-vqa-rad" \ --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": "ayyuce/blip-vqa-rad", "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 "ayyuce/blip-vqa-rad" \ --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": "ayyuce/blip-vqa-rad", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ayyuce/blip-vqa-rad with Docker Model Runner:
docker model run hf.co/ayyuce/blip-vqa-rad
ayyuce/blip_vqa_rad
Browse files- README.md +7 -11
- preprocessor_config.json +2 -1
README.md
CHANGED
|
@@ -1,16 +1,11 @@
|
|
| 1 |
---
|
| 2 |
library_name: transformers
|
| 3 |
-
license:
|
| 4 |
base_model: Salesforce/blip-vqa-base
|
| 5 |
tags:
|
| 6 |
- generated_from_trainer
|
| 7 |
-
datasets:
|
| 8 |
-
- ayyuce/vqa-rad-instructions
|
| 9 |
-
language:
|
| 10 |
-
- en
|
| 11 |
-
pipeline_tag: visual-question-answering
|
| 12 |
model-index:
|
| 13 |
-
- name: blip-vqa-rad
|
| 14 |
results: []
|
| 15 |
---
|
| 16 |
|
|
@@ -21,7 +16,7 @@ should probably proofread and complete it, then remove this comment. -->
|
|
| 21 |
|
| 22 |
This model is a fine-tuned version of [Salesforce/blip-vqa-base](https://huggingface.co/Salesforce/blip-vqa-base) on an unknown dataset.
|
| 23 |
It achieves the following results on the evaluation set:
|
| 24 |
-
- Loss:
|
| 25 |
|
| 26 |
## Model description
|
| 27 |
|
|
@@ -46,13 +41,14 @@ The following hyperparameters were used during training:
|
|
| 46 |
- seed: 42
|
| 47 |
- optimizer: Use OptimizerNames.ADAMW_TORCH with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
|
| 48 |
- lr_scheduler_type: linear
|
| 49 |
-
- num_epochs:
|
| 50 |
|
| 51 |
### Training results
|
| 52 |
|
| 53 |
| Training Loss | Epoch | Step | Validation Loss |
|
| 54 |
|:-------------:|:-----:|:----:|:---------------:|
|
| 55 |
-
|
|
|
|
|
| 56 |
|
| 57 |
|
| 58 |
### Framework versions
|
|
@@ -60,4 +56,4 @@ The following hyperparameters were used during training:
|
|
| 60 |
- Transformers 4.50.0
|
| 61 |
- Pytorch 2.6.0+cu124
|
| 62 |
- Datasets 3.5.0
|
| 63 |
-
- Tokenizers 0.21.1
|
|
|
|
| 1 |
---
|
| 2 |
library_name: transformers
|
| 3 |
+
license: bsd-3-clause
|
| 4 |
base_model: Salesforce/blip-vqa-base
|
| 5 |
tags:
|
| 6 |
- generated_from_trainer
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
model-index:
|
| 8 |
+
- name: blip-vqa-rad
|
| 9 |
results: []
|
| 10 |
---
|
| 11 |
|
|
|
|
| 16 |
|
| 17 |
This model is a fine-tuned version of [Salesforce/blip-vqa-base](https://huggingface.co/Salesforce/blip-vqa-base) on an unknown dataset.
|
| 18 |
It achieves the following results on the evaluation set:
|
| 19 |
+
- Loss: 3.1093
|
| 20 |
|
| 21 |
## Model description
|
| 22 |
|
|
|
|
| 41 |
- seed: 42
|
| 42 |
- optimizer: Use OptimizerNames.ADAMW_TORCH with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
|
| 43 |
- lr_scheduler_type: linear
|
| 44 |
+
- num_epochs: 2
|
| 45 |
|
| 46 |
### Training results
|
| 47 |
|
| 48 |
| Training Loss | Epoch | Step | Validation Loss |
|
| 49 |
|:-------------:|:-----:|:----:|:---------------:|
|
| 50 |
+
| 3.5481 | 1.0 | 897 | 3.1706 |
|
| 51 |
+
| 3.3885 | 2.0 | 1794 | 3.1093 |
|
| 52 |
|
| 53 |
|
| 54 |
### Framework versions
|
|
|
|
| 56 |
- Transformers 4.50.0
|
| 57 |
- Pytorch 2.6.0+cu124
|
| 58 |
- Datasets 3.5.0
|
| 59 |
+
- Tokenizers 0.21.1
|
preprocessor_config.json
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
{
|
|
|
|
| 2 |
"do_normalize": true,
|
| 3 |
"do_pad": true,
|
| 4 |
"do_rescale": true,
|
|
@@ -22,4 +23,4 @@
|
|
| 22 |
"width": 384
|
| 23 |
},
|
| 24 |
"size_divisor": 32
|
| 25 |
-
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"do_convert_rgb": true,
|
| 3 |
"do_normalize": true,
|
| 4 |
"do_pad": true,
|
| 5 |
"do_rescale": true,
|
|
|
|
| 23 |
"width": 384
|
| 24 |
},
|
| 25 |
"size_divisor": 32
|
| 26 |
+
}
|