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
ValueError: Cannot use apply_chat_template because this processor does not have a chat template.
transformers=5.10.1
ValueError: Cannot use apply_chat_template because this processor does not have a chat template.
Hi @aimagee
This error happens because you are using a raw base model gemma-4-12b which does not contain a built-in chat template config.Please switch to the instruction-tuned gemma-4-12b-it model .
https://huggingface.co/google/gemma-4-12B-it/tree/main
Thanks
Hi @aimagee
This error happens because you are using a raw base model gemma-4-12b which does not contain a built-in chat template config.Please switch to the instruction-tuned gemma-4-12b-it model .
https://huggingface.co/google/gemma-4-12B-it/tree/main
Thanks
@pannaga10 Thanks your reply, what are the differences between gemma-4-12B and gemma-4-12B-it, and is model.safetensors file the same?