Instructions to use zeromodels/t5_3b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- ZeroModels
How to use zeromodels/t5_3b 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/t5_3b") - Keras
How to use zeromodels/t5_3b 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/t5_3b") - Notebooks
- Google Colab
- Kaggle
Migrate to zeromodels (rename kf_*.json -> zm_*.json, fix refs in config + README, ensure tag + badge)
dc94d79 verified Download zm_config.json from zeromodels/t5_3b: direct link, hf CLI and curl.
- Browser
- Download file 733 Bytes
-
https://huggingface.co/zeromodels/t5_3b/resolve/main/zm_config.json
- Command line
-
hf download hf://zeromodels/t5_3b/zm_config.json
-
curl -L -o zm_config.json https://huggingface.co/zeromodels/t5_3b/resolve/main/zm_config.json
733 Bytes
| { | |
| "library_name": "zeromodels", | |
| "zeromodels_version": "1.2.4", | |
| "model_module": "zeromodels.models.t5", | |
| "model_class": "T5Model", | |
| "variant": "t5_3b", | |
| "weights": "model.weights.json", | |
| "schema_version": 2, | |
| "weight_dtype": "float32", | |
| "model_type": "t5", | |
| "text_config": { | |
| "vocab_size": 32128, | |
| "embed_dim": 1024, | |
| "key_value_dim": 128, | |
| "mlp_dim": 16384, | |
| "num_layers": 24, | |
| "num_decoder_layers": 24, | |
| "num_heads": 32, | |
| "relative_attention_num_buckets": 32, | |
| "relative_attention_max_distance": 128, | |
| "hidden_act": "relu", | |
| "layer_norm_eps": 1e-06, | |
| "dropout": 0.1, | |
| "tie_word_embeddings": true, | |
| "pad_token_id": 0, | |
| "eos_token_id": 1, | |
| "decoder_start_token_id": 0 | |
| } | |
| } |