The Gemma family of open models includes a range of model sizes, capabilities, and task-specialized variations to help you build custom generative solutions. These are the main paths you can follow when using Gemma models in an application:
- Select a model and deploy it as-is in your application
- Select a model, tune it for a specific task, and then deploy it in an application, or share it with the community.
This guide helps you get started with picking a model, testing its capabilities, and optionally, tuning the model you selected for your application.
Pick a model
This section helps you understand the official variants of the Gemma model family and select a model for your application. The model variants provide general capabilities or are specialized for specific tasks, and are provided in different parameter sizes so you can pick a model that has your preferred capabilities and meets your compute requirements.
Gemma models list
The following table lists the major variants of the Gemma model family and their intended deployment platforms:
Parameter size | Input | Output | Foundation | Variants | Intended platforms |
---|---|---|---|---|---|
2B | Text | Text | Gemma 2 | Mobile devices and laptops | |
Gemma 1 | |||||
3B | Text, images | Text | Gemma 2 | Desktop computers and small servers | |
7B | Text | Text | Gemma 1 | Desktop computers and small servers | |
9B | Text | Text | Gemma 2 | Higher-end desktop computers and servers | |
Gemma 1 | |||||
10B | Text, images | Text | Gemma 2 | Higher-end desktop computers and servers | |
27B | Text | Text | Gemma 2 | Large servers or server clusters | |
28B | Text, images | Text | Gemma 2 | Large servers or server clusters |
The Gemma family of models also includes special-purpose and research models, including DataGemma ShieldGemma, Gemma Scope, and Gemma-APS.
Test models
You can test Gemma models by setting up a development environment with a downloaded model and supporting software. You can then prompt the model and evaluate its responses. Use one of the following Python notebooks with your preferred machine learning framework to set up a testing environment and prompt a Gemma model:
Test Gemma 2 in AI Studio
You can quickly test Gemma 2 without setting up a development environment using Google AI Studio. This web application lets you try out prompts with Gemma 2 and evaluate its capabilities.
To try Gemma 2 in Google AI Studio:
Open AI Studio.
In the Run settings panel on the right side, in the Model field, select a Gemma 2 model.
At the bottom of the center panel, type a prompt, and select Run.
For more information about using AI Studio, see the Google AI Studio quickstart.
Tune models
You can change the behavior of Gemma models by performing tuning on them. Tuning a model requires a dataset of inputs and expected responses of sufficient size and variation to guide the behavior of the model. You also need significantly more computing and memory resources to complete a tuning run compared to running a Gemma model for text generation. Use one of the following Python notebooks to set up a tuning development environment and tune a Gemma model:
- Tune Gemma with Keras and LoRA tuning
- Tune Gemma with JAX
- Tune larger Gemma models with distributed training
Next Steps
Check out these guides for building more solutions with Gemma: