Instructions to use keras/deberta_v3_base_multi with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- KerasHub
How to use keras/deberta_v3_base_multi with KerasHub:
import keras_hub # Load TextClassifier model text_classifier = keras_hub.models.TextClassifier.from_preset( "hf://keras/deberta_v3_base_multi", num_classes=2, ) # Fine-tune text_classifier.fit(x=["Thilling adventure!", "Total snoozefest."], y=[1, 0]) # Classify text text_classifier.predict(["Not my cup of tea."])import keras_hub # Create a MaskedLM model task = keras_hub.models.MaskedLM.from_preset("hf://keras/deberta_v3_base_multi")import keras_hub # Create a Backbone model unspecialized for any task backbone = keras_hub.models.Backbone.from_preset("hf://keras/deberta_v3_base_multi") - Keras
How to use keras/deberta_v3_base_multi 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/deberta_v3_base_multi") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,5 +1,8 @@
|
|
| 1 |
---
|
| 2 |
library_name: keras-hub
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
| 4 |
## Model Overview
|
| 5 |
DeBERTaV3 encoder networks are a set of transformer encoder models published by Microsoft. DeBERTa improves the BERT and RoBERTa models using disentangled attention and enhanced mask decoder.
|
|
@@ -143,4 +146,4 @@ classifier = keras_hub.models.DebertaV3Classifier.from_preset(
|
|
| 143 |
preprocessor=None,
|
| 144 |
)
|
| 145 |
classifier.fit(x=features, y=labels, batch_size=2)
|
| 146 |
-
```
|
|
|
|
| 1 |
---
|
| 2 |
library_name: keras-hub
|
| 3 |
+
license: mit
|
| 4 |
+
tags:
|
| 5 |
+
- text-classification
|
| 6 |
---
|
| 7 |
## Model Overview
|
| 8 |
DeBERTaV3 encoder networks are a set of transformer encoder models published by Microsoft. DeBERTa improves the BERT and RoBERTa models using disentangled attention and enhanced mask decoder.
|
|
|
|
| 146 |
preprocessor=None,
|
| 147 |
)
|
| 148 |
classifier.fit(x=features, y=labels, batch_size=2)
|
| 149 |
+
```
|