开源推荐
morning
GitHub 热门项目:gemma_pytorch
摘要
GitHub项目:gemma_pytorch 仓库地址:https://github。
Gemma
the
google
models
and
2026-05-18
1 阅读
约7分钟阅读
GitHub Trending
GitHub 项目:gemma_pytorch
仓库地址:https://github.com/google/gemma_pytorch
星级:5673 | 作者:谷歌
项目描述:Google Gemma 模型的官方 PyTorch 实现
===================================================
自述文件内容:
# PyTorch 中的 Gemma
**Gemma** 是一系列轻量级、最先进的开放模型,基于用于创建 Google Gemini 模型的研究和技术而构建。它们包括纯文本和多模态解码器大型语言模型,具有开放权重、预训练变体和指令调整变体。欲了解更多详情,请查看以下链接:
* [Gemma 在 Google AI 上](https://ai.google.dev/gemma)
* [Kaggle 上的 Gemma](https://www.kaggle.com/models/google/gemma-3)
* [Vertex AI 模型花园上的 Gemma](https://pantheon.corp.google.com/vertex-ai/publishers/google/model-garden/gemma3)
这是 Gemma 模型的官方 PyTorch 实现。我们使用 PyTorch 和 PyTorch/XLA 提供模型和推理实现,并支持在 CPU、GPU 和 TPU 上运行推理。
## 更新
* [2025 年 3 月 12 日 ?] 支持 Gemma v3。您可以在[Kaggle](https://www.kaggle.com/models/google/gemma-3/pytorch)和[Hugging Face](https://huggingface.co/models?other=gemma_torch)找到检查点
* [2024 年 6 月 26 日] 支持 Gemma v2。您可以在 [Kaggle](https://www.kaggle.com/models/google/gemma-2/pytorch) 和 Hugging Face 上找到检查点
* [2024 年 4 月 9 日] 支持 CodeGemma。您可以在[Kaggle](https://www.kaggle.com/models/google/codegemma/pytorch)和[Hugging Face](https://huggingface.co/collections/google/codegemma-release-66152ac7b683e2667abdee11)找到检查点
* [2024 年 4 月 5 日] 支持 Gemma v1.1。您可以在 [Kaggle](https://www.kaggle.com/models/google/gemma/frameworks/pyTorch) 和 [Hugging Face](https://huggingface.co/collections/google/gemma-release-65d5efbccdbb8c4202ec078b) 上找到 v1.1 检查点。
## 下载 Gemma 模型检查点
您可以在 Kaggle 上找到模型检查点:
- [杰玛 3](https://www.kaggle.com/models/google/gemma-3/pyTorch)
- [杰玛 2](https://www.kaggle.com/models/google/gemma-2/pyTorch)
- [杰玛](https://www.kaggle.com/models/google/gemma/pyTorch)
或者,您可以在 Hugging Face Hub 上找到模型检查点 [此处](https://huggingface.co/models?other=gemma_torch)。要下载模型,请转到感兴趣模型的模型存储库,然后单击“文件和版本”选项卡,然后下载模型和分词器文件。对于编程下载,如果您安装了“huggingface_hub”,您还可以运行:
````
Huggingface-cli 下载 google/gemma-3-4b-it-pytorch
````
提供以下型号尺寸:
- **杰玛 3**:
- **仅文本**:1b
- **多式联运**:4b、12b、27b_v3
- **杰玛2**:
- **仅文本**:2b-v2、9b、27b
- **杰玛**:
- **仅文本**:2b、7b
请注意,您可以在 1B、4B、12B 和 27B 变体之间进行选择。
````
变量=<1b、2b、2b-v2、4b、7b、9b、12b、27b、27b_v3>
CKPT_PATH=<在此处插入 ckpt 路径>
````
## 在 Colab 上免费试用
请按照以下步骤操作
[https://ai.google.dev/gemma/docs/pytorch_gemma](https://ai.google.dev/gemma/docs/pytorch_gemma)。
## 使用 PyTorch 尝试一下
先决条件:确保你有设置 docker 权限 prope
相关推荐
GitHub 热门项目:gemma-2B-10M
GitHub项目:gemma-2B-10M 仓库地址:https://github。com/mustafaaljadery/gemma-2B-10M Stars
06-29
👁 None
★ 95
GitHub 热门项目:efflux-backend
GitHub项目:efflux-backend 仓库地址:https://github。
06-28
👁 None
★ 95
GitHub 热门项目:transformers-ruby
GitHub项目:transformers-ruby 仓库地址:https://github。
06-28
👁 None
★ 95
GitHub 热门项目:MesDoKubernetes
GitHub项目:MesDoKubernetes 仓库地址:https://github。
06-28
👁 None
★ 95
GitHub 热门项目: 项目游牧者
GitHub项目:project-nomad 仓库地址:https://github。com/Crosstalk-Solutions/project-nomad
06-28
👁 None
★ 95