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