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, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("google/gemma-4-12B") model = AutoModelForMultimodalLM.from_pretrained("google/gemma-4-12B") - Notebooks
- Google Colab
- Kaggle
Commit ·
56820d7
1
Parent(s): 0c98506
Update max_position_embeddings to full context length (#4)
Browse files- Update max_position_embeddings to full context length (4a8c74d167622824fce70caa334ea4aee51160aa)
Co-authored-by: Douglas Reid <dougreid@users.noreply.huggingface.co>
- 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,
|