Gemma 开源AI 是 AI Skill Hub 本期精选AI工具之一。已获得 5.4k 颗 GitHub Star,综合评分 8.0 分,整体质量较高。我们强烈推荐将其纳入你的 AI 工具库,帮助提升工作效率。
谷歌DeepMind开源的AI工具库,支持安装
Gemma 开源AI 是一款基于 Python 开发的开源工具,专注于 AI、LLM、Python 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
谷歌DeepMind开源的AI工具库,支持安装
Gemma 开源AI 是一款基于 Python 开发的开源工具,专注于 AI、LLM、Python 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
# 方式一:pip 安装(推荐)
pip install gemma
# 方式二:虚拟环境安装(推荐生产环境)
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install gemma
# 方式三:从源码安装(获取最新功能)
git clone https://github.com/google-deepmind/gemma
cd gemma
pip install -e .
# 验证安装
python -c "import gemma; print('安装成功')"
# 命令行使用
gemma --help
# 基本用法
gemma input_file -o output_file
# Python 代码中调用
import gemma
# 示例
result = gemma.process("input")
print(result)
# gemma 配置文件示例(config.yml) app: name: "gemma" debug: false log_level: "INFO" # 运行时指定配置文件 gemma --config config.yml # 或通过环境变量配置 export GEMMA_API_KEY="your-key" export GEMMA_OUTPUT_DIR="./output"
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.
To use this library: Gemma documentation Technical reports for metrics and model capabilities: Gemma 1 Gemma 2 Gemma 3 Gemma 4 * Other Gemma implementations and doc on the Gemma ecosystem
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.
1. Install JAX for CPU, GPU or TPU. Follow the instructions on the JAX website. 1. Run
pip install gemma
Here is a minimal example to have a multi-turn, multi-modal conversation with Gemma:
```python from gemma import gm
sampler = gm.text.ChatSampler( model=model, params=params, multi_turn=True, )
prompt = """Which of the 2 images do you prefer ?
Image 1: <|image|> Image 2: <|image|>
Write your answer as a poem.""" out0 = sampler.chat(prompt, images=[image1, image2])
out1 = sampler.chat('What about the other image ?') ```
The same ChatSampler API works with all Gemma versions (2, 3, 3n, 4).
Our documentation contains various Colabs and tutorials, including:
Additionally, our examples/ folder contain additional scripts to fine-tune and sample with Gemma.
高质量的开源AI工具,开发者友好
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ Apache 2.0 — 宽松开源协议,可商用,需保留版权声明和 NOTICE 文件,含专利授权条款。
经综合评估,Gemma 开源AI 在AI工具赛道中表现稳健,质量优秀。如果你已有明确的使用需求,可以直接上手体验;如果还在评估阶段,建议对比同类工具后再做决策。
| 原始名称 | gemma |
| Topics | AILLMPython |
| GitHub | https://github.com/google-deepmind/gemma |
| License | Apache-2.0 |
| 语言 | Python |
收录时间:2026-06-11 · 更新时间:2026-06-11 · License:Apache-2.0 · AI Skill Hub 不对第三方内容的准确性作法律背书。