Instructions to use 3dlg-hcvc/DuoduoCLIP-B-32 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use 3dlg-hcvc/DuoduoCLIP-B-32 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="3dlg-hcvc/DuoduoCLIP-B-32", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("3dlg-hcvc/DuoduoCLIP-B-32", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download config.json from 3dlg-hcvc/DuoduoCLIP-B-32: direct link, hf CLI and curl.
- Browser
- Download file 1.47 kB
-
https://huggingface.co/3dlg-hcvc/DuoduoCLIP-B-32/resolve/main/config.json
- Command line
-
hf download hf://3dlg-hcvc/DuoduoCLIP-B-32/config.json
-
curl -L -o config.json https://huggingface.co/3dlg-hcvc/DuoduoCLIP-B-32/resolve/main/config.json
1.47 kB
| { | |
| "architectures": [ | |
| "DuoduoCLIPModel" | |
| ], | |
| "auto_map": { | |
| "AutoConfig": "configuration_duoduoclip.DuoduoCLIPConfig", | |
| "AutoModel": "modeling_duoduoclip.DuoduoCLIPModel" | |
| }, | |
| "default_num_views": null, | |
| "dtype": "float32", | |
| "hf_clip_model_name": "openai/clip-vit-base-patch32", | |
| "image_mean": [ | |
| 0.48145466, | |
| 0.4578275, | |
| 0.40821073 | |
| ], | |
| "image_std": [ | |
| 0.26862954, | |
| 0.26130258, | |
| 0.27577711 | |
| ], | |
| "initializer_factor": 1.0, | |
| "layers_threshold": 6, | |
| "logit_scale_init_value": 2.6592, | |
| "model_type": "duoduoclip", | |
| "projection_dim": 512, | |
| "text_config": { | |
| "attention_dropout": 0.0, | |
| "hidden_act": "gelu", | |
| "hidden_size": 512, | |
| "initializer_factor": 1.0, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 2048, | |
| "layer_norm_eps": 1e-05, | |
| "max_position_embeddings": 77, | |
| "model_type": "clip_text_model", | |
| "num_attention_heads": 8, | |
| "num_hidden_layers": 12, | |
| "pad_token_id": 49407, | |
| "projection_dim": 512, | |
| "vocab_size": 49408 | |
| }, | |
| "transformers_version": "4.57.6", | |
| "vision_config": { | |
| "attention_dropout": 0.0, | |
| "hidden_act": "gelu", | |
| "hidden_size": 768, | |
| "image_size": 224, | |
| "initializer_factor": 1.0, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 3072, | |
| "layer_norm_eps": 1e-05, | |
| "model_type": "clip_vision_model", | |
| "num_attention_heads": 12, | |
| "num_channels": 3, | |
| "num_hidden_layers": 12, | |
| "patch_size": 32, | |
| "projection_dim": 512 | |
| } | |
| } | |