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