Model reference · open weights
gemma-3-pt is an open-weight language model from Google. gemma-3-12b-pt (BF16) weighs 24.4 GB; the smallest configuration that runs it is RTX 5090 32 GB.
For self-hosting, compare this build's requirements below with the GPU you plan to rent.
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 by | |
|---|---|
| Released | 2025-02-20 |
| Parameters | 4.3B |
| VRAM | 24.4 GB for the weights |
What it runs on
| Card | Requests at once | Context max | Memory | |
|---|---|---|---|---|
| 8K each | 32K each | |||
| RTX 3060 12 GB … RTX 4090 24 GB 4 smaller cards | ||||
| RTX 5090 32 GB | 2 | 1 | 41K | 31.0 GB |
| L40S 48 GB | 7 | 4 | all 128K | 44.0 GB |
| A100 80 GB | 23 | 13 | all 128K | 78.2 GB |
| H100 80 GB | 14 | 5 | all 128K | 78.1 GB |
| RTX PRO 6000 Blackwell 96 GB | 19 | 7 | all 128K | 93.8 GB |
| DGX Spark (GB10) 128 GB unified | 23 | 9 | all 128K | 107 GB |
| H200 141 GB | 32 | 13 | all 128K | 138 GB |
| B200 180 GB | 44 | 11 | all 128K | 176 GB |
| 2× RTX 4090 24 GB tensor parallel | 8 | 4 | all 128K | 23.4 GB a card |
| 2× RTX 3090 24 GB tensor parallel | 8 | 4 | all 128K | 23.4 GB a card |
| 2× RTX 5090 32 GB tensor parallel | 15 | 8 | all 128K | 31.0 GB a card |
| 2× L40S 48 GB tensor parallel | 26 | 15 | all 128K | 44.0 GB a card |
| Requests at once | 8K tokens each | 32K tokens each |
|---|---|---|
| 1 | 28.8 GB | 30.4 GB |
| 5 | 37.6 GB | 45.7 GB |
| 8 | 44.3 GB | 57.2 GB |
| 16 | 62.0 GB | 87.8 GB |
| 32 | 97.4 GB | 149 GB |
| 64 | 168 GB | 271 GB |
One card, with vLLM's small-card settings.
Builds
| Build | Params | Precision | Weights | Smallest setup |
|---|---|---|---|---|
| gemma-3-4b-pt ↗ | 4.3B | BF16 | 8.6 GB | RTX 3060 12 GB |
| gemma-3-1b-pt ↗ | 1.0B | BF16 | 2.0 GB | RTX 3060 12 GB |
| gemma-3-12b-pt (above) ↗ | 12.2B | BF16 | 24.4 GB | RTX 5090 32 GB |
| gemma-3-27b-pt ↗ | 27.4B | BF16 | 54.9 GB | H100 80 GB |
| gemma-3-12b-it ↗ packaged by unsloth |
12.2B | BF16 | 24.4 GB | RTX 5090 32 GB |
| gemma-3-4b-pt ↗ packaged by unsloth |
4.3B | BF16 | 8.6 GB | RTX 3060 12 GB |
From the model card
Model Page: Gemma
Resources and Technical Documentation:
Terms of Use: [Terms][terms]
Authors: Google DeepMind
Summary description and brief definition of inputs and outputs.
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.
Input:
Output:
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.
pipeline APIYou 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.
# 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.
@article{gemma_2025,
title={Gemma 3},
url={https://goo.gle/Gemma3Report},
publisher={Kaggle},
author={Gemma Team},
year={2025}
}
Data used for model training and how the data was processed.
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:
Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.