YearlyRank AI Tool2026AI tools listRanking
⌘K

Getting started with Gemma models

· Tutorial

This tutorial explains how to start with Google’s Gemma models using official pages retrieved on 16 November 2026: the Gemma docs overview, “Get started with Gemma models,” “Run Gemma content generation and inferences,” “Run Gemma with Hugging Face Transformers,” the Gemma 4 / core overview, and the Gemma Terms of Use. Confirm current steps, model IDs, and license terms on those pages before you download weights or deploy a model. This guide does not assign a YearlyRank official score. See Gemma and methodology. YearlyRank lists Gemma as a model family, not as a consumer chat app; for Google’s hosted assistant see Getting started with the Gemini app.

Purpose. Official Gemma documentation describes Gemma as a family of open models from Google DeepMind and other Google teams, built from the same research and technology used to create the Gemini models, and named after the Latin gemma, meaning precious stone. The overview retrieved on 16 November 2026 describes Gemma 4 as handling generative tasks with text, audio, and image input, support for over 140 languages, and a long 128K context window, up to 256K. The same page also lists EmbeddingGemma 2 for numerical representations used in tasks such as multimodal retrieval and semantic search, and ShieldGemma 2 for evaluating the safety of model input and output against defined policies. Official “Get started” text says the two main application paths are to select a model and deploy it as-is, or to select a model, tune it for a specific task, then deploy it or share it.

Steps

1. Pick a Gemma variant that matches your hardware. Official “Get started” help says variants differ in capabilities and parameter sizes so you can match compute requirements. A tip on that page names the Gemma 4 26B A4B model, in the latest available version, as a place to start for many tasks with lower resource requirements. The same page’s Gemma 4 table lists core sizes E2B, E4B, 12B, A4B, and 31B, with intended platforms ranging from mobile devices (E2B) to laptops, desktops, small servers, and large servers or clusters (31B). Official core docs also list Gemma 4 parameter sizes as E2B, E4B, 12B, 31B, and 26B A4B. Older families, including Gemma 3, Gemma 3n, Gemma 2, PaliGemma 2, and Gemma 1 / CodeGemma, remain listed on the same get-started table.

If you are unsure which variant to start with, official “Run Gemma” guidance says to select the latest Gemma core instruction-tuned (IT) model with the lowest number of parameters. Official Hugging Face docs say instruction-tuned models typically have it in the model ID string, and should be used when you want the model to follow directions or generate output.

2. Download official weights from a documented source. Official “Get started” text says you can download official Google Gemma model variants and community-created variants from Kaggle Models and Hugging Face. Use the official listings there rather than inventing a package name. Official pages also point to the Responsible Generative AI Toolkit as you start implementing applications.

3. Choose a framework, then run a first generation request. Official “Run Gemma” guidance says the two key decisions are which variant to run and which execution framework to use, based on the hardware you have. For a local chat UI, that page’s table recommends LM Studio or Ollama. Official text describes LM Studio as a desktop application for downloading and chatting with Gemma models, with no coding required, and Ollama as a tool to run open models locally. This tutorial does not invent click-by-click steps for those UIs; follow those Gemma integration pages after you pick a Gemma IT model.

For Python, official “Run Gemma” text lists Hugging Face Transformers, Keras, Tunix, and Unsloth among others. The official Transformers tutorial retrieved the same day shows this install:

pip install torch pip install "transformers>=5.10.1"

That tutorial then loads an instruction-tuned Gemma 4 model with:

from transformers import pipeline MODEL_ID = "google/gemma-4-E2B-it" pipe = pipeline(task="any-to-any", model=MODEL_ID, device_map="auto", dtype="auto")

For a chat-style request, the same official page constructs a prompt template with role and content entries, then calls pipe(messages, return_full_text=False, generate_kwargs=gen_kwargs) after loading a GenerationConfig with max_new_tokens set, as shown in that tutorial. Official notes on the same page say Gemma 3 and later models support image and text input; earlier Gemma versions are text-only except for some variants, including PaliGemma. Official “Get started” also links Python notebooks for inference with Keras, PyTorch, and the Gemma library if you prefer those frameworks.

4. Tune only if you need a task-specific model. Official “Get started” text says tuning requires a dataset of inputs and expected responses, and more compute and memory than running a model for text generation. That page links official notebooks for tuning with Keras and LoRA, and for tuning larger models with distributed training. Use those notebooks rather than inventing a training command.

Plan and pricing notes

Gemma is distributed as open model weights, not as a consumer monthly chat plan on the pages retrieved for this tutorial. Official core documentation says Gemma models are provided with open weights and permit responsible commercial use, allowing you to tune and deploy them in your own projects and applications. That statement is Google’s wording on the core overview; it is not a substitute for the legal terms. Official docs point to the Gemma Terms of Use for models listed in that page’s appendix, and to a separate Gemma 4 license page titled Apache License 2.0. Read the license that applies to the variant you download before you use, modify, or distribute it.

Running a model still has costs that official Gemma pricing tables do not list as a single consumer fee: your own hardware, electricity, or a hosted runtime you choose, such as a cloud service listed in official “Run Gemma” guidance (including Google Cloud Kubernetes Engine and other serving frameworks). This tutorial does not invent cloud prices or Hugging Face access fees. If a download host asks you to accept terms or sign in, follow that host’s official flow.

Official overview text also notes that large language models, including Gemma, may sometimes provide inaccurate or offensive content that does not represent Google’s views, and says not to rely on them for medical, legal, financial, or other professional advice.

Who it fits

This start path fits someone who wants official Gemma open models to run or customize in an application, on a computer, or through a documented local or Python framework. It is a model-family guide, not a hosted chat-app guide for the Gemini app, and not a walkthrough of every specialized variant such as PaliGemma, CodeGemma, or EmbeddingGemma.

Closing takeaway

Start at Get started with Gemma models, pick a variant that fits your hardware — official docs suggest the latest core instruction-tuned model with the lowest parameter count if you are unsure, and also tip Gemma 4 26B A4B — then download official weights from Kaggle or Hugging Face and run a first request in a documented framework such as Transformers, LM Studio, or Ollama. Official core docs say the weights permit responsible commercial use; read the live Gemma Terms of Use and Gemma 4 license before you deploy. For current model IDs and run commands, use the live Gemma docs.

Sources

Retrieved on 16 November 2026 (Asia/Shanghai):

  1. Google AI for Developers, “Gemma models overview,” https://ai.google.dev/gemma/docs
  2. Google AI for Developers, “Get started with Gemma models,” https://ai.google.dev/gemma/docs/get_started
  3. Google AI for Developers, “Run Gemma content generation and inferences,” https://ai.google.dev/gemma/docs/run
  4. Google AI for Developers, “Run Gemma with Hugging Face Transformers,” https://ai.google.dev/gemma/docs/core/huggingface_inference
  5. Google AI for Developers, Gemma 4 / core overview, https://ai.google.dev/gemma/docs/core
  6. Google AI for Developers, “Gemma Terms of Use,” https://ai.google.dev/gemma/terms
  7. Google AI for Developers, “Apache License 2.0” (Gemma 4 license), https://ai.google.dev/gemma/apache_2