Instructions to use keras/bert_base_multi with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- KerasHub
How to use keras/bert_base_multi with KerasHub:
import keras_hub # Load TextClassifier model text_classifier = keras_hub.models.TextClassifier.from_preset( "hf://keras/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/bert_base_multi")import keras_hub # Create a Backbone model unspecialized for any task backbone = keras_hub.models.Backbone.from_preset("hf://keras/bert_base_multi") - Keras
How to use keras/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/bert_base_multi") - Notebooks
- Google Colab
- Kaggle
Update README.md with new model card content
Browse files
README.md
CHANGED
|
@@ -12,7 +12,7 @@ Weights and Keras model code are released under the [Apache 2 License](https://g
|
|
| 12 |
|
| 13 |
## Links
|
| 14 |
|
| 15 |
-
* [Bert Quickstart Notebook](https://www.kaggle.com/code/
|
| 16 |
* [Bert API Documentation](https://keras.io/api/keras_hub/models/bert/)
|
| 17 |
* [Bert Model Card](https://github.com/google-research/bert/blob/master/README.md)
|
| 18 |
* [KerasHub Beginner Guide](https://keras.io/guides/keras_hub/getting_started/)
|
|
@@ -44,6 +44,7 @@ The following model checkpoints are provided by the Keras team. Full code exampl
|
|
| 44 |
| `bert_base_multi` | 177.85M | 12-layer BERT model where case is maintained. |
|
| 45 |
| `bert_large_en_uncased` | 335.14M | 24-layer BERT model where all input is lowercased. |
|
| 46 |
| `bert_large_en` | 333.58M | 24-layer BERT model where case is maintained. |
|
|
|
|
| 47 |
|
| 48 |
## Example Usage
|
| 49 |
```python
|
|
|
|
| 12 |
|
| 13 |
## Links
|
| 14 |
|
| 15 |
+
* [Bert Quickstart Notebook](https://www.kaggle.com/code/laxmareddypatlolla/bert-quickstart-notebook)
|
| 16 |
* [Bert API Documentation](https://keras.io/api/keras_hub/models/bert/)
|
| 17 |
* [Bert Model Card](https://github.com/google-research/bert/blob/master/README.md)
|
| 18 |
* [KerasHub Beginner Guide](https://keras.io/guides/keras_hub/getting_started/)
|
|
|
|
| 44 |
| `bert_base_multi` | 177.85M | 12-layer BERT model where case is maintained. |
|
| 45 |
| `bert_large_en_uncased` | 335.14M | 24-layer BERT model where all input is lowercased. |
|
| 46 |
| `bert_large_en` | 333.58M | 24-layer BERT model where case is maintained. |
|
| 47 |
+
| `bert_tiny_en_uncased_sst2 ` | 4.39M | he bert_tiny_en_uncased backbone model fine-tuned on the SST-2 sentiment analysis dataset. |
|
| 48 |
|
| 49 |
## Example Usage
|
| 50 |
```python
|