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
I've been having a bunch of issues trying to do translations from Chinese to English
Was testing this model out on just a few things I had in my history for other models, translating a few Chinese phrases to English.
But I've been getting some weird behavior, where the model has been claiming to see typos or broken characters, and sometimes just start looping in its thinking traces.
I saw this behavior first with unsloth/gemma-4-12b-it-GGUF:UD-Q8_K_XL, then I tried ggml-org/gemma-4-12B-it-GGUF:BF16, then I tried the Huggingface Space (https://huggingface.co/spaces/huggingface-projects/gemma-4-12b-it) though I only got one try as a free user. In all of these I saw kind of weird behavior like this. Thinking was enabled in all of these.
I then tried litert-lm CLI, and I don't see the behavior. But I notice thinking is disabled in litert-lm CLI, and I wasn't able to figure out a way to enable it. So I tried ggml-org/gemma-4-12B-it-GGUF:BF16 again with thinking disabled, and it seems to be working fine. So it looks like this behavior might be related to enabling thinking, though I haven't only done a few manual tests, I haven't done enough to be certain of it.
I do note that "The Gemma 4 12B is being updated, we'll be back online soon", so maybe a fix for this issue is already being pushed, not sure.