Use Gemma open models

Gemma is a set of lightweight, generative artificial intelligence (AI)open models. Gemma models are available to run in yourapplications and on your hardware, mobile devices, or hosted services. You canalso customize these models using tuning techniques so that they excel atperforming tasks that matter to you and your users. Gemma models arebased onGemini models and are intendedfor the AI development community to extend and take further.

Fine-tuning can help improve a model's performance in specific tasks. Becausemodels in the Gemma model family are open weight, you can tune any ofthem using the AI framework of your choice and the Vertex AI SDK.You can open a notebook example to fine-tune the Gemma model usinga link available on the Gemma model card in Model Garden.

The following Gemma models are available to use with Vertex AI.To learn more about and test the Gemma models, see theirModel Garden model cards.

Model nameUse casesModel Garden model card
Gemma 3nCapable of multimodal input, handling text, image, video, and audio input, and generating text outputs.Go to the Gemma 3n model card
Gemma 3Best for text generation and image understanding tasks, including question answering, summarization, and reasoning.Go to the Gemma 3 model card
Gemma 2Best for text generation, summarization, and extraction.Go to the Gemma 2 model card
GemmaBest for text generation, summarization, and extraction.Go to the Gemma model card
CodeGemmaBest for code generation and completion.Go to the CodeGemma model card
PaliGemma 2Best for image captioning tasks and visual question and answering tasks.Go to the PaliGemma 2 model card
PaliGemmaBest for image captioning tasks and visual question and answering tasks.Go to the PaliGemma model card
ShieldGemma 2Checks the safety of synthetic and natural images to help you build robust datasets and models.Go to the ShieldGemma 2 model card
TxGemmaBest for therapeutic prediction tasks, including classification, regression, or generation, and reasoning tasks.Go to the TxGemma model card
MedGemmaGemma 3 variants that are trained for performance on medical text and image comprehension.Go to the MedGemma model card
MedSigLIPSigLIP variant that is trained to encode medical images and text into a common embedding space.Go to the MedSigLIP model card
T5GemmaWell-suited for a variety of generative tasks, including question answering, summarization, and reasoning.Go to the T5Gemma model card

The following are some options for where you can use Gemma:

Use Gemma with Vertex AI

Vertex AI offers a managed platform for rapidly building and scalingmachine learning projects without needing in-house MLOps expertise. You can useVertex AI as the downstream application that serves theGemma models. For example, you might port weights from the Kerasimplementation of Gemma. Next, you can use Vertex AI toserve that version of Gemma to get predictions. We recommend usingVertex AI if you want end-to-end MLOps capabilities, value-added MLfeatures, and a serverless experience for streamlined development.

To get started with Gemma, see the following notebooks:

Use Gemma in other Google Cloud products

You can use Gemma with other Google Cloud products, such asGoogle Kubernetes Engine and Dataflow.

Use Gemma with GKE

Google Kubernetes Engine (GKE) is the Google Cloud solutionfor managed Kubernetes that provides scalability, security, resilience, and costeffectiveness. We recommend this option if you have existing Kubernetesinvestments, your organization has in-house MLOps expertise, or if you needgranular control over complex AI/ML workloads with unique security, datapipeline, and resource management requirements. To learn more, see the followingtutorials in the GKE documentation:

Use Gemma with Dataflow

You can use Gemma models with Dataflow forsentiment analysis.Use Dataflow to run inference pipelines that use theGemma models. To learn more, seeRun inference pipelines with Gemma open models.

Use Gemma with Colab

You can use Gemma with Colaboratory to create your Gemmasolution. In Colab, you can use Gemma with frameworkoptions such as PyTorch and JAX. To learn more, see:

Gemma model sizes and capabilities

Gemma models are available in several sizes so you can buildgenerative AI solutions based on your available computing resources, thecapabilities you need, and where you want to run them. Each model is availablein a tuned and an untuned version:

  • Pretrained - This version of the model wasn't trained on any specific tasksor instructions beyond the Gemma core data training set. We don'trecommend using this model without performing some tuning.

  • Instruction-tuned - This version of the model was trained with human languageinteractions so that it can participate in a conversation, similar to a basicchat bot.

  • Mix fine-tuned - This version of the model is fine-tuned on a mixture ofacademic datasets and accepts natural language prompts.

Lower parameter sizes means lower resource requirements and more deploymentflexibility.

Model nameParameters sizeInputOutputTuned versionsIntended platforms
Gemma 3n
Gemma 3n E4B4 billion effective parametersText, image and audioText
  • Pretrained
  • Instruction-tuned
Mobile devices and laptops
Gemma 3n E2B2 billion effective parametersText, image and audioText
  • Pretrained
  • Instruction-tuned
Mobile devices and laptops
Gemma 3
Gemma 27B27 billionText and imageText
  • Pretrained
  • Instruction-tuned
Large servers or server clusters
Gemma 12B12 billionText and imageText
  • Pretrained
  • Instruction-tuned
Higher-end desktop computers and servers
Gemma 4B4 billionText and imageText
  • Pretrained
  • Instruction-tuned
Desktop computers and small servers
Gemma 1B1 billionTextText
  • Pretrained
  • Instruction-tuned
Mobile devices and laptops
Gemma 2
Gemma 27B27 billionTextText
  • Pretrained
  • Instruction-tuned
Large servers or server clusters
Gemma 9B9 billionTextText
  • Pretrained
  • Instruction-tuned
Higher-end desktop computers and servers
Gemma 2B2 billionTextText
  • Pretrained
  • Instruction-tuned
Mobile devices and laptops
Gemma
Gemma 7B7 billionTextText
  • Pretrained
  • Instruction-tuned
Desktop computers and small servers
Gemma 2B2.2 billionTextText
  • Pretrained
  • Instruction-tuned
Mobile devices and laptops
CodeGemma
CodeGemma 7B7 billionTextText
  • Pretrained
  • Instruction-tuned
Desktop computers and small servers
CodeGemma 2B2 billionTextText
  • Pretrained
Desktop computers and small servers
PaliGemma 2
PaliGemma 28B28 billionText and imageText
  • Pretrained
  • Mix fine-tuned
Large servers or server clusters
PaliGemma 10B10 billionText and imageText
  • Pretrained
  • Mix fine-tuned
Higher-end desktop computers and servers
PaliGemma 3B3 billionText and imageText
  • Pretrained
  • Mix fine-tuned
Desktop computers and small servers
PaliGemma
PaliGemma 3B3 billionText and imageText
  • Pretrained
  • Mix fine-tuned
Desktop computers and small servers
ShieldGemma 2
ShieldGemma 24 billionText and imageText
  • Fine-tuned
Desktop computers and small servers
TxGemma
TxGemma 27B27 billionTextText
  • Pretrained
  • Instruction-tuned
Large servers or server clusters
TxGemma 9B9 billionTextText
  • Pretrained
  • Instruction-tuned
Higher-end desktop computers and servers
TxGemma 2B2 billionTextText
  • Pretrained
Mobile devices and laptops
MedGemma
MedGemma 27B27 billionText and imageText
  • Text-only instruction-tuned
  • Instruction-tuned
Large servers or server clusters
MedGemma 4B4 billionText and imageText
  • Pretrained
  • Instruction-tuned
Desktop computers and small servers
MedSigLIP
MedSigLIP800 millionText and imageEmbedding
  • Fine-tuned
Mobile devices and laptops
T5Gemma
T5Gemma 9B-9B18 billionTextText
  • PrefixLM, pretrained
  • PrefixLM, instruction-tuned
  • UL2, pretrained
  • UL2, instruction-tuned
Mobile devices and laptops
T5Gemma 9B-2B11 billionTextText
  • PrefixLM, pretrained
  • PrefixLM, instruction-tuned
  • UL2, pretrained
  • UL2, instruction-tuned
Mobile devices and laptops
T5Gemma 2B-2B4 billionTextText
  • PrefixLM, pretrained
  • PrefixLM, instruction-tuned
  • UL2, pretrained
  • UL2, instruction-tuned
Mobile devices and laptops
T5Gemma XL-XL4 billionTextText
  • PrefixLM, pretrained
  • PrefixLM, instruction-tuned
  • UL2, pretrained
  • UL2, instruction-tuned
Mobile devices and laptops
T5Gemma M-L2 billionTextText
  • PrefixLM, pretrained
  • PrefixLM, instruction-tuned
  • UL2, pretrained
  • UL2, instruction-tuned
Mobile devices and laptops
T5Gemma L-L1 billionTextText
  • PrefixLM, pretrained
  • PrefixLM, instruction-tuned
  • UL2, pretrained
  • UL2, instruction-tuned
Mobile devices and laptops
T5Gemma B-B0.6 billionTextText
  • PrefixLM, pretrained
  • PrefixLM, instruction-tuned
  • UL2, pretrained
  • UL2, instruction-tuned
Mobile devices and laptops
T5Gemma S-S0.3 billionTextText
  • PrefixLM, pretrained
  • PrefixLM, instruction-tuned
  • UL2, pretrained
  • UL2, instruction-tuned
Mobile devices and laptops

Gemma has been tested using Google's purpose built v5e TPUhardware and NVIDIA's L4(G2 Standard), A100(A2 Standard),H100(A3 High) GPU hardware.

What's next

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-12-15 UTC.