Instructions to use Revrse/icon-captioning-model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Revrse/icon-captioning-model with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "image-to-text" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # pip install "transformers<5.0.0" from transformers import pipeline pipe = pipeline("image-to-text", model="Revrse/icon-captioning-model")# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("Revrse/icon-captioning-model") model = AutoModelForMultimodalLM.from_pretrained("Revrse/icon-captioning-model", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download config.json from Revrse/icon-captioning-model: direct link, hf CLI and curl.
- Browser
- Download file 831 Bytes
-
https://huggingface.co/Revrse/icon-captioning-model/resolve/main/config.json
- Command line
-
hf download hf://Revrse/icon-captioning-model/config.json
-
curl -L -o config.json https://huggingface.co/Revrse/icon-captioning-model/resolve/main/config.json
831 Bytes
| { | |
| "_name_or_path": "Salesforce/blip-image-captioning-large", | |
| "architectures": [ | |
| "BlipForConditionalGeneration" | |
| ], | |
| "image_text_hidden_size": 256, | |
| "initializer_factor": 1.0, | |
| "initializer_range": 0.02, | |
| "label_smoothing": 0.0, | |
| "logit_scale_init_value": 2.6592, | |
| "model_type": "blip", | |
| "projection_dim": 512, | |
| "text_config": { | |
| "encoder_hidden_size": 1024, | |
| "initializer_factor": 1.0, | |
| "model_type": "blip_text_model", | |
| "num_attention_heads": 12 | |
| }, | |
| "torch_dtype": "float32", | |
| "transformers_version": "4.40.0", | |
| "vision_config": { | |
| "dropout": 0.0, | |
| "hidden_size": 1024, | |
| "initializer_factor": 1.0, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 4096, | |
| "model_type": "blip_vision_model", | |
| "num_attention_heads": 16, | |
| "num_channels": 3, | |
| "num_hidden_layers": 24 | |
| } | |
| } | |