Instructions to use keras/all_mpnet_base_v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- KerasHub
How to use keras/all_mpnet_base_v2 with KerasHub:
import keras_hub # Create a TextEmbedder model task = keras_hub.models.TextEmbedder.from_preset("hf://keras/all_mpnet_base_v2")import keras_hub # Create a Backbone model unspecialized for any task backbone = keras_hub.models.Backbone.from_preset("hf://keras/all_mpnet_base_v2") - Keras
How to use keras/all_mpnet_base_v2 with Keras:
# !pip install -U keras tensorflow huggingface_hub # Keras needs TensorFlow installed to read "hf://" paths, so the tensorflow backend is selected here; # "jax" and "torch" also work for computation once TensorFlow is installed. import os os.environ["KERAS_BACKEND"] = "tensorflow" import keras model = keras.saving.load_model("hf://keras/all_mpnet_base_v2") - Notebooks
- Google Colab
- Kaggle
Update README.md with new model card content
Browse files
README.md
CHANGED
|
@@ -1,20 +1,6 @@
|
|
| 1 |
---
|
| 2 |
library_name: keras-hub
|
| 3 |
---
|
| 4 |
-
|
| 5 |
-
This model is related to a `TextEmbedder` task.
|
| 6 |
|
| 7 |
-
Model config:
|
| 8 |
-
* **name:** mp_net_backbone
|
| 9 |
-
* **trainable:** True
|
| 10 |
-
* **dtype:** {'module': 'keras', 'class_name': 'DTypePolicy', 'config': {'name': 'float32'}, 'registered_name': None}
|
| 11 |
-
* **vocabulary_size:** 30527
|
| 12 |
-
* **num_layers:** 12
|
| 13 |
-
* **num_heads:** 12
|
| 14 |
-
* **hidden_dim:** 768
|
| 15 |
-
* **intermediate_dim:** 3072
|
| 16 |
-
* **dropout:** 0.1
|
| 17 |
-
* **max_sequence_length:** 512
|
| 18 |
-
* **layer_norm_epsilon:** 1e-05
|
| 19 |
|
| 20 |
-
This model card has been generated automatically and should be completed by the model author. See [Model Cards documentation](https://huggingface.co/docs/hub/model-cards) for more information.
|
|
|
|
| 1 |
---
|
| 2 |
library_name: keras-hub
|
| 3 |
---
|
| 4 |
+
### Model Overview
|
|
|
|
| 5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
|
|
|