---
title: "Welcome Gemma - Google’s new open LLM"
description: "Google's Gemma open LLM family ships in 2B and 7B sizes, each with base and instruction-tuned variants and an 8K context."
url: "https://swe.quest/articles/welcome-gemma-google-s-new-open-llm-a7d68dd269473a81"
canonical: "https://huggingface.co/blog/gemma"
source: "Hugging Face"
published: "2024-02-21"
difficulty: "medium"
kind: "Announcement"
reading_minutes: 9
tags: ["llms","inference","model-training","python"]
---

# Welcome Gemma - Google’s new open LLM

A post on [Hugging Face](https://swe.quest/sources/hugging-face.md), published 2024-02-21, 9 min read, Announcement. Original: [https://huggingface.co/blog/gemma](https://huggingface.co/blog/gemma)

## Summary

Google's Gemma open LLM family ships in 2B and 7B sizes, each with base and instruction-tuned variants and an 8K context. On the Open LLM Leaderboard Gemma 7B scores 63.75, comparable to Mistral 7B, while Gemma 2B trails Phi-2. Hugging Face supports it through Transformers 4.38, including bfloat16 inference in about 18 GB, 4-bit loading in about 9 GB, and a ~4x speedup with torch.compile. Other integrations include JAX/Flax weights, Vertex AI/GKE and Inference Endpoints deployment via Text Generation Inference with an OpenAI-compatible Messages API, and a QLoRA fine-tuning recipe with TRL that takes about 9 hours on one A10G.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [LLMs](https://swe.quest/tags/llms.md) (AI & ML)
- [Inference & serving](https://swe.quest/tags/inference.md) (AI & ML)
- [Model training](https://swe.quest/tags/model-training.md) (AI & ML)
- [Python](https://swe.quest/tags/python.md) (Languages)

## Prerequisites

- Python ([easy posts on Python](https://swe.quest/tags/python.md?difficulty=easy))
- Hugging Face Transformers basics
- LLM fine-tuning concepts ([easy posts on LLMs](https://swe.quest/tags/llms.md?difficulty=easy))

## Keywords

Gemma, Hugging Face Transformers, Text Generation Inference, TRL, QLoRA, JAX, Vertex AI, Inference Endpoints

## Related posts

- [Welcome Gemma 3: Google's all new multimodal, multilingual, long context open LLM](https://swe.quest/articles/welcome-gemma-3-google-s-all-new-multimodal-multilingual-long-context-open-llm-9610089c9e0bc05e.md): Hugging Face · 2025-03-12 · Medium · 13 min read · LLMs, Inference & serving, Computer vision, Python
  Gemma 3 is Google's open-weight model family in 1B, 4B, 12B and 27B sizes, with 128k context (32k for 1B), image input via a SigLIP encoder on the 4B and larger models, and support for 140+ languages.
- [Welcome Gemma 2 - Google’s new open LLM](https://swe.quest/articles/welcome-gemma-2-google-s-new-open-llm-cda5c001e5cdbd53.md): Hugging Face · 2024-06-27 · Medium · 11 min read · LLMs, Model training, Inference & serving
  Gemma 2 ships in 9B and 27B sizes (base and instruction-tuned) with an 8K context, trained on 8T and 13T tokens respectively.
- [Llama 2 is here - get it on Hugging Face](https://swe.quest/articles/llama-2-is-here-get-it-on-hugging-face-c56eec059476bd0f.md): Hugging Face · 2023-07-18 · Medium · 9 min read · LLMs, Inference & serving, Model training, Python
  Meta's Llama 2 family (7B, 13B, 70B base and RLHF-tuned chat models) is released under a commercially usable license, trained on 40% more tokens than Llama 1 with 4k context and grouped-query attention for the 70B model, and is integrated across the Hugging Face ecosystem.
- [Gemma 3n fully available in the open-source ecosystem!](https://swe.quest/articles/gemma-3n-fully-available-in-the-open-source-ecosystem-6d60bf60e354184a.md): Hugging Face · 2025-06-26 · Medium · 9 min read · LLMs, Inference & serving, Computer vision, Speech & audio, Python
  Gemma 3n, Google's natively multimodal on-device model accepting text, image, audio and video, now runs in transformers, timm, MLX, llama.cpp (text only), Transformers.js/ONNX and Ollama.
- [Fine-Tuning Gemma Models in Hugging Face](https://swe.quest/articles/fine-tuning-gemma-models-in-hugging-face-d432d00965e71590.md): Hugging Face · 2024-02-23 · Medium · 5 min read · Model training, LLMs, Python
  Gemma 2B and 7B can be fine-tuned cheaply with LoRA via the Hugging Face PEFT library, loading the base model in 4-bit NF4 with bitsandbytes (QLoRA) so it fits on free Colab GPUs.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
