Instructions to use google/gemma-4-12B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use google/gemma-4-12B with Transformers:
# Load model directly from transformers import AutoProcessor, AutoModelForImageTextToText processor = AutoProcessor.from_pretrained("google/gemma-4-12B") model = AutoModelForImageTextToText.from_pretrained("google/gemma-4-12B") - Notebooks
- Google Colab
- Kaggle
Update max_position_embeddings to full context length
#4
by dougreid - opened
- config.json +1 -1
config.json
CHANGED
|
@@ -102,7 +102,7 @@
|
|
| 102 |
"sliding_attention",
|
| 103 |
"full_attention"
|
| 104 |
],
|
| 105 |
-
"max_position_embeddings":
|
| 106 |
"model_type": "gemma4_unified_text",
|
| 107 |
"moe_intermediate_size": null,
|
| 108 |
"num_attention_heads": 16,
|
|
|
|
| 102 |
"sliding_attention",
|
| 103 |
"full_attention"
|
| 104 |
],
|
| 105 |
+
"max_position_embeddings": 262144,
|
| 106 |
"model_type": "gemma4_unified_text",
|
| 107 |
"moe_intermediate_size": null,
|
| 108 |
"num_attention_heads": 16,
|