Instructions to use apple/DFN5B-CLIP-ViT-H-14-378 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- OpenCLIP
How to use apple/DFN5B-CLIP-ViT-H-14-378 with OpenCLIP:
import open_clip model, preprocess_train, preprocess_val = open_clip.create_model_and_transforms('hf-hub:apple/DFN5B-CLIP-ViT-H-14-378') tokenizer = open_clip.get_tokenizer('hf-hub:apple/DFN5B-CLIP-ViT-H-14-378') - Notebooks
- Google Colab
- Kaggle
File size: 735 Bytes
d915f9c fee33e7 d915f9c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | {
"model_cfg": {
"embed_dim": 1024,
"quick_gelu": true,
"vision_cfg": {
"image_size": 378,
"layers": 32,
"width": 1280,
"head_width": 80,
"patch_size": 14
},
"text_cfg": {
"context_length": 77,
"vocab_size": 49408,
"width": 1024,
"heads": 16,
"layers": 24
}
},
"preprocess_cfg": {
"mean": [
0.48145466,
0.4578275,
0.40821073
],
"std": [
0.26862954,
0.26130258,
0.27577711
],
"interpolation": "bicubic",
"resize_mode": "squash"
}
}
|