google-gemma/cookbook: What Is in the Gemma Notebook Collection
A collection of guides and examples for the Gemma open models from Google.
At a glance
- What is it?
- The Gemma Cookbook is a set of Jupyter notebooks and full-stack demos for Google's open Gemma models. It is a starting point for developers who want runnable examples, not a library you install.
- Who is it for?
- Adopt the Gemma Cookbook if you want working notebooks that show how Gemma variants are loaded and prompted, and you are comfortable adapting code rather than importing a package. Skip it if you need a supported library with versioned releases, because the repository publishes none and is organised by notebook folder instead.
- Can I use it commercially?
- Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 8 days ago.
- What is it written in?
- Mainly Jupyter Notebook, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on September 25, 2026, and from our analysis. They are not legal advice.
Editorial analysis
What the Gemma Cookbook actually is, and who it is for
The README opens by describing the project plainly: "This is a collection of guides and examples for Google Gemma." That sentence is the whole scope. There is no runtime, no CLI and no Python package to import. What you get is a repository of Jupyter notebooks organised into folders, plus a small set of full-stack demos under apps/.
The audience is developers who already know they want to run a Gemma model and now need a worked example. The README lists the model family in detail, from the core Gemma line (Gemma, Gemma 2, Gemma 3, Gemma 3n, Gemma 4) through variants such as CodeGemma for coding tasks, PaliGemma and PaliGemma 2 for vision, ShieldGemma for safety classification, RecurrentGemma based on the Griffin architecture, and the research-oriented TxGemma and MedGemma. Each entry links to a model card on ai.google.dev. If you are deciding which Gemma variant fits a task, the README itself is the comparison table.
What it is not: a tutorial for people new to language models. The notebooks assume you can read Python, install dependencies and run a cell. The README points to the Hugging Face Hub, Kaggle, Google Cloud Vertex AI Model Garden and ai.nvidia.com as places to find the weights, so the cookbook expects you to obtain the model separately.
How the repository is laid out and how a notebook flows
The top-level entries are the architecture. tutorials/ holds "the latest tested notebooks for Gemma models and variants". apps/ holds "full-stack demos and complex end-to-end use cases". experiments/ holds research-focused work, and the README names TxGemma and MedGemma as examples. responsible/ holds notebooks for responsible AI development, docs/ holds core documentation and technical guides, and .archive/ holds older notebooks and historical examples.
That split matters more than it looks. A notebook in tutorials/ is the one the maintainers consider current for a model. The same topic may also exist in .archive/, where it is kept for reference rather than maintenance. When two notebooks cover similar ground, the path tells you which one to trust.
The data flow inside a typical notebook is the standard Python loop: install or import the model libraries, load a checkpoint, build a prompt, generate, then decode and print the result. The README does not document a shared helper module or a common abstraction across notebooks, so each one carries its own setup. That is convenient for copying a single example and inconvenient if you want to reuse code across several, because there is no single API surface to depend on.
Running your first Gemma notebook
There is no install command for the cookbook itself. You clone the repository, open a notebook from tutorials/, and follow the cells. The README directs readers to the model cards for weights, and lists Hugging Face Hub, Kaggle, Vertex AI Model Garden and ai.nvidia.com as distribution points, so the exact loading code depends on which model and which host you pick.
The first step is getting the repository onto your machine:
git clone https://github.com/google-gemma/cookbook.git
cd cookbookAfter that, open a notebook from the tutorials/ directory in Jupyter. The README does not prescribe a specific environment setup, so the dependency install lives inside the notebook you choose rather than in a repository-level file. Expect the first cells to install packages and the later cells to load a checkpoint and generate text.
When you contribute or extend an example, the README is explicit about process: read CONTRIBUTING.md before implementation, and if you want a cookbook that does not exist yet, open an issue using the Feature Request template or pick an idea from the Wish List label and implement it. That is the documented path from "this example is missing" to "this example exists".
The hallucination warning is the limitation that matters most
The README carries a disclaimer that is easy to skim past: "Please keep in mind that Gemma is an open model and can hallucinate as you build on examples in this cookbook." This is not boilerplate. It means a notebook that produces fluent output is not evidence the output is correct, and the cookbook does not add a verification layer on top of the model. If you copy an example into a pipeline that writes to a database or answers users, the accuracy problem travels with it.
The structural limitations follow from the format. Notebooks are not versioned artifacts in the way a library release is. The repository has no retrieved releases, so there is no changelog to read when a model card changes and a notebook drifts out of date. The README's own answer to staleness is the .archive/ folder, which keeps old notebooks rather than deleting them, and you have to check the path to know whether what you are reading is current.
There is also no shared abstraction, as noted above. Each notebook stands alone, which means fixing a dependency problem in one does not fix it in the others. For a collection that spans Gemma 1 through Gemma 4, plus CodeGemma, PaliGemma, ShieldGemma and RecurrentGemma, that is a lot of independent setup code to keep working.
How it compares with a model-serving stack
The nearest alternative is not another cookbook but a serving framework. Tools in that category expose a stable API, manage batching and memory, and let you swap model weights behind a fixed endpoint. The Gemma Cookbook does the opposite: it shows you the model directly, in a notebook, with the loading and prompting code visible in front of you.
That difference decides the use case. A serving stack is what you deploy behind an application. The cookbook is what you read before you decide what to deploy, or what you copy when you need to understand a specific Gemma variant such as PaliGemma's vision input or ShieldGemma's safety classification. If you need an HTTP endpoint with predictable behaviour across model updates, the notebook format works against you, because the example and the model version are coupled inside a single file.
The README also points outward rather than trying to cover everything. It links to Google-Health's separate MedGemma notebooks and to the GoogleCloudPlatform generative-ai repository for GCP open models. So the project's own position is that it is one entry point among several, not the only place to look.
Maintenance, licensing and what to verify before adopting
The repository is not archived, and the last push was on 2026-09-23. The README lists translations into Traditional Chinese and Simplified Chinese, and invites contributions through CONTRIBUTING.md, the developer forum at discuss.ai.google.dev, and GitHub issues. There are no retrieved releases, so upgrade cost is not something you can plan against a version number. You re-read the notebook you depend on and compare it with the current model card.
The licence is Apache-2.0, listed in LICENSE.txt at the repository root. That covers the code and notebooks in this repository. It does not automatically cover the Gemma model weights, which have their own terms on the model cards linked from the README. If you plan to redistribute a model or ship it in a product, read the model card for that specific variant rather than assuming the repository licence carries over. This is a description of what the files say, not legal advice.
What to verify first: open the tutorials/ notebook for your chosen model, check whether it still matches the model card it links to, and confirm you can obtain the weights from one of the listed hosts before you build anything on top of the example.
Editorial conclusion
Adopt the Gemma Cookbook if you want working notebooks that show how Gemma variants are loaded and prompted, and you are comfortable adapting code rather than importing a package. Skip it if you need a supported library with versioned releases, because the repository publishes none and is organised by notebook folder instead. Before you start, check the tutorials/ folder for the model you intend to run and confirm the notebook still matches the current model card, since the README warns that Gemma can hallucinate on these examples.
Frequently asked questions
What is the Gemma Cookbook in programming?
It is a repository of Jupyter notebooks and examples for Google's open Gemma models, organised into tutorials, apps, experiments, responsible and docs folders. The README describes it as "a collection of guides and examples for Google Gemma".
How do I set up the Gemma Cookbook?
There is no install command for the project itself. You clone the repository, open a notebook from tutorials/, and follow its cells, obtaining model weights from one of the hosts the README lists: Hugging Face Hub, Kaggle, Google Cloud Vertex AI Model Garden or ai.nvidia.com.
What is a cookbook in AI?
In this project the term means a curated set of runnable examples rather than a library. The Gemma Cookbook collects notebooks that show how to load and prompt Gemma models and variants such as CodeGemma, PaliGemma and ShieldGemma.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/google-gemma-cookbook)