[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-72103":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":23,"hasPages":23,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":26,"readmeContent":27,"aiSummary":28,"trendingCount":16,"starSnapshotCount":16,"syncStatus":29,"lastSyncTime":30,"discoverSource":31},72103,"gemma","google-deepmind\u002Fgemma","google-deepmind","Gemma open-weight LLM library, from Google DeepMind","https:\u002F\u002Fgemma-llm.readthedocs.io",null,"Python",5377,947,60,118,0,37,89,201,111,39.93,"Apache License 2.0",false,"main",[],"2026-06-12 02:02:58","# Gemma\n\n[![Unittests](https:\u002F\u002Fgithub.com\u002Fgoogle-deepmind\u002Fgemma\u002Factions\u002Fworkflows\u002Fpytest_and_autopublish.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fgoogle-deepmind\u002Fgemma\u002Factions\u002Fworkflows\u002Fpytest_and_autopublish.yml)\n[![PyPI version](https:\u002F\u002Fbadge.fury.io\u002Fpy\u002Fgemma.svg)](https:\u002F\u002Fbadge.fury.io\u002Fpy\u002Fgemma)\n[![Documentation Status](https:\u002F\u002Freadthedocs.org\u002Fprojects\u002Fgemma-llm\u002Fbadge\u002F?version=latest)](https:\u002F\u002Fgemma-llm.readthedocs.io\u002Fen\u002Flatest\u002F?badge=latest)\n\n[Gemma](https:\u002F\u002Fai.google.dev\u002Fgemma) is a family of open-weights Large Language\nModel (LLM) by [Google DeepMind](https:\u002F\u002Fdeepmind.google\u002F), based on Gemini\nresearch and technology.\n\nThis repository contains the implementation of the\n[`gemma`](https:\u002F\u002Fpypi.org\u002Fproject\u002Fgemma\u002F) PyPI package. A\n[JAX](https:\u002F\u002Fgithub.com\u002Fjax-ml\u002Fjax) library to use and fine-tune Gemma.\n\nFor examples and use cases, see our\n[documentation](https:\u002F\u002Fgemma-llm.readthedocs.io\u002F). Please\nreport issues and feedback in\n[our GitHub](https:\u002F\u002Fgithub.com\u002Fgoogle-deepmind\u002Fgemma\u002Fissues).\n\n### Installation\n\n1.  Install JAX for CPU, GPU or TPU. Follow the instructions on\n    [the JAX website](https:\u002F\u002Fjax.readthedocs.io\u002Fen\u002Flatest\u002Finstallation.html).\n1.  Run\n\n    ```sh\n    pip install gemma\n    ```\n\n### Examples\n\nHere is a minimal example to have a multi-turn, multi-modal conversation with\nGemma:\n\n```python\nfrom gemma import gm\n\n# Model and parameters (Gemma 4)\nmodel = gm.nn.Gemma4_E4B()\nparams = gm.ckpts.load_params(gm.ckpts.CheckpointPath.GEMMA4_E4B_IT)\n\n# Example of multi-turn conversation\nsampler = gm.text.ChatSampler(\n    model=model,\n    params=params,\n    multi_turn=True,\n)\n\nprompt = \"\"\"Which of the 2 images do you prefer ?\n\nImage 1: \u003C|image|>\nImage 2: \u003C|image|>\n\nWrite your answer as a poem.\"\"\"\nout0 = sampler.chat(prompt, images=[image1, image2])\n\nout1 = sampler.chat('What about the other image ?')\n```\n\nThe same `ChatSampler` API works with all Gemma versions (2, 3, 3n, 4).\n\nOur documentation contains various Colabs and tutorials, including:\n\n* [Sampling](https:\u002F\u002Fgemma-llm.readthedocs.io\u002Fen\u002Flatest\u002Fcolab_sampling.html)\n* [Multi-modal](https:\u002F\u002Fgemma-llm.readthedocs.io\u002Fen\u002Flatest\u002Fcolab_multimodal.html)\n* [Fine-tuning](https:\u002F\u002Fgemma-llm.readthedocs.io\u002Fen\u002Flatest\u002Fcolab_finetuning.html)\n* [LoRA](https:\u002F\u002Fgemma-llm.readthedocs.io\u002Fen\u002Flatest\u002Fcolab_lora_sampling.html)\n* ...\n\nAdditionally, our\n[examples\u002F](https:\u002F\u002Fgithub.com\u002Fgoogle-deepmind\u002Fgemma\u002Ftree\u002Fmain\u002Fexamples) folder\ncontain additional scripts to fine-tune and sample with Gemma.\n\n### Learn more about Gemma\n\n* To use this library: [Gemma documentation](https:\u002F\u002Fgemma-llm.readthedocs.io\u002F)\n* Technical reports for metrics and model capabilities:\n  * [Gemma 1](https:\u002F\u002Fgoo.gle\u002FGemmaReport)\n  * [Gemma 2](https:\u002F\u002Fgoo.gle\u002Fgemma2report)\n  * [Gemma 3](https:\u002F\u002Fstorage.googleapis.com\u002Fdeepmind-media\u002Fgemma\u002FGemma3Report.pdf)\n  * Gemma 4 (Coming soon)\n* Other Gemma implementations and doc on the\n  [Gemma ecosystem](https:\u002F\u002Fai.google.dev\u002Fgemma\u002Fdocs)\n\n### Downloading the models\n\nTo download the model weights. See\n[our documentation](https:\u002F\u002Fgemma-llm.readthedocs.io\u002Fen\u002Flatest\u002Fcheckpoints.html).\n\n### System Requirements\n\nGemma can run on a CPU, GPU and TPU. For GPU, we recommend 8GB+ RAM on GPU for\nThe 2B checkpoint and 24GB+ RAM on GPU are used for the 7B checkpoint.\n\n### Contributing\n\nWe welcome contributions! Please read our [Contributing Guidelines](.\u002FCONTRIBUTING.md) before submitting a pull request.\n\n*This is not an official Google product.*\n","Gemma 是由 Google DeepMind 开发的一个开放权重大型语言模型（LLM）库，基于 Gemini 研究和技术。其核心功能包括使用 JAX 库进行模型的调用和微调，支持多轮次、多模态对话，并且提供了一系列详细的教程和示例代码来帮助用户快速上手。此外，Gemma 还支持通过 LoRA 等技术实现高效微调。该库适用于需要高质量文本生成或希望对现有 LLM 进行定制化调整的研究人员及开发者，特别适合那些对多模态处理有需求的应用场景。",2,"2026-06-11 03:40:21","high_star"]