Instructions to use kerasformers/roberta_base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use kerasformers/roberta_base with Keras:
# Available backend options are: "jax", "torch", "tensorflow". import os os.environ["KERAS_BACKEND"] = "jax" import keras model = keras.saving.load_model("hf://kerasformers/roberta_base") - KerasFormers
How to use kerasformers/roberta_base with KerasFormers:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
| license: mit | |
| library_name: keras | |
| pipeline_tag: fill-mask | |
| tags: | |
| - keras | |
| - kerasformers | |
| - tf | |
| - jax | |
| - pytorch | |
| - backend-agnostic | |
| - roberta | |
| - fill-mask | |
| base_model: | |
| - FacebookAI/roberta-base | |
| # RoBERTa (roberta_base) | |
| A pure [Keras 3](https://keras.io) port of **RoBERTa**, converted from [`FacebookAI/roberta-base`](https://huggingface.co/FacebookAI/roberta-base) (Hugging Face Transformers). | |
| The weights are **backend-agnostic**: the same checkpoint loads and runs identically under the JAX, TensorFlow, or PyTorch Keras backend (`KERAS_BACKEND=jax|tensorflow|torch`), via [kerasformers](https://github.com/IMvision12/KerasFormers). | |
| ## Usage | |
| ```python | |
| from kerasformers.models.roberta import RobertaModel | |
| model = RobertaModel.from_weights("kerasformers/roberta_base") | |
| ``` | |