Instructions to use keras/xlm_roberta_large_multi with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- KerasHub
How to use keras/xlm_roberta_large_multi with KerasHub:
import keras_hub # Load TextClassifier model text_classifier = keras_hub.models.TextClassifier.from_preset( "hf://keras/xlm_roberta_large_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/xlm_roberta_large_multi")import keras_hub # Create a Backbone model unspecialized for any task backbone = keras_hub.models.Backbone.from_preset("hf://keras/xlm_roberta_large_multi") - Keras
How to use keras/xlm_roberta_large_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/xlm_roberta_large_multi") - Notebooks
- Google Colab
- Kaggle
Update README.md with new model card content
Browse files
README.md
CHANGED
|
@@ -6,7 +6,7 @@ tags:
|
|
| 6 |
- keras
|
| 7 |
pipeline_tag: text-classification
|
| 8 |
---
|
| 9 |
-
## Model Overview
|
| 10 |
An XLM-RoBERTa encoder network.
|
| 11 |
|
| 12 |
This class implements a bi-directional Transformer-based encoder as
|
|
@@ -138,4 +138,4 @@ classifier = keras_hub.models.XLMRobertaClassifier.from_preset(
|
|
| 138 |
preprocessor=None,
|
| 139 |
)
|
| 140 |
classifier.fit(x=features, y=labels, batch_size=2)
|
| 141 |
-
```
|
|
|
|
| 6 |
- keras
|
| 7 |
pipeline_tag: text-classification
|
| 8 |
---
|
| 9 |
+
### Model Overview
|
| 10 |
An XLM-RoBERTa encoder network.
|
| 11 |
|
| 12 |
This class implements a bi-directional Transformer-based encoder as
|
|
|
|
| 138 |
preprocessor=None,
|
| 139 |
)
|
| 140 |
classifier.fit(x=features, y=labels, batch_size=2)
|
| 141 |
+
```
|