Image-Text-to-Text
KerasFormers
Keras
PyTorch
JAX
TensorFlow
English
gemma3n
gemma-3n
audio-text-to-text
multimodal
Instructions to use kerasformers/gemma-3n-e2b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- KerasFormers
How to use kerasformers/gemma-3n-e2b with KerasFormers:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Keras
How to use kerasformers/gemma-3n-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://kerasformers/gemma-3n-e2b") - Notebooks
- Google Colab
- Kaggle
| { | |
| "library_name": "kerasformers", | |
| "kerasformers_version": "1.2.1", | |
| "model_module": "kerasformers.models.gemma3n", | |
| "model_class": "Gemma3nConditionalGenerate", | |
| "variant": "gemma-3n-e2b", | |
| "weights": "model.weights.h5", | |
| "schema_version": 2, | |
| "weight_dtype": "bfloat16", | |
| "model_type": "gemma3n", | |
| "text_config": { | |
| "vocab_size": 262400, | |
| "embed_dim": 2048, | |
| "mlp_dim": [ | |
| 8192, | |
| 8192, | |
| 8192, | |
| 8192, | |
| 8192, | |
| 8192, | |
| 8192, | |
| 8192, | |
| 8192, | |
| 8192, | |
| 8192, | |
| 8192, | |
| 8192, | |
| 8192, | |
| 8192, | |
| 8192, | |
| 8192, | |
| 8192, | |
| 8192, | |
| 8192, | |
| 8192, | |
| 8192, | |
| 8192, | |
| 8192, | |
| 8192, | |
| 8192, | |
| 8192, | |
| 8192, | |
| 8192, | |
| 8192 | |
| ], | |
| "num_layers": 30, | |
| "num_heads": 8, | |
| "num_kv_heads": 2, | |
| "head_dim": 256, | |
| "sliding_window": 512, | |
| "sliding_window_pattern": 5, | |
| "layer_types": [ | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention" | |
| ], | |
| "final_logit_softcapping": 30.0, | |
| "norm_eps": 1e-06, | |
| "rope_theta": 1000000.0, | |
| "rope_local_theta": 10000.0, | |
| "hidden_activation": "gelu_pytorch_tanh", | |
| "tie_embeddings": true, | |
| "vocab_size_per_layer_input": 262144, | |
| "hidden_size_per_layer_input": 256, | |
| "altup_num_inputs": 4, | |
| "altup_active_idx": 0, | |
| "altup_coef_clip": 120.0, | |
| "altup_correct_scale": true, | |
| "num_kv_shared_layers": 10, | |
| "laurel_rank": 64, | |
| "activation_sparsity_pattern": [ | |
| 0.95, | |
| 0.95, | |
| 0.95, | |
| 0.95, | |
| 0.95, | |
| 0.95, | |
| 0.95, | |
| 0.95, | |
| 0.95, | |
| 0.95, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0 | |
| ] | |
| }, | |
| "vision_config": { | |
| "architecture": "mobilenetv5_300m_enc", | |
| "hidden_size": 2048, | |
| "vocab_size": 128, | |
| "vocab_offset": 262144, | |
| "rms_norm_eps": 1e-06, | |
| "do_pooling": false | |
| }, | |
| "audio_config": { | |
| "vocab_size": 128, | |
| "vocab_offset": 262272, | |
| "input_feat_size": 128, | |
| "hidden_size": 1536, | |
| "rms_norm_eps": 1e-06, | |
| "gradient_clipping": 10000000000.0, | |
| "conf_attention_chunk_size": 12, | |
| "conf_attention_context_left": 13, | |
| "conf_attention_context_right": 0, | |
| "conf_attention_logit_cap": 50.0, | |
| "conf_num_attention_heads": 8, | |
| "conf_num_hidden_layers": 12, | |
| "conf_conv_kernel_size": 5, | |
| "conf_reduction_factor": 4, | |
| "conf_residual_weight": 0.5, | |
| "sscp_conv_channel_size": [ | |
| 128, | |
| 32 | |
| ], | |
| "sscp_conv_group_norm_eps": 0.001, | |
| "sscp_conv_kernel_size": [ | |
| [ | |
| 3, | |
| 3 | |
| ], | |
| [ | |
| 3, | |
| 3 | |
| ] | |
| ], | |
| "sscp_conv_stride_size": [ | |
| [ | |
| 2, | |
| 2 | |
| ], | |
| [ | |
| 2, | |
| 2 | |
| ] | |
| ] | |
| }, | |
| "audio_soft_tokens_per_image": 188, | |
| "vision_soft_tokens_per_image": 256, | |
| "boi_token_id": 255999, | |
| "eoi_token_id": 262144, | |
| "image_token_id": 262145, | |
| "boa_token_id": 256000, | |
| "eoa_token_id": 262272, | |
| "audio_token_id": 262273, | |
| "tie_word_embeddings": true | |
| } | |