Live
Black Hat USADark ReadingBlack Hat AsiaAI BusinessDefending Habit Streakslesswrong.comChinese-made drone shot in Iran, Australia’s diplomacy pivot: 5 weekend reads you missedSCMP Tech (Asia AI)How NLP Actually Understands Text?Medium AIXENONOSTRA RESEARCH NOTES ALGEBROS: An Algebraic Meta-Language for Code Structure Extraction and…Medium AI18 Specific Tutorial Ideas for AI Voice Integration Using Vapi and TwilioDev.to AIUI DESIGNERS IN TROUBLEMedium AIEstimates of the expected utility gain of AI Safety Researchlesswrong.comMastering Python for Machine Learning: A Practical, No-Nonsense RoadmapMedium AII Audited 13 AI Agent Platforms for Security Misconfigurations — Here's the Open-Source Scanner I BuiltDev.to AIFrom Reality to Writing: Why I Explore Technology, Identity and Human BehaviorMedium AIA Developer's Introduction to Generative AIDEV CommunityAnthropic Looked Inside Claude’s Brain. What They Found Changes Everything.Medium AIBlack Hat USADark ReadingBlack Hat AsiaAI BusinessDefending Habit Streakslesswrong.comChinese-made drone shot in Iran, Australia’s diplomacy pivot: 5 weekend reads you missedSCMP Tech (Asia AI)How NLP Actually Understands Text?Medium AIXENONOSTRA RESEARCH NOTES ALGEBROS: An Algebraic Meta-Language for Code Structure Extraction and…Medium AI18 Specific Tutorial Ideas for AI Voice Integration Using Vapi and TwilioDev.to AIUI DESIGNERS IN TROUBLEMedium AIEstimates of the expected utility gain of AI Safety Researchlesswrong.comMastering Python for Machine Learning: A Practical, No-Nonsense RoadmapMedium AII Audited 13 AI Agent Platforms for Security Misconfigurations — Here's the Open-Source Scanner I BuiltDev.to AIFrom Reality to Writing: Why I Explore Technology, Identity and Human BehaviorMedium AIA Developer's Introduction to Generative AIDEV CommunityAnthropic Looked Inside Claude’s Brain. What They Found Changes Everything.Medium AI
AI NEWS HUBbyEIGENVECTOREigenvector

🔥 google-deepmind/gemma

GitHub TrendingApril 5, 20262 min read1 views
Source Quiz

Gemma open-weight LLM library, from Google DeepMind — Trending on GitHub today with 45 new stars.

Gemma is a family of open-weights Large Language Model (LLM) by Google DeepMind, based on Gemini research and technology.

This repository contains the implementation of the gemma PyPI package. A JAX library to use and fine-tune Gemma.

For examples and use cases, see our documentation. Please report issues and feedback in our GitHub.

Installation

  • Install JAX for CPU, GPU or TPU. Follow the instructions on the JAX website.

  • Run

pip install gemma

Examples

Here is a minimal example to have a multi-turn, multi-modal conversation with Gemma:

from gemma import gm

Model and parameters

model = gm.nn.Gemma3_4B() params = gm.ckpts.load_params(gm.ckpts.CheckpointPath.GEMMA3_4B_IT)

Example of multi-turn conversation

sampler = gm.text.ChatSampler( model=model, params=params, multi_turn=True, )

prompt = """Which of the two images do you prefer?

Image 1: Image 2:

Write your answer as a poem.""" out0 = sampler.chat(prompt, images=[image1, image2])

out1 = sampler.chat('What about the other image ?')`

Our documentation contains various Colabs and tutorials, including:

  • Sampling

  • Multi-modal

  • Fine-tuning

  • LoRA

  • ...

Additionally, our examples/ folder contain additional scripts to fine-tune and sample with Gemma.

Learn more about Gemma

  • To use this library: Gemma documentation

  • Technical reports for metrics and model capabilities:

Gemma 1 Gemma 2 Gemma 3

  • Other Gemma implementations and doc on the Gemma ecosystem

Downloading the models

To download the model weights. See our documentation.

System Requirements

Gemma can run on a CPU, GPU and TPU. For GPU, we recommend 8GB+ RAM on GPU for The 2B checkpoint and 24GB+ RAM on GPU are used for the 7B checkpoint.

Contributing

We welcome contributions! Please read our Contributing Guidelines before submitting a pull request.

This is not an official Google product.

Was this article helpful?

Sign in to highlight and annotate this article

AI
Ask AI about this article
Powered by Eigenvector · full article context loaded
Ready

Conversation starters

Ask anything about this article…

Daily AI Digest

Get the top 5 AI stories delivered to your inbox every morning.

More about

githubtrendingopen-source

Knowledge Map

Knowledge Map
TopicsEntitiesSource
🔥 google-d…githubtrendingopen-sourceGitHub Tren…

Connected Articles — Knowledge Graph

This article is connected to other articles through shared AI topics and tags.

Knowledge Graph100 articles · 272 connections
Scroll to zoom · drag to pan · click to open

Discussion

Sign in to join the discussion

No comments yet — be the first to share your thoughts!

More in Open Source AI