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
๐ Training support for transformers/megatron backends
#20
by study-hjt - opened
๐ ms-swift/mcore-bridge supports training gemma-4-12B-it using the transformers/megatron backend.
PR: https://github.com/modelscope/ms-swift/pull/9487, https://github.com/modelscope/mcore-bridge/pull/108
shell: https://github.com/modelscope/ms-swift/tree/main/examples/models/gemma4
Hi @study-hjt -
Thanks for sharing this! It's Great to see support for training gemma-4-12B-it with the Transformers/Megatron backend. The PRs will be helpful for the community.