xaitalk/gemma-4-E2B-it-tf

Derived weights of google/gemma-4-E2B-it in TensorFlow (Keras 3) format, produced by xaitalk's deterministic gemma4_weight_sync.sync_gemma4_pt_to_* pipeline.

These weights are not a mirror of the upstream — they are a framework conversion. The underlying parameter values are identical to the PyTorch safetensors (Apache 2.0), just laid out for TensorFlow (Keras 3) consumption so users don't have to re-run the sync at load time.

File

Path tf_keras.weights.h5
Size 7.59 GB
SHA-256 9f2aa4072007f430dcadcfd764a367c4053fedc860e12197656a9167b98a479b
Derived-from google/gemma-4-E2B-it
License Apache 2.0
Sync tool xaitalk.adapters.thinking.gemma4_weight_sync

Loading

from huggingface_hub import hf_hub_download
from xaitalk.adapters.thinking.gemma4_models import get_tf_classes
import tensorflow as tf

path = hf_hub_download(repo_id="xaitalk/gemma-4-E2B-it-tf",
                       filename="tf_keras.weights.h5")

_, _, TFGemma4Model = get_tf_classes()
tf_model = TFGemma4Model(name="gemma4_tf")
# Build the model with a dummy forward before loading weights.
tf_model(tf.zeros((1, 4, 1536)), tf.zeros((1, 4, 35, 256)), tf.zeros((262144, 1536)))
tf_model.load_weights(path)

Verification

xaitalk's cross-framework benchmark on Gemma 4 E2B (2026-05-28, A100 80GB):

Modality Methods r
text 8/8 single-grad + 4/4 multi-grad r=1.0000
image+text 8/8 single-grad + 4/4 multi-grad r=1.0000
audio+text 8/8 single-grad + 4/4 multi-grad r=1.0000

Cross-framework Pearson correlation between PyTorch, TensorFlow, and JAX attribution outputs is 1.0000 (project default 4-decimal display; underlying float-precision range [0.9999998, 1.0]).

License

Apache 2.0, inherited from the upstream Gemma 4 weights. All credit for the model goes to Google DeepMind. The TensorFlow (Keras 3) layout was produced via deterministic numerical conversion; no parameter values were modified beyond the bit-format change required by the framework.

— xaitalk

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for xaitalk/gemma-4-E2B-it-tf

Finetuned
(301)
this model

Collection including xaitalk/gemma-4-E2B-it-tf