Instructions to use zeromodels/deberta_v3_base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- ZeroModels
How to use zeromodels/deberta_v3_base with ZeroModels:
# pip install -U zeromodels # ZeroModels is pure Keras 3, so pick a backend: "jax", "torch" or "tensorflow". import os os.environ["KERAS_BACKEND"] = "jax" from zeromodels import AutoZModel # AutoZModel reads the repo's model_type and loads the matching class. # For a task head use the matching loader, e.g. AutoZMImageClassify / AutoZMDetect / # AutoZMSemanticSegment / AutoZMTextGenerate (see zeromodels.auto). model = AutoZModel.from_weights("zeromodels/deberta_v3_base") - Keras
How to use zeromodels/deberta_v3_base with Keras:
# !pip install -U keras tensorflow huggingface_hub # Keras needs TensorFlow installed to read "hf://" paths, so the tensorflow backend is selected here; # "jax" and "torch" also work for computation once TensorFlow is installed. import os os.environ["KERAS_BACKEND"] = "tensorflow" import keras model = keras.saving.load_model("hf://zeromodels/deberta_v3_base") - Notebooks
- Google Colab
- Kaggle
Add Available classes section to model card
Browse files
README.md
CHANGED
|
@@ -68,6 +68,24 @@ Load any DeBERTa variant the same way with `from_weights("kerasformers/<variant>
|
|
| 68 |
| `deberta_v3_base` | [`kerasformers/deberta_v3_base`](https://huggingface.co/kerasformers/deberta_v3_base) | v3 |
|
| 69 |
| `deberta_v3_large` | [`kerasformers/deberta_v3_large`](https://huggingface.co/kerasformers/deberta_v3_large) | v3 |
|
| 70 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 71 |
## Tips
|
| 72 |
|
| 73 |
- Set `KERAS_BACKEND` **before** importing Keras / kerasformers.
|
|
|
|
| 68 |
| `deberta_v3_base` | [`kerasformers/deberta_v3_base`](https://huggingface.co/kerasformers/deberta_v3_base) | v3 |
|
| 69 |
| `deberta_v3_large` | [`kerasformers/deberta_v3_large`](https://huggingface.co/kerasformers/deberta_v3_large) | v3 |
|
| 70 |
|
| 71 |
+
## Available classes
|
| 72 |
+
|
| 73 |
+
Load any of these from this repo with `from_weights("kerasformers/deberta_v3_base")` (or on the fly via the `hf:` prefix). The pretrained backbone is shared; task heads not stored in this checkpoint start randomly initialized, ready for fine-tuning (or load a `hf:` fine-tune).
|
| 74 |
+
|
| 75 |
+
| Class | Task |
|
| 76 |
+
|---|---|
|
| 77 |
+
| `DebertaV3Model` | Encoder backbone |
|
| 78 |
+
| `DebertaV3MaskedLM` | Masked language modeling (fill-mask) |
|
| 79 |
+
| `DebertaV3SequenceClassify` | Sequence classification |
|
| 80 |
+
| `DebertaV3TokenClassify` | Token classification (NER / POS) |
|
| 81 |
+
| `DebertaV3QnA` | Extractive question answering |
|
| 82 |
+
| `DebertaV3MultipleChoice` | Multiple choice |
|
| 83 |
+
|
| 84 |
+
```python
|
| 85 |
+
from kerasformers.models.deberta_v3 import DebertaV3SequenceClassify
|
| 86 |
+
model = DebertaV3SequenceClassify.from_weights("kerasformers/deberta_v3_base")
|
| 87 |
+
```
|
| 88 |
+
|
| 89 |
## Tips
|
| 90 |
|
| 91 |
- Set `KERAS_BACKEND` **before** importing Keras / kerasformers.
|