Instructions to use google/gemma-4-E4B-it-qat-q4_0-unquantized with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use google/gemma-4-E4B-it-qat-q4_0-unquantized with Transformers:
# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("google/gemma-4-E4B-it-qat-q4_0-unquantized") model = AutoModelForMultimodalLM.from_pretrained("google/gemma-4-E4B-it-qat-q4_0-unquantized", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Raise per-image vision soft-token budget from 280 to 1120
#2
by lucianommartins - opened
- config.json +2 -2
- processor_config.json +3 -3
config.json
CHANGED
|
@@ -156,7 +156,7 @@
|
|
| 156 |
"attention_bias": false,
|
| 157 |
"attention_dropout": 0.0,
|
| 158 |
"chunk_size_feed_forward": 0,
|
| 159 |
-
"default_output_length":
|
| 160 |
"dtype": "bfloat16",
|
| 161 |
"global_head_dim": 64,
|
| 162 |
"head_dim": 64,
|
|
@@ -193,5 +193,5 @@
|
|
| 193 |
"standardize": false,
|
| 194 |
"use_clipped_linears": true
|
| 195 |
},
|
| 196 |
-
"vision_soft_tokens_per_image":
|
| 197 |
}
|
|
|
|
| 156 |
"attention_bias": false,
|
| 157 |
"attention_dropout": 0.0,
|
| 158 |
"chunk_size_feed_forward": 0,
|
| 159 |
+
"default_output_length": 1120,
|
| 160 |
"dtype": "bfloat16",
|
| 161 |
"global_head_dim": 64,
|
| 162 |
"head_dim": 64,
|
|
|
|
| 193 |
"standardize": false,
|
| 194 |
"use_clipped_linears": true
|
| 195 |
},
|
| 196 |
+
"vision_soft_tokens_per_image": 1120
|
| 197 |
}
|
processor_config.json
CHANGED
|
@@ -33,19 +33,19 @@
|
|
| 33 |
0.0
|
| 34 |
],
|
| 35 |
"image_processor_type": "Gemma4ImageProcessor",
|
| 36 |
-
"image_seq_length":
|
| 37 |
"image_std": [
|
| 38 |
1.0,
|
| 39 |
1.0,
|
| 40 |
1.0
|
| 41 |
],
|
| 42 |
-
"max_soft_tokens":
|
| 43 |
"patch_size": 16,
|
| 44 |
"pooling_kernel_size": 3,
|
| 45 |
"resample": 3,
|
| 46 |
"rescale_factor": 0.00392156862745098
|
| 47 |
},
|
| 48 |
-
"image_seq_length":
|
| 49 |
"processor_class": "Gemma4Processor",
|
| 50 |
"video_processor": {
|
| 51 |
"do_convert_rgb": true,
|
|
|
|
| 33 |
0.0
|
| 34 |
],
|
| 35 |
"image_processor_type": "Gemma4ImageProcessor",
|
| 36 |
+
"image_seq_length": 1120,
|
| 37 |
"image_std": [
|
| 38 |
1.0,
|
| 39 |
1.0,
|
| 40 |
1.0
|
| 41 |
],
|
| 42 |
+
"max_soft_tokens": 1120,
|
| 43 |
"patch_size": 16,
|
| 44 |
"pooling_kernel_size": 3,
|
| 45 |
"resample": 3,
|
| 46 |
"rescale_factor": 0.00392156862745098
|
| 47 |
},
|
| 48 |
+
"image_seq_length": 1120,
|
| 49 |
"processor_class": "Gemma4Processor",
|
| 50 |
"video_processor": {
|
| 51 |
"do_convert_rgb": true,
|