Instructions to use google/gemma-4-E2B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use google/gemma-4-E2B with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("google/gemma-4-E2B", dtype="auto") - Notebooks
- Google Colab
- Kaggle
Upload folder using huggingface_hub
Browse files- config.json +1 -5
- generation_config.json +0 -1
- model.safetensors +2 -2
- processor_config.json +2 -2
config.json
CHANGED
|
@@ -77,7 +77,6 @@
|
|
| 77 |
"vocab_size": 128
|
| 78 |
},
|
| 79 |
"audio_ms_per_token": 40,
|
| 80 |
-
"audio_soft_tokens_per_image": 750,
|
| 81 |
"audio_token_id": 258881,
|
| 82 |
"boa_token_id": 256000,
|
| 83 |
"boi_token_id": 255999,
|
|
@@ -92,7 +91,6 @@
|
|
| 92 |
"attention_bias": false,
|
| 93 |
"attention_dropout": 0.0,
|
| 94 |
"attention_k_eq_v": false,
|
| 95 |
-
"attention_use_bidirectional": null,
|
| 96 |
"attn_logit_softcapping": null,
|
| 97 |
"bos_token_id": 2,
|
| 98 |
"dtype": "bfloat16",
|
|
@@ -224,9 +222,7 @@
|
|
| 224 |
}
|
| 225 |
},
|
| 226 |
"use_bidirectional_attention": "vision",
|
| 227 |
-
"use_clipped_linears": true
|
| 228 |
-
"vocab_offset": 262144,
|
| 229 |
-
"vocab_size": 128
|
| 230 |
},
|
| 231 |
"vision_soft_tokens_per_image": 280
|
| 232 |
}
|
|
|
|
| 77 |
"vocab_size": 128
|
| 78 |
},
|
| 79 |
"audio_ms_per_token": 40,
|
|
|
|
| 80 |
"audio_token_id": 258881,
|
| 81 |
"boa_token_id": 256000,
|
| 82 |
"boi_token_id": 255999,
|
|
|
|
| 91 |
"attention_bias": false,
|
| 92 |
"attention_dropout": 0.0,
|
| 93 |
"attention_k_eq_v": false,
|
|
|
|
| 94 |
"attn_logit_softcapping": null,
|
| 95 |
"bos_token_id": 2,
|
| 96 |
"dtype": "bfloat16",
|
|
|
|
| 222 |
}
|
| 223 |
},
|
| 224 |
"use_bidirectional_attention": "vision",
|
| 225 |
+
"use_clipped_linears": true
|
|
|
|
|
|
|
| 226 |
},
|
| 227 |
"vision_soft_tokens_per_image": 280
|
| 228 |
}
|
generation_config.json
CHANGED
|
@@ -1,6 +1,5 @@
|
|
| 1 |
{
|
| 2 |
"bos_token_id": 2,
|
| 3 |
-
"cache_implementation": "hybrid",
|
| 4 |
"do_sample": true,
|
| 5 |
"eos_token_id": 1,
|
| 6 |
"pad_token_id": 0,
|
|
|
|
| 1 |
{
|
| 2 |
"bos_token_id": 2,
|
|
|
|
| 3 |
"do_sample": true,
|
| 4 |
"eos_token_id": 1,
|
| 5 |
"pad_token_id": 0,
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e59bd7848f7cb681a779caa038283840a47d3766171ab75fa07a5ea9a45e6c56
|
| 3 |
+
size 10246628830
|
processor_config.json
CHANGED
|
@@ -5,8 +5,8 @@
|
|
| 5 |
"dither": 0.0,
|
| 6 |
"feature_extractor_type": "Gemma4AudioFeatureExtractor",
|
| 7 |
"feature_size": 128,
|
| 8 |
-
"fft_length":
|
| 9 |
-
"fft_overdrive":
|
| 10 |
"frame_length": 320,
|
| 11 |
"hop_length": 160,
|
| 12 |
"input_scale_factor": 1.0,
|
|
|
|
| 5 |
"dither": 0.0,
|
| 6 |
"feature_extractor_type": "Gemma4AudioFeatureExtractor",
|
| 7 |
"feature_size": 128,
|
| 8 |
+
"fft_length": 512,
|
| 9 |
+
"fft_overdrive": false,
|
| 10 |
"frame_length": 320,
|
| 11 |
"hop_length": 160,
|
| 12 |
"input_scale_factor": 1.0,
|