Instructions to use keras/bert_tiny_en_uncased_sst2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- KerasHub
How to use keras/bert_tiny_en_uncased_sst2 with KerasHub:
import keras_hub # Load TextClassifier model text_classifier = keras_hub.models.TextClassifier.from_preset( "hf://keras/bert_tiny_en_uncased_sst2", 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_tiny_en_uncased_sst2")import keras_hub # Create a Backbone model unspecialized for any task backbone = keras_hub.models.Backbone.from_preset("hf://keras/bert_tiny_en_uncased_sst2") - Keras
How to use keras/bert_tiny_en_uncased_sst2 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_tiny_en_uncased_sst2") - Notebooks
- Google Colab
- Kaggle
- Xet hash:
- e65bb5189a9a0c4f8e80f5b8f0a16e39765ab8876ce2e33ee13221eaefc60844
- Size of remote file:
- 17.6 MB
- SHA256:
- ed53ae7618b3a4e7f214e41c59bf74f82c7917d3147be8a57d448c3736ece334
·
Xet efficiently stores Large Files inside Git, intelligently splitting files into unique chunks and accelerating uploads and downloads. More info.