Instructions to use keras/distil_bert_base_multi with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- KerasHub
How to use keras/distil_bert_base_multi with KerasHub:
import keras_hub # Load TextClassifier model text_classifier = keras_hub.models.TextClassifier.from_preset( "hf://keras/distil_bert_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/distil_bert_base_multi")import keras_hub # Create a Backbone model unspecialized for any task backbone = keras_hub.models.Backbone.from_preset("hf://keras/distil_bert_base_multi") - Keras
How to use keras/distil_bert_base_multi with Keras:
# Available backend options are: "jax", "torch", "tensorflow". import os os.environ["KERAS_BACKEND"] = "jax" import keras model = keras.saving.load_model("hf://keras/distil_bert_base_multi") - Notebooks
- Google Colab
- Kaggle
Update README.md with new model card content
Browse files
README.md
CHANGED
|
@@ -13,7 +13,7 @@ Weights and Keras model code are released under the [Apache 2 License](https://g
|
|
| 13 |
|
| 14 |
## Links
|
| 15 |
|
| 16 |
-
* [DistilBert Quickstart Notebook](https://www.kaggle.com/code/
|
| 17 |
* [DistilBert API Documentation](https://keras.io/api/keras_hub/models/distil_bert/)
|
| 18 |
* [DistilBert Model Card](https://huggingface.co/distilbert/distilbert-base-uncased)
|
| 19 |
* [KerasHub Beginner Guide](https://keras.io/guides/keras_hub/getting_started/)
|
|
@@ -25,7 +25,7 @@ Keras and KerasHub can be installed with:
|
|
| 25 |
|
| 26 |
```
|
| 27 |
pip install -U -q keras-hub
|
| 28 |
-
pip install -U -q keras
|
| 29 |
```
|
| 30 |
|
| 31 |
Jax, TensorFlow, and Torch come preinstalled in Kaggle Notebooks. For instruction on installing them in another environment see the [Keras Getting Started](https://keras.io/getting_started/) page.
|
|
|
|
| 13 |
|
| 14 |
## Links
|
| 15 |
|
| 16 |
+
* [DistilBert Quickstart Notebook](https://www.kaggle.com/code/laxmareddypatlolla/distilbert-quickstart)
|
| 17 |
* [DistilBert API Documentation](https://keras.io/api/keras_hub/models/distil_bert/)
|
| 18 |
* [DistilBert Model Card](https://huggingface.co/distilbert/distilbert-base-uncased)
|
| 19 |
* [KerasHub Beginner Guide](https://keras.io/guides/keras_hub/getting_started/)
|
|
|
|
| 25 |
|
| 26 |
```
|
| 27 |
pip install -U -q keras-hub
|
| 28 |
+
pip install -U -q keras
|
| 29 |
```
|
| 30 |
|
| 31 |
Jax, TensorFlow, and Torch come preinstalled in Kaggle Notebooks. For instruction on installing them in another environment see the [Keras Getting Started](https://keras.io/getting_started/) page.
|