Skip to main content

Model guide

Gemma 3 12B Instruct

Gemma 3 12B is the middle-sized text-and-image option between the 4B and 27B checkpoints. Compare it on the same screenshot or document question when the 4B model misses details. Allow for the image-processing files and workload as well as the language weights; the published context limit is not a hardware recommendation.

12BMultimodal131,072 token contextView the model card →

At a glance

Parameters
12B
Accepts
Text · Image · Video
Returns
Text
Published context limit
131,072 tokens
Model format
safetensors · GGUF
Software and download hosts
Ollama · Transformers · Kaggle. Follow the exact setup below; this list does not establish support for every format, input type or software version.
Suggested compression
Q4_K_M
Model-weight download
Q4_K_M weights · 7.30 GBbartowski (community conversion)google_gemma-3-12b-it-Q4_K_M.gguf
Image-projector download
mmproj-google_gemma-3-12b-it-bf16.gguf · 0.85 GB. Both downloads total 8.15 GB.
Languages
English · 140+ languages

Will it fit?

Gemma 3 12B Instruct · Q4_K_M download. Fit depends on your computer, the app you run it in and the conversation length you need. Image processing and any companion files need additional memory.

Check on your computer

Best for

  • Repeat the 4B receipt test at the same resolution. Keep 12B if it clears a transcription or arithmetic error that matters in your documents.

Choose something else when

  • Allow for the 8.15 GB image download, runtime and image processing before loading.

Using image input

Image setup: follow the image check.

First setup

Check a representative task

Compare the same receipt image with the 4B checkpoint; keep resolution and the prompt fixed.

Setup for this check: Open llama.cpp image setup and start the server with the matching projector.

Test image

In the llama.cpp vision session, attach this image and paste the question below. Keep the answer key out of the prompt. Crop to the table if you cannot save the image.

Read the image. List each line total, then calculate the combined total. Do not add tax or delivery charges.

Check the result: Cedar: $21; Maple: $22; combined: $43. The image supplies no tax or delivery charge.

The image attachment and matching image-processing components must actually be loaded. A text-only run, or an answer inferred from pasted text, does not pass the image check. This small fixture does not establish accuracy on scans, complex charts or real documents.

This creates a 4,096-token copy of gemma3:12b named gemma-3-12b-it-short-context. Save the following as a file named Modelfile in your working folder:

FROM gemma3:12b
PARAMETER num_ctx 4096

Then run these commands from that folder:

ollama pull gemma3:12b
ollama create gemma-3-12b-it-short-context -f ./Modelfile
ollama run gemma-3-12b-it-short-context

Run the task check. Attach the image in a client that supports image input for this model. While the model is loaded, run ollama ps in another terminal and check CONTEXT and PROCESSOR.

The recorded Ollama package is Q4_K_M: 7.31 GB of model weights and 0.85 GB of media companion weights. Use Ollama 0.30.0 or a supporting newer release. A Hugging Face GGUF or MLX checkpoint is a separate representation; choose the matching source and runner in the memory calculator.

See Ollama context settings and the Modelfile instructions.

Other models for this task