A Chinese-language step-by-step guide and demo code for learning LLMs, from calling APIs to local deployment and fine-tuning, with Kaggle/Colab versions.
google-gemma/cookbook
A collection of guides, tutorial notebooks, and end-to-end app examples for building with Google's open Gemma model family.
- Stars
- 4,137
- Forks
- 682
- Open issues
- 45
- Last commit
- 12 days ago
What is it?
The Gemma Cookbook is a set of Jupyter notebooks and guides showing how to use the Gemma open models from Google. It covers the core Gemma line (from Gemma 2 through Gemma 4) as well as variants such as CodeGemma, PaliGemma, RecurrentGemma, ShieldGemma, and MedGemma, each with its own examples.
The repository is organized into folders for tutorials, full-stack apps, research-focused experiments such as TxGemma and MedGemma, responsible AI notebooks, core documentation, and an archive of older examples. Models can be obtained from the Hugging Face Hub, Kaggle, and Google Cloud Vertex AI Model Garden.
The project is aimed at developers who want working code for fine-tuning, inference, and building applications on Gemma. Since Gemma is an open model, the maintainers note that its outputs can be inaccurate and should be checked when building on these examples.
Key features
- 01Tutorial notebooks for Gemma and its variants, kept tested and up to date.
- 02Full-stack demo apps and end-to-end use cases.
- 03Research notebooks for TxGemma and MedGemma.
- 04Responsible AI development notebooks.
- 05Available on Hugging Face Hub, Kaggle, and Vertex AI Model Garden.
Use cases
- Learning how to run and prompt Gemma models in Python notebooks.
- Building a multimodal app with PaliGemma or Gemma 3 image input.
- Exploring domain-specific models such as MedGemma for healthcare prototypes.
- Adding safety classification with ShieldGemma to an LLM application.
Quick start
- 1
Clone the cookbook repository from GitHub
- 2
Open the Tutorials folder and pick a notebook to run
Things to know
- The cookbook is a collection of notebooks and guides rather than a single installable tool.
- Examples depend on Gemma model access and may need a GPU or cloud resources to run.
Topics
FAQ
- What is cookbook?
- A collection of guides, tutorial notebooks, and end-to-end app examples for building with Google's open Gemma model family. The Gemma Cookbook is a set of Jupyter notebooks and guides showing how to use the Gemma open models from Google. It covers the core Gemma line (from Gemma 2 through Gemma 4) as well as variants such as CodeGemma, PaliGemma, RecurrentGemma, ShieldGemma, and MedGemma, each with its own examples.
- Is cookbook free to use? What license does it have?
- cookbook is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
- Is cookbook still maintained?
- Actively maintained. The last commit to cookbook was on Oct 26, 2026.
- What can I use cookbook for?
- Learning how to run and prompt Gemma models in Python notebooks. Building a multimodal app with PaliGemma or Gemma 3 image input. Exploring domain-specific models such as MedGemma for healthcare prototypes. Adding safety classification with ShieldGemma to an LLM application.
- How do I install cookbook?
- Clone the cookbook repository from GitHub Open the Tutorials folder and pick a notebook to run
- Where can I get cookbook?
- The source code and installation instructions are on GitHub: https://github.com/google-gemma/cookbook
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
An LLM plugin that gives the LLM command-line tool and Python library access to Google's Gemini models.
A collection of 250+ Colab and Jupyter notebooks for fine-tuning and RL training of text, vision, audio, embedding and TTS models with Unsloth.
An Android and iOS app from Google AI Edge for trying open-source LLMs and on-device GenAI use cases offline on your phone.
A collection of Jupyter notebook examples and guides showing how to accomplish common tasks with the OpenAI API.
A collection of 90+ hands-on tutorial projects covering LLMs, RAG pipelines, and AI agents, organized by difficulty level.