Instructions to use zeromodels/clip_vit_large_14 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- KerasFormers
How to use zeromodels/clip_vit_large_14 with KerasFormers:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Keras
How to use zeromodels/clip_vit_large_14 with Keras:
# Available backend options are: "jax", "torch", "tensorflow". import os os.environ["KERAS_BACKEND"] = "jax" import keras model = keras.saving.load_model("hf://zeromodels/clip_vit_large_14") - Notebooks
- Google Colab
- Kaggle
Upgrade kf_config.json to v2 (nested config + dtype)
Browse files- kf_config.json +18 -12
kf_config.json
CHANGED
|
@@ -1,23 +1,29 @@
|
|
| 1 |
{
|
| 2 |
"library_name": "kerasformers",
|
| 3 |
-
"kerasformers_version": "1.
|
| 4 |
"model_module": "kerasformers.models.clip",
|
| 5 |
"model_class": "CLIPZeroShotClassify",
|
| 6 |
"variant": "clip_vit_large_14",
|
| 7 |
"weights": "model.weights.h5",
|
|
|
|
|
|
|
| 8 |
"model_type": "clip",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
"embed_dim": 768,
|
| 10 |
-
"image_size": 224,
|
| 11 |
-
"vision_num_layers": 24,
|
| 12 |
-
"vision_hidden_dim": 1024,
|
| 13 |
-
"vision_patch_size": 14,
|
| 14 |
-
"max_seq_len": 77,
|
| 15 |
-
"vocab_size": 49408,
|
| 16 |
-
"text_hidden_dim": 768,
|
| 17 |
-
"text_num_heads": 12,
|
| 18 |
-
"text_num_layers": 12,
|
| 19 |
-
"vision_mlp_ratio": 4.0,
|
| 20 |
-
"text_mlp_ratio": 4.0,
|
| 21 |
"hidden_act": "quick_gelu",
|
| 22 |
"layer_norm_eps": 1e-05
|
| 23 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"library_name": "kerasformers",
|
| 3 |
+
"kerasformers_version": "1.2.1",
|
| 4 |
"model_module": "kerasformers.models.clip",
|
| 5 |
"model_class": "CLIPZeroShotClassify",
|
| 6 |
"variant": "clip_vit_large_14",
|
| 7 |
"weights": "model.weights.h5",
|
| 8 |
+
"schema_version": 2,
|
| 9 |
+
"dtype": "float32",
|
| 10 |
"model_type": "clip",
|
| 11 |
+
"text_config": {
|
| 12 |
+
"hidden_dim": 768,
|
| 13 |
+
"num_heads": 12,
|
| 14 |
+
"num_layers": 12,
|
| 15 |
+
"mlp_ratio": 4.0,
|
| 16 |
+
"vocab_size": 49408,
|
| 17 |
+
"max_seq_len": 77
|
| 18 |
+
},
|
| 19 |
+
"vision_config": {
|
| 20 |
+
"num_layers": 24,
|
| 21 |
+
"hidden_dim": 1024,
|
| 22 |
+
"patch_size": 14,
|
| 23 |
+
"mlp_ratio": 4.0,
|
| 24 |
+
"image_size": 224
|
| 25 |
+
},
|
| 26 |
"embed_dim": 768,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
"hidden_act": "quick_gelu",
|
| 28 |
"layer_norm_eps": 1e-05
|
| 29 |
}
|