Instructions to use zeromodels/gemma-4-e2b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- ZeroModels
How to use zeromodels/gemma-4-e2b 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") - Keras
How to use zeromodels/gemma-4-e2b 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") - Notebooks
- Google Colab
- Kaggle
File size: 135 Bytes
cc5734b | 1 2 3 4 | version https://git-lfs.github.com/spec/v1
oid sha256:c01c7efd2f0879c159c287b64352f4febaac48d1992deb6b31087cfdab0c6f7e
size 3448419452
|