Instructions to use zeromodels/gemma-4-e2b-it with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- ZeroModels
How to use zeromodels/gemma-4-e2b-it 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/gemma-4-e2b-it") - Keras
How to use zeromodels/gemma-4-e2b-it with Keras:
# Available backend options are: "jax", "torch", "tensorflow". import os os.environ["KERAS_BACKEND"] = "jax" import keras model = keras.saving.load_model("hf://zeromodels/gemma-4-e2b-it") - Notebooks
- Google Colab
- Kaggle
Migrate to zeromodels (rename kf_*.json -> zm_*.json, fix refs in config + README, ensure tag + badge)
111d222 verified Download zm_preprocessor.json from zeromodels/gemma-4-e2b-it: direct link, hf CLI and curl.
- Browser
- Download file 411 Bytes
-
https://huggingface.co/zeromodels/gemma-4-e2b-it/resolve/main/zm_preprocessor.json
- Command line
-
hf download hf://zeromodels/gemma-4-e2b-it/zm_preprocessor.json
-
curl -L -o zm_preprocessor.json https://huggingface.co/zeromodels/gemma-4-e2b-it/resolve/main/zm_preprocessor.json
411 Bytes
| { | |
| "library_name": "zeromodels", | |
| "zeromodels_version": "1.2.1", | |
| "preprocessor_module": "zeromodels.models.gemma4", | |
| "preprocessor_class": "Gemma4ImageProcessor", | |
| "variant": "gemma-4-e2b-it", | |
| "patch_size": 16, | |
| "max_soft_tokens": 280, | |
| "pooling_kernel_size": 3, | |
| "rescale_factor": 0.00392156862745098, | |
| "image_mean": [ | |
| 0.0, | |
| 0.0, | |
| 0.0 | |
| ], | |
| "image_std": [ | |
| 1.0, | |
| 1.0, | |
| 1.0 | |
| ] | |
| } |