Model reference · open weights

gemma-3-pt

LLMs google Vision + text 6 builds Open, with conditions 84k dl/mo

gemma-3-pt is an open-weight language model from Google. gemma-3-4b-pt (BF16) weighs 8.6 GB; the smallest configuration that runs it is RTX 3060 12 GB.

For self-hosting, compare this build's requirements below with the GPU you plan to rent.

  • Gemma 3 is a multimodal model from Google that processes text and image inputs to generate text outputs.
  • The 4.3B parameter pre-trained variant supports a 128K token context window and is trained on data covering over 140 languages.
  • It is released under the gemma license and is designed for tasks such as question answering, summarization, and reasoning.

Summary of the google/gemma-3-4b-pt model card, 2026-10-01. The estimate below is for another build of the family.

What it is

Released byGoogle
Released2025-02-20
Parameters4.3B
VRAM8.6 GB for the weights

What it runs on

Memory and cards for gemma-3-4b-pt (BF16)

8.6 GBweights, file size
20 MBcache per 1K tokens
629 MBwindow cache per request
2.1 GBruntime overhead, at least
131,072 tokenscontext max
CardRequests at onceContext maxMemory
8K each32K each
RTX 3060 12 GB113K11.6 GB
RTX 4060 Ti 16 GB53all 128K15.4 GB
RTX 3090 24 GB159all 128K23.4 GB
RTX 4090 24 GB159all 128K23.4 GB
RTX 5090 32 GB2515all 128K31.0 GB
L40S 48 GB4125all 128K44.0 GB
A100 80 GB8451all 128K78.2 GB
H100 80 GB5222all 128K78.1 GB
RTX PRO 6000 Blackwell 96 GB6627all 128K93.8 GB
DGX Spark (GB10) 128 GB unified7732all 128K107 GB
H200 141 GB10343all 128K138 GB
B200 180 GB13533all 128K176 GB
2× RTX 3060 12 GB
tensor parallel
138all 128K11.6 GB a card
2× RTX 4060 Ti 16 GB
tensor parallel
2213all 128K15.4 GB a card
Memory needed at each load
Requests at once8K tokens each32K tokens each
111.5 GB12.0 GB
514.7 GB17.2 GB
817.1 GB21.1 GB
1623.5 GB31.5 GB
3236.2 GB52.3 GB
6461.7 GB93.9 GB

One card, with vLLM's small-card settings.

Builds

Sizes, precisions & builds

BuildParamsPrecisionWeightsSmallest setup
gemma-3-4b-pt ↗ 4.3BBF16 8.6 GBRTX 3060 12 GB
gemma-3-1b-pt ↗ 1.0BBF16 2.0 GBRTX 3060 12 GB
gemma-3-12b-pt ↗ 12.2BBF16 24.4 GBRTX 5090 32 GB
gemma-3-27b-pt ↗ 27.4BBF16 54.9 GBH100 80 GB
gemma-3-12b-it ↗
packaged by unsloth
12.2BBF16 24.4 GBRTX 5090 32 GB
gemma-3-4b-pt (above) ↗
packaged by unsloth
4.3BBF16 8.6 GBRTX 3060 12 GB

From the model card

What Google says about gemma-3-pt

Read the model card

Model Page: Gemma

Resources and Technical Documentation:

  • [Gemma 3 Technical Report][g3-tech-report]
  • [Responsible Generative AI Toolkit][rai-toolkit]
  • [Gemma on Kaggle][kaggle-gemma]
  • [Gemma on Vertex Model Garden][vertex-mg-gemma3]

Terms of Use: [Terms][terms]

Authors: Google DeepMind

Model Information

Summary description and brief definition of inputs and outputs.

Description

Gemma is a family of lightweight, state-of-the-art open models from Google, built from the same research and technology used to create the Gemini models. Gemma 3 models are multimodal, handling text and image input and generating text output, with open weights for both pre-trained variants and instruction-tuned variants. Gemma 3 has a large, 128K context window, multilingual support in over 140 languages, and is available in more sizes than previous versions. Gemma 3 models are well-suited for a variety of text generation and image understanding tasks, including question answering, summarization, and reasoning. Their relatively small size makes it possible to deploy them in environments with limited resources such as laptops, desktops or your own cloud infrastructure, democratizing access to state of the art AI models and helping foster innovation for everyone.

Inputs and outputs

  • Input:

    • Text string, such as a question, a prompt, or a document to be summarized
    • Images, normalized to 896 x 896 resolution and encoded to 256 tokens each
    • Total input context of 128K tokens for the 4B, 12B, and 27B sizes, and 32K tokens for the 1B size
  • Output:

    • Generated text in response to the input, such as an answer to a question, analysis of image content, or a summary of a document
    • Total output context of 8192 tokens

Usage

Below, there are some code snippets on how to get quickly started with running the model. First, install the Transformers library. Gemma 3 is supported starting from transformers 4.50.0.

$ pip install -U transformers

Then, copy the snippet from the section that is relevant for your use case.

Running with the pipeline API

You can initialize the model and processor for inference with pipeline as follows.

from transformers import pipeline
import torch

pipe = pipeline(
    "image-text-to-text",
    model="google/gemma-3-12b-it",
    device="cuda",
    torch_dtype=torch.bfloat16
)

With instruction-tuned models, you need to use chat templates to process our inputs first. Then, you can pass it to the pipeline.

messages = [
    {
        "role": "system",
        "content": [{"type": "text", "text": "You are a helpful assistant."}]
    },
    {
        "role": "user",
        "content": [
            {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"},
            {"type": "text", "text": "What animal is on the candy?"}
        ]
    }
]

output = pipe(text=messages, max_new_tokens=200)
print(output[0]["generated_text"][-1]["content"])
# Okay, let's take a look!
# Based on the image, the animal on the candy is a **turtle**.
# You can see the shell shape and the head and legs.
Running the model on a single / multi GPU
# pip install accelerate

from transformers import AutoProcessor, Gemma3ForConditionalGeneration
from PIL import Image
import requests
import torch

model_id = "google/gemma-3-12b-it"

model = Gemma3ForConditionalGeneration.from_pretrained(
    model_id, device_map="auto"
).eval()

processor = AutoProcessor.from_pretrained(model_id)

messages = [
    {
        "role": "system",
        "content": [{"type": "text", "text": "You are a helpful assistant."}]
    },
    {
        "role": "user",
        "content": [
            {"type": "image", "image": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/bee.jpg"},
            {"type": "text", "text": "Describe this image in detail."}
        ]
    }
]

inputs = processor.apply_chat_template(
    messages, add_generation_prompt=True, tokenize=True,
    return_dict=True, return_tensors="pt"
).to(model.device, dtype=torch.bfloat16)

input_len = inputs["input_ids"].shape[-1]

with torch.inference_mode():
    generation = model.generate(**inputs, max_new_tokens=100, do_sample=False)
    generation = generation[0][input_len:]

decoded = processor.decode(generation, skip_special_tokens=True)
print(decoded)

# **Overall Impression:** The image is a close-up shot of a vibrant garden scene,
# focusing on a cluster of pink cosmos flowers and a busy bumblebee.
# It has a slightly soft, natural feel, likely captured in daylight.

Citation

@article{gemma_2025,
    title={Gemma 3},
    url={https://goo.gle/Gemma3Report},
    publisher={Kaggle},
    author={Gemma Team},
    year={2025}
}

Model Data

Data used for model training and how the data was processed.

Training Dataset

These models were trained on a dataset of text data that includes a wide variety of sources. The 27B model was trained with 14 trillion tokens, the 12B model was trained with 12 trillion tokens, 4B model was trained with 4 trillion tokens and 1B with 2 trillion tokens. Here are the key components:

  • Web Documents: A diverse collection of web text ensures the model is exposed to a broad range of linguistic styles, topics, and vocabulary. The training dataset includes content in over 140 languages.
  • Code: Exposing the model to code helps it to learn the syntax and patterns of programming languages, which improves its ability to generate code and understand code-related questions.
  • Mathematics: Training on mathematical text helps the model learn logical reasoning, symbolic representation, and to address mathematical queries.
  • Images: A wide range of images enables the model to perform image analysis and visual data e

Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.

© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms