Instructions to use zeromodels/deberta_base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- ZeroModels
How to use zeromodels/deberta_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_base") - Keras
How to use zeromodels/deberta_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_base") - Notebooks
- Google Colab
- Kaggle
File size: 625 Bytes
24db011 08d783d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | {
"library_name": "zeromodels",
"zeromodels_version": "1.2.1",
"model_module": "zeromodels.models.deberta",
"model_class": "DebertaModel",
"variant": "deberta_base",
"weights": "model.weights.h5",
"schema_version": 2,
"weight_dtype": "float32",
"model_type": "deberta",
"text_config": {
"vocab_size": 50265,
"embed_dim": 768,
"num_layers": 12,
"num_heads": 12,
"mlp_dim": 3072,
"max_position_embeddings": 512,
"max_relative_positions": 512,
"pos_att_type": [
"c2p",
"p2c"
],
"hidden_act": "gelu",
"layer_norm_eps": 1e-07,
"pad_token_id": 0
}
} |