Gemma 2 Models by Google DeepMind
Details
Capabilities
About
Gemma 2 is a series of cutting-edge, lightweight open large language models developed by Google. Leveraging the same foundational research as the Gemini models, Gemma 2 offers models with 2 billion, 9 billion, and 27 billion parameters. These decoder-only text-to-text models, primarily trained on English data, demonstrate strong capabilities in multilingual tasks. They come in both pre-trained and instruction-tuned versions, making them versatile for diverse text generation applications such as question answering, summarization, and reasoning. Smaller models are optimized for deployment on resource-limited devices, while the larger variants deliver competitive performance with efficiency innovations like alternating local and global attention, logit soft-capping, and grouped-query attention12. Additionally, Gemma 2 includes tools for facilitating responsible AI development3.
Current Variants
Use-when guidance is based on each model's tracked capabilities, context window, release date, and replacement status.
Use when the workload needs 8k context and 2B parameters.
Use when the workload needs 8k context and 2B parameters.
Use when the workload needs safety, 8k context, and 9B parameters.
Use when the workload needs 8k context, 27B parameters, and structured outputs.
Use when the workload needs 8k context, 9B parameters, and structured outputs.
Use when the workload needs 8k context, 27B parameters, and structured outputs.
Use when the workload needs 8k context, 9B parameters, and structured outputs.
| Model | Use when | Released | Signals | Status |
|---|---|---|---|---|
| Gemma 2 2B | Use when the workload needs 8k context and 2B parameters. | 2024-07 | 8k context2B parameters | Current |
| Gemma 2 2B Instruct | Use when the workload needs 8k context and 2B parameters. | 2024-07 | 8k context2B parameters | Current |
| ShieldGemma 9B | Use when the workload needs safety, 8k context, and 9B parameters. | 2024-07 | safety8k context9B parameters | Current |
| Gemma 2 27B Instruct | Use when the workload needs 8k context, 27B parameters, and structured outputs. | 2024-06 | 8k context27B parametersstructured outputs | Current |
| Gemma 2 9B Instruct | Use when the workload needs 8k context, 9B parameters, and structured outputs. | 2024-06 | 8k context9B parametersstructured outputs | Current |
| Gemma 2 27B | Use when the workload needs 8k context, 27B parameters, and structured outputs. | 2024-06 | 8k context27B parametersstructured outputs | Current |
| Gemma 2 9B | Use when the workload needs 8k context, 9B parameters, and structured outputs. | 2024-06 | 8k context9B parametersstructured outputs | Current |
Release Timeline
2 release groupsSpecifications(7 models)
| Model | Released | Context | Parameters | Structured Outputs |
|---|---|---|---|---|
| Gemma 2 2B | 2024-07 | 8k | 2B | No |
| Gemma 2 2B Instruct | 2024-07 | 8k | 2B | No |
| ShieldGemma 9B | 2024-07 | 8k | 9B | No |
| Gemma 2 27B Instruct | 2024-06 | 8k | 27B | Yes |
| Gemma 2 9B Instruct | 2024-06 | 8k | 9B | Yes |
| Gemma 2 27B | 2024-06 | 8k | 27B | Yes |
| Gemma 2 9B | 2024-06 | 8k | 9B | Yes |
Available From(9 providers)
Pricing
| Model | Provider | Input / 1M | Output / 1M | Type |
|---|---|---|---|---|
| Gemma 2 9B | GCP Vertex AI | $0.06 | $0.18 | Serverless |
| Gemma 2 9B | Bitdeer AI | $0.08 | $0.24 | Serverless |
| Gemma 2 27B | Bitdeer AI | $0.08 | $0.24 | Serverless |
| Gemma 2 9B Instruct | Chutes AI | $0.1 | $0.3 | Serverless |
| Gemma 2 9B Instruct | Replicate API | $0.1 | $0.1 | Serverless |
| Gemma 2 9B Instruct | Fireworks AI | $0.2 | $0.2 | Serverless |
| Gemma 2 9B | Fireworks AI | $0.2 | $0.2 | Serverless |
| Gemma 2 27B Instruct | Arcee AI | $0.25 | $0.75 | Serverless |
| Gemma 2 27B | GCP Vertex AI | $0.3 | $0.9 | Serverless |
| Gemma 2 27B Instruct | Replicate API | $0.4 | $0.4 | Serverless |
| Gemma 2 27B Instruct | OpenRouter | $0.65 | $0.65 | Serverless |
| Gemma 2 27B Instruct | NextBit | $0.65 | $0.65 | Serverless |
| Gemma 2 27B Instruct | Fireworks AI | $0.9 | $0.9 | Serverless |
Popular comparisons in this family
- Llama Guard 2 8B vs ShieldGemma 9B108
- Llama Guard 7B vs ShieldGemma 9B80
- Gemma 2 9B Instruct vs Trinity-Large-Thinking78
- Llama 3.1 NemoGuard 8B Content Safety vs ShieldGemma 9B65
- DeepSeek V4 Flash vs Gemma 2 2B65
- Llama Guard 4 12B vs ShieldGemma 9B46
- Gemma 2 9B Instruct vs Qwen2-7B-Instruct28
- Llama 3 8B Instruct vs ShieldGemma 9B27
- Codex 1 vs Gemma 2 2B18
- Llama 3.1 NemoGuard 8B Topic Control vs ShieldGemma 9B17
Frequently Asked Questions
- What is Gemma 2 used for?
- Gemma 2 is used for safety, structured outputs, and coding. The family description and listed model capabilities point to those workloads as the best fit.
- How does Gemma 2 compare to T5Gemma?
- Gemma 2 by Google DeepMind is strongest where you need safety, while T5Gemma by Google DeepMind is the closest related family to check for agent workflows and tool use. Gemma 2 has 7 listed variants and reaches up to 8k context, so compare the specs and pricing tables before choosing a production model.
- Which Gemma 2 model should I use?
- For the lowest listed input price, start with Gemma 2 9B through GCP Vertex AI at $0.06/1M input tokens. For the most capable/latest local choice, evaluate Gemma 2 27B Instruct with 8k context and structured outputs.
Models(7)
Gemma 2 2B
Gemma 2 2B Instruct
ShieldGemma 9B
Gemma 2 27B Instruct
Gemma 2 9B Instruct
Gemma 2 27B
Gemma 2 9B

