[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-google--tunix":3,"tool-google--tunix":64},[4,17,27,35,43,56],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":16},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,3,"2026-04-05T11:01:52",[13,14,15],"开发框架","图像","Agent","ready",{"id":18,"name":19,"github_repo":20,"description_zh":21,"stars":22,"difficulty_score":23,"last_commit_at":24,"category_tags":25,"status":16},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",138956,2,"2026-04-05T11:33:21",[13,15,26],"语言模型",{"id":28,"name":29,"github_repo":30,"description_zh":31,"stars":32,"difficulty_score":23,"last_commit_at":33,"category_tags":34,"status":16},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",107662,"2026-04-03T11:11:01",[13,14,15],{"id":36,"name":37,"github_repo":38,"description_zh":39,"stars":40,"difficulty_score":23,"last_commit_at":41,"category_tags":42,"status":16},3704,"NextChat","ChatGPTNextWeb\u002FNextChat","NextChat 是一款轻量且极速的 AI 助手，旨在为用户提供流畅、跨平台的大模型交互体验。它完美解决了用户在多设备间切换时难以保持对话连续性，以及面对众多 AI 模型不知如何统一管理的痛点。无论是日常办公、学习辅助还是创意激发，NextChat 都能让用户随时随地通过网页、iOS、Android、Windows、MacOS 或 Linux 端无缝接入智能服务。\n\n这款工具非常适合普通用户、学生、职场人士以及需要私有化部署的企业团队使用。对于开发者而言，它也提供了便捷的自托管方案，支持一键部署到 Vercel 或 Zeabur 等平台。\n\nNextChat 的核心亮点在于其广泛的模型兼容性，原生支持 Claude、DeepSeek、GPT-4 及 Gemini Pro 等主流大模型，让用户在一个界面即可自由切换不同 AI 能力。此外，它还率先支持 MCP（Model Context Protocol）协议，增强了上下文处理能力。针对企业用户，NextChat 提供专业版解决方案，具备品牌定制、细粒度权限控制、内部知识库整合及安全审计等功能，满足公司对数据隐私和个性化管理的高标准要求。",87618,"2026-04-05T07:20:52",[13,26],{"id":44,"name":45,"github_repo":46,"description_zh":47,"stars":48,"difficulty_score":23,"last_commit_at":49,"category_tags":50,"status":16},2268,"ML-For-Beginners","microsoft\u002FML-For-Beginners","ML-For-Beginners 是由微软推出的一套系统化机器学习入门课程，旨在帮助零基础用户轻松掌握经典机器学习知识。这套课程将学习路径规划为 12 周，包含 26 节精炼课程和 52 道配套测验，内容涵盖从基础概念到实际应用的完整流程，有效解决了初学者面对庞大知识体系时无从下手、缺乏结构化指导的痛点。\n\n无论是希望转型的开发者、需要补充算法背景的研究人员，还是对人工智能充满好奇的普通爱好者，都能从中受益。课程不仅提供了清晰的理论讲解，还强调动手实践，让用户在循序渐进中建立扎实的技能基础。其独特的亮点在于强大的多语言支持，通过自动化机制提供了包括简体中文在内的 50 多种语言版本，极大地降低了全球不同背景用户的学习门槛。此外，项目采用开源协作模式，社区活跃且内容持续更新，确保学习者能获取前沿且准确的技术资讯。如果你正寻找一条清晰、友好且专业的机器学习入门之路，ML-For-Beginners 将是理想的起点。",84991,"2026-04-05T10:45:23",[14,51,52,53,15,54,26,13,55],"数据工具","视频","插件","其他","音频",{"id":57,"name":58,"github_repo":59,"description_zh":60,"stars":61,"difficulty_score":10,"last_commit_at":62,"category_tags":63,"status":16},3128,"ragflow","infiniflow\u002Fragflow","RAGFlow 是一款领先的开源检索增强生成（RAG）引擎，旨在为大语言模型构建更精准、可靠的上下文层。它巧妙地将前沿的 RAG 技术与智能体（Agent）能力相结合，不仅支持从各类文档中高效提取知识，还能让模型基于这些知识进行逻辑推理和任务执行。\n\n在大模型应用中，幻觉问题和知识滞后是常见痛点。RAGFlow 通过深度解析复杂文档结构（如表格、图表及混合排版），显著提升了信息检索的准确度，从而有效减少模型“胡编乱造”的现象，确保回答既有据可依又具备时效性。其内置的智能体机制更进一步，使系统不仅能回答问题，还能自主规划步骤解决复杂问题。\n\n这款工具特别适合开发者、企业技术团队以及 AI 研究人员使用。无论是希望快速搭建私有知识库问答系统，还是致力于探索大模型在垂直领域落地的创新者，都能从中受益。RAGFlow 提供了可视化的工作流编排界面和灵活的 API 接口，既降低了非算法背景用户的上手门槛，也满足了专业开发者对系统深度定制的需求。作为基于 Apache 2.0 协议开源的项目，它正成为连接通用大模型与行业专有知识之间的重要桥梁。",77062,"2026-04-04T04:44:48",[15,14,13,26,54],{"id":65,"github_repo":66,"name":67,"description_en":68,"description_zh":69,"ai_summary_zh":69,"readme_en":70,"readme_zh":71,"quickstart_zh":72,"use_case_zh":73,"hero_image_url":74,"owner_login":75,"owner_name":76,"owner_avatar_url":77,"owner_bio":78,"owner_company":79,"owner_location":79,"owner_email":80,"owner_twitter":81,"owner_website":82,"owner_url":83,"languages":84,"stars":97,"forks":98,"last_commit_at":99,"license":100,"difficulty_score":101,"env_os":102,"env_gpu":103,"env_ram":103,"env_deps":104,"category_tags":113,"github_topics":79,"view_count":10,"oss_zip_url":79,"oss_zip_packed_at":79,"status":16,"created_at":114,"updated_at":115,"faqs":116,"releases":141},1214,"google\u002Ftunix","tunix","A Lightweight LLM Post-Training Library","tunix是一个轻量级的LLM后训练库，专为简化大型语言模型的微调和强化学习流程而设计。它基于JAX框架，利用TPU实现高效计算，支持监督微调（包括PEFT和DPO）、强化学习（如PPO和GRPO）以及代理强化学习（支持多轮工具调用和异步推理），解决了传统后训练中效率低、集成复杂的问题。tunix通过模块化设计让开发者能轻松定制工作流，并无缝集成vLLM和SGLang-JAX用于高性能推理，同时兼容Flax NNX等JAX生态工具。适合AI开发者和研究人员使用，尤其对追求高性能、可扩展性且熟悉JAX生态的团队友好。当前V2版本正在活跃开发中，持续优化性能并添加新功能，例如对Qwen3模型的高效内核支持和代理RL训练的完善。","# Tunix: A Lightweight LLM Post-Training Library\n\n\u003Cdiv align=\"left\">\n\n\u003Ca href=\"https:\u002F\u002Ftunix.readthedocs.io\u002Fen\u002Flatest\u002Findex.html\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fdocumentation-blue\">\u003C\u002Fa>\n\n\u003C\u002Fdiv>\n\n**Tunix (Tune-in-JAX)** is a JAX based library designed to streamline the\npost-training of Large Language Models. It provides efficient and scalable\nsupport for:\n\n- **SOTA Training performance on TPUs**\n- **Supervised Fine-Tuning**\n- **Reinforcement Learning (RL)**\n- **Agentic RL**\n\nTunix leverages the power of JAX for accelerated computation and seamless\nintegration with JAX-based modeling frameworks like\n[Flax NNX](https:\u002F\u002Fflax.readthedocs.io\u002Fen\u002Flatest\u002Fnnx_basics.html), and\nintegrates with high-performance inference engines like vLLM and SGLang-JAX for\nrollout. **For our detailed documentation, please refer to the [Tunix Website](https:\u002F\u002Ftunix.readthedocs.io\u002Fen\u002Flatest\u002Findex.html)**.\n\n\n**Current Status: V2 Release**\n\nTunix is under active development. Our team is actively working on expanding its\ncapabilities, usability and performance. Stay tuned for upcoming updates and new\nfeatures! See [Talks and Announcements](https:\u002F\u002Ftunix.readthedocs.io\u002Fen\u002Flatest\u002Ftalks.html) for latest updates, talks, and blog posts.\n\n\n## High Level Architecture\nTunix serves as a state-of-the-art post-training library within the JAX training\nstack, positioned to leverage foundational tools like Flax, Optax, Orbax, etc.\nfor efficient model refinement. It sits as an intermediate layer between these\ncore utilities and optimized models like MaxText and MaxDiffusion, streamlining\ntuning workflows on top of the XLA and JAX infrastructure. See [Design Overview](https:\u002F\u002Ftunix.readthedocs.io\u002Fen\u002Flatest\u002Fdesign.html) for more details on the architecture.\n\n![Tunix in JAX ecosystem](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fgoogle_tunix_readme_e45ddc6af590.png)\n\n## Key Features\n-   **[Supervised Fine-Tuning (SFT)](https:\u002F\u002Ftunix.readthedocs.io\u002Fen\u002Flatest\u002Falgorithms.html)**:\n    -   Full Weights Fine-Tuning\n    -   [PEFT](https:\u002F\u002Ftunix.readthedocs.io\u002Fen\u002Flatest\u002Fperformance.html#peft-with-lora) (Parameter-Efficient\n        Fine-Tuning)\n    -   [DPO](https:\u002F\u002Farxiv.org\u002Fabs\u002F2305.18290) (Direct Preference Optimization)\n      -   [ORPO](https:\u002F\u002Farxiv.org\u002Fabs\u002F2403.07691) (Odds Ratio Preference Optimization)\n-   **[Reinforcement Learning (RL)](https:\u002F\u002Ftunix.readthedocs.io\u002Fen\u002Flatest\u002Falgorithms.html)**:\n    -   [PPO](https:\u002F\u002Farxiv.org\u002Fabs\u002F1707.06347) (Proximal Policy Optimization)\n    -   [GRPO](https:\u002F\u002Farxiv.org\u002Fabs\u002F2402.03300) (Group Relative Policy\n        Optimization)\n      -   [GSPO-Token](https:\u002F\u002Farxiv.org\u002Fabs\u002F2507.18071) (Token-level Group\n          Sequence Policy Optimization)\n      -   [DAPO](https:\u002F\u002Farxiv.org\u002Fabs\u002F2503.14476) (Direct Alignment via Preference\n          Optimization)\n      -   [Dr.GRPO](https:\u002F\u002Farxiv.org\u002Fabs\u002F2503.20783) (Distributionally Robust\n          GRPO)\n-   **[Agentic RL](https:\u002F\u002Ftunix.readthedocs.io\u002Fen\u002Flatest\u002Fagentic_rl.html)**:\n    -   Multi-turn tool use\n    -   Asynchronous rollout for high-throughput trajectory collection\n    -   Trajectory batching and grouping\n\n## News\n\n-   [2026\u002F01] Tunix model now supports efficient kernel execution ([splash attn](https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fblob\u002Fmain\u002Ftunix\u002Fmodels\u002Fqwen3\u002Fmodel.py#L150-L151), [GMM MoE](https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fblob\u002Fmain\u002Ftunix\u002Fmodels\u002Fqwen3\u002Fmodel.py#L638)).\n-   [2025\u002F12] [Agentic RL Training](https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Ftree\u002Fmain\u002Ftunix\u002Frl\u002Fagentic) has been released, with efficient support of multi-turn agent-env interaction, tool usage, async rollout, etc.\n\n## Framework & Infra Highlights\n-   **Modularity**:\n    -   Components are designed to be reusable and composable\n    -   Easy to customize and extend\n-   **Performance & Efficiency**:\n    -   Native [vLLM](https:\u002F\u002Ftunix.readthedocs.io\u002Fen\u002Flatest\u002Frollout.html#vllm) and\n        [SGLang-JAX](https:\u002F\u002Ftunix.readthedocs.io\u002Fen\u002Flatest\u002Frollout.html#sglang) on TPU integration for performant\n        rollout\n    -   Native [MaxText](https:\u002F\u002Fgithub.com\u002FAI-Hypercomputer\u002Fmaxtext) model\n        integration for high performance kernels and model execution\n    -   [Micro-batching](https:\u002F\u002Ftunix.readthedocs.io\u002Fen\u002Flatest\u002Fperformance.html#batching-config) support for component\n        level efficient execution\n-   **Stability**\n    -   Seamless multi-host distributed training with Pathways which can scale\n        up to thousands of devices\n    -   [Checkpointing and Fault Tolerance](https:\u002F\u002Ftunix.readthedocs.io\u002Fen\u002Flatest\u002Freliability.html)\n\n## Getting Started\n**Installation:** Jump to [Installation](https:\u002F\u002Ftunix.readthedocs.io\u002Fen\u002Flatest\u002Fquickstart.html#installation) to install Tunix and run your first training\njob.\n\n**Examples:** To get started, we have a number of detailed examples and tutorials. You can see [Quick Start](https:\u002F\u002Ftunix.readthedocs.io\u002Fen\u002Flatest\u002Fquickstart.html) for a great set of starting examples and [Examples and Guides](https:\u002F\u002Ftunix.readthedocs.io\u002Fen\u002Flatest\u002Fexamples.html) for a comprehensive list of all the notebooks and examples we have.\n\n\n## Supported Models\nTunix supports a growing list of models including Gemma, Llama, and Qwen families.\nSee [Models](https:\u002F\u002Ftunix.readthedocs.io\u002Fen\u002Flatest\u002Fmodels.html) for a full list and details on how to add new ones.\n\n\n## Contributing and Feedback\nWe welcome contributions! As Tunix is in early development, the contribution\nprocess is still being formalized. The detailed contribution process is outlined\n[here](https:\u002F\u002Ftunix.readthedocs.io\u002Fen\u002Flatest\u002Fcontributing.html). In\nthe meantime, you can make feature requests, report issues and ask questions in\nour\n[Tunix GitHub discussion forum](https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fdiscussions).\n\n## Collaborations and Partnership\n[GRL](https:\u002F\u002Fgithub.com\u002Flmgame-org\u002FGRL\u002Fblob\u002Ftunix_integration_dev\u002FREADME.md)\n(Game Reinforcement Learning), developed by\n[Hao AI Lab](https:\u002F\u002Fhao-ai-lab.github.io\u002F) from UCSD, is an open-source\nframework for post-training large language models through multi-turn RL on\nchallenging games. In collaboration with Tunix, GRL integrates seamless TPU\nsupport—letting users quickly run scalable, reproducible RL experiments (like\nPPO rollouts on Qwen2.5-0.5B-Instruct) on TPU v4 meshes with\n[minimal setup](https:\u002F\u002Fgithub.com\u002Flmgame-org\u002FGRL\u002Fblob\u002Ftunix_integration_dev\u002FREADME.md#5-launch-the-quick-test-defaults-to-qwen2505b-supports-4-tpu-v4-with-mesh-22).\nThis partnership empowers the community to push LLM capabilities further,\ncombining Tunix’s optimized TPU runtime with GRL’s flexible game RL pipeline for\ncutting-edge research and easy reproducibility.\n\n## Citing Tunix\n```bibtex\n@misc{tunix2025,\n  title={Tunix (Tune-in-JAX)},\n  author={Bao, Tianshu and Carpenter, Jeff and Chai, Lin and Gao, Haoyu and Jiang, Yangmu and Noghabi, Shadi and Sharma, Abheesht and Tan, Sizhi and Wang, Lance and Yan, Ann and Yu, Weiren and others},\n  year={2025},\n  howpublished={\\url{https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix}},\n}\n```\n\n## Acknowledgements\n\nThank you to all our wonderful contributors!\n\n[![Contributors](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fgoogle_tunix_readme_a14ddb634fe2.png)](https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fgraphs\u002Fcontributors)\n","# Tunix：轻量级大语言模型后训练库\n\n\u003Cdiv align=\"left\">\n\n\u003Ca href=\"https:\u002F\u002Ftunix.readthedocs.io\u002Fen\u002Flatest\u002Findex.html\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fdocumentation-blue\">\u003C\u002Fa>\n\n\u003C\u002Fdiv>\n\n**Tunix（Tune-in-JAX）** 是一个基于 JAX 的库，旨在简化大型语言模型的后训练流程。它为以下任务提供了高效且可扩展的支持：\n\n- **在 TPU 上实现 SOTA 训练性能**\n- **监督微调**\n- **强化学习 (RL)**\n- **智能体强化学习**\n\nTunix 利用 JAX 的强大计算能力，实现了加速运算，并与基于 JAX 的建模框架（如 [Flax NNX](https:\u002F\u002Fflax.readthedocs.io\u002Fen\u002Flatest\u002Fnnx_basics.html)）无缝集成，同时与高性能推理引擎（如 vLLM 和 SGLang-JAX）结合用于回放。**有关详细文档，请参阅 [Tunix 官网](https:\u002F\u002Ftunix.readthedocs.io\u002Fen\u002Flatest\u002Findex.html)**。\n\n**当前状态：V2 版本发布**\n\nTunix 目前仍在积极开发中。我们的团队正致力于扩展其功能、易用性和性能。敬请期待未来的更新和新特性！请参阅 [演讲与公告](https:\u002F\u002Ftunix.readthedocs.io\u002Fen\u002Flatest\u002Ftalks.html) 以获取最新动态、演讲和博客文章。\n\n## 高层次架构\nTunix 是 JAX 训练栈中的先进后训练库，能够充分利用 Flax、Optax、Orbax 等基础工具，实现高效的模型优化。它位于这些核心工具与 MaxText、MaxDiffusion 等优化模型之间，作为中间层，在 XLA 和 JAX 基础设施之上简化调优工作流。更多架构细节请参阅 [设计概述](https:\u002F\u002Ftunix.readthedocs.io\u002Fen\u002Flatest\u002Fdesign.html)。\n\n![Tunix 在 JAX 生态系统中的位置](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fgoogle_tunix_readme_e45ddc6af590.png)\n\n## 核心特性\n-   **[监督微调 (SFT)](https:\u002F\u002Ftunix.readthedocs.io\u002Fen\u002Flatest\u002Falgorithms.html)**：\n    -   全参数微调\n    -   [PEFT](https:\u002F\u002Ftunix.readthedocs.io\u002Fen\u002Flatest\u002Fperformance.html#peft-with-lora)（参数高效微调）\n    -   [DPO](https:\u002F\u002Farxiv.org\u002Fabs\u002F2305.18290)（直接偏好优化）\n      -   [ORPO](https:\u002F\u002Farxiv.org\u002Fabs\u002F2403.07691)（几率比偏好优化）\n-   **[强化学习 (RL)](https:\u002F\u002Ftunix.readthedocs.io\u002Fen\u002Flatest\u002Falgorithms.html)**：\n    -   [PPO](https:\u002F\u002Farxiv.org\u002Fabs\u002F1707.06347)（近端策略优化）\n    -   [GRPO](https:\u002F\u002Farxiv.org\u002Fabs\u002F2402.03300)（群体相对策略优化）\n      -   [GSPO-Token](https:\u002F\u002Farxiv.org\u002Fabs\u002F2507.18071)（基于 token 的群体序列策略优化）\n      -   [DAPO](https:\u002F\u002Farxiv.org\u002Fabs\u002F2503.14476)（通过偏好优化进行直接对齐）\n      -   [Dr.GRPO](https:\u002F\u002Farxiv.org\u002Fabs\u002F2503.20783)（分布鲁棒 GRPO）\n-   **[智能体强化学习](https:\u002F\u002Ftunix.readthedocs.io\u002Fen\u002Flatest\u002Fagentic_rl.html)**：\n    -   多轮工具使用\n    -   异步回放以实现高吞吐量轨迹收集\n    -   轨迹批处理与分组\n\n## 最新消息\n\n-   [2026年1月] Tunix 模型现已支持高效的内核执行（[splash attn](https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fblob\u002Fmain\u002Ftunix\u002Fmodels\u002Fqwen3\u002Fmodel.py#L150-L151), [GMM MoE](https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fblob\u002Fmain\u002Ftunix\u002Fmodels\u002Fqwen3\u002Fmodel.py#L638)）。\n-   [2025年12月] [智能体强化学习训练](https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Ftree\u002Fmain\u002Ftunix\u002Frl\u002Fagentic) 已发布，高效支持多轮智能体与环境交互、工具使用、异步回放等功能。\n\n## 框架与基础设施亮点\n-   **模块化**：\n    -   组件设计为可重用和可组合\n    -   易于自定义和扩展\n-   **性能与效率**：\n    -   原生集成 [vLLM](https:\u002F\u002Ftunix.readthedocs.io\u002Fen\u002Flatest\u002Frollout.html#vllm) 和 [SGLang-JAX](https:\u002F\u002Ftunix.readthedocs.io\u002Fen\u002Flatest\u002Frollout.html#sglang) 以实现高效的 TPU 回放\n    -   原生集成 [MaxText](https:\u002F\u002Fgithub.com\u002FAI-Hypercomputer\u002Fmaxtext) 模型，提供高性能内核和模型执行\n    -   支持 [微批次](https:\u002F\u002Ftunix.readthedocs.io\u002Fen\u002Flatest\u002Fperformance.html#batching-config)，实现组件级别的高效执行\n-   **稳定性**：\n    -   通过 Pathways 实现无缝的多主机分布式训练，可扩展至数千台设备\n    -   [检查点与容错](https:\u002F\u002Ftunix.readthedocs.io\u002Fen\u002Flatest\u002Freliability.html)\n\n## 开始使用\n**安装：** 请跳转至 [安装](https:\u002F\u002Ftunix.readthedocs.io\u002Fen\u002Flatest\u002Fquickstart.html#installation) 页面，安装 Tunix 并运行您的第一个训练任务。\n\n**示例：** 为了帮助您快速上手，我们准备了大量详细的示例和教程。您可以查看 [快速入门](https:\u002F\u002Ftunix.readthedocs.io\u002Fen\u002Flatest\u002Fquickstart.html) 获取一组优秀的入门示例，以及 [示例与指南](https:\u002F\u002Ftunix.readthedocs.io\u002Fen\u002Flatest\u002Fexamples.html) 查看我们提供的所有笔记本和示例的完整列表。\n\n## 支持的模型\nTunix 支持不断增长的模型列表，包括 Gemma、Llama 和 Qwen 系列。请参阅 [模型](https:\u002F\u002Ftunix.readthedocs.io\u002Fen\u002Flatest\u002Fmodels.html) 页面，了解完整列表及如何添加新模型的说明。\n\n## 贡献与反馈\n我们欢迎各方贡献！由于 Tunix 尚处于早期开发阶段，贡献流程仍在逐步完善中。详细的贡献流程已在 [这里](https:\u002F\u002Ftunix.readthedocs.io\u002Fen\u002Flatest\u002Fcontributing.html) 说明。在此期间，您可以通过我们的 [Tunix GitHub 讨论区](https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fdiscussions) 提出功能请求、报告问题或提问。\n\n## 合作与伙伴关系\n由 UCSD 的 [Hao AI Lab](https:\u002F\u002Fhao-ai-lab.github.io\u002F) 开发的 [GRL](https:\u002F\u002Fgithub.com\u002Flmgame-org\u002FGRL\u002Fblob\u002Ftunix_integration_dev\u002FREADME.md)（游戏强化学习），是一个开源框架，用于通过多轮强化学习在具有挑战性的游戏中对大型语言模型进行后训练。借助与 Tunix 的合作，GRL 集成了无缝的 TPU 支持，使用户能够快速运行可扩展、可重复的强化学习实验（例如在 Qwen2.5-0.5B-Instruct 上进行 PPO 回放），只需在 TPU v4 网格上进行 [最小化设置](https:\u002F\u002Fgithub.com\u002Flmgame-org\u002FGRL\u002Fblob\u002Ftunix_integration_dev\u002FREADME.md#5-launch-the-quick-test-defaults-to-qwen2505b-supports-4-tpu-v4-with-mesh-22)。这一合作使社区能够进一步提升 LLM 的能力，将 Tunix 的优化 TPU 运行时与 GRL 的灵活游戏强化学习流水线相结合，从而推动前沿研究并确保易于复现。\n\n## 引用 Tunix\n```bibtex\n@misc{tunix2025,\n  title={Tunix (Tune-in-JAX)},\n  author={Bao, Tianshu and Carpenter, Jeff and Chai, Lin and Gao, Haoyu and Jiang, Yangmu and Noghabi, Shadi and Sharma, Abheesht and Tan, Sizhi and Wang, Lance and Yan, Ann and Yu, Weiren and others},\n  year={2025},\n  howpublished={\\url{https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix}},\n}\n```\n\n## 致谢\n\n感谢所有优秀的贡献者！\n\n[![贡献者](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fgoogle_tunix_readme_a14ddb634fe2.png)](https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fgraphs\u002Fcontributors)","# Tunix 快速上手指南\n\n## 环境准备\n- **系统要求**：Linux (推荐)，Python 3.8+\n- **前置依赖**：确保已安装 JAX 和 JAXlib（`pip install jax jaxlib`）。TPU 支持需 Google Cloud 环境；本地开发建议使用 CPU\u002FGPU。\n\n## 安装步骤\n使用国内镜像加速安装（推荐）：\n```bash\npip install git+https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix.git -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple\n```\n\n## 基本使用\n以下为最简 SFT（监督微调）示例：\n```python\nfrom tunix import sft\n\n# 加载模型（支持 Gemma、Llama 等）\nmodel = sft.load_model(\"gemma-2b\")\n# 初始化训练器\ntrainer = sft.Trainer(model)\n# 开始训练（替换 data 为实际数据路径）\ntrainer.train(data=\"path\u002Fto\u002Fyour\u002Fdata\")\n```","某电商公司AI团队计划微调开源Qwen-7B模型，优化客服对话系统对退货政策的响应准确率，需在2周内完成从数据准备到部署的全流程。\n\n### 没有 tunix 时\n- 开发团队需手动编写复杂训练脚本，涵盖数据预处理、模型加载和优化器配置，平均耗时2周且易因配置错误导致失败。\n- TPU集群训练缺乏JAX优化，单次迭代耗时30分钟，整体训练周期长达2周，资源利用率不足50%。\n- 采用全参数微调时GPU成本高昂，尝试PEFT（LoRA）需额外开发适配层，实现过程反复调试耗时3天。\n- 部署推理依赖手动集成vLLM，导致客服响应延迟增加15%，影响用户体验。\n- 多轮RL训练依赖串行流程，轨迹收集效率低，每轮需3天，难以快速迭代策略。\n\n### 使用 tunix 后\n- 通过tunix的SFT模块一键配置PEFT（LoRA），训练脚本开发时间压缩至2天，错误率下降70%。\n- 利用tunix的TPU原生优化，训练速度提升3倍（单次迭代10分钟），周期缩短至5天，资源利用率提升至85%。\n- 内置PEFT和DPO支持，微调效率提高50%，GPU成本降低40%，避免额外适配开发。\n- 直接集成vLLM和SGLang-JAX，推理延迟优化至10ms内，客服响应速度提升20%。\n- 借助Agentic RL的异步rollout功能，多轮训练效率提升2倍（每轮1.5天），策略迭代速度翻倍。\n\ntunix将LLM后训练从高门槛工程变为高效流水线，显著加速业务模型落地。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fgoogle_tunix_670678e5.png","google","Google","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fgoogle_c4bedcda.png","Google ❤️ Open Source",null,"opensource@google.com","GoogleOSS","https:\u002F\u002Fopensource.google\u002F","https:\u002F\u002Fgithub.com\u002Fgoogle",[85,89,93],{"name":86,"color":87,"percentage":88},"Python","#3572A5",98.8,{"name":90,"color":91,"percentage":92},"Shell","#89e051",1.1,{"name":94,"color":95,"percentage":96},"Dockerfile","#384d54",0.1,2209,272,"2026-04-04T03:53:19","Apache-2.0",5,"","未说明",{"notes":105,"python":103,"dependencies":106},"需要 Google Cloud TPU 环境（推荐 TPU v4），首次运行需下载模型文件",[107,108,109,110,111,112],"jax","flax","optax","orbax","vllm","sglang-jax",[13],"2026-03-27T02:49:30.150509","2026-04-06T06:52:09.457827",[117,122,127,132,137],{"id":118,"question_zh":119,"answer_zh":120,"source_url":121},5530,"TUNIX 支持 GPU 吗？","TUNIX 目前仅支持 TPU，不支持 GPU。如果您需要在 GPU 上运行，请考虑在 Google Colab 或 Linux 机器上使用 TPU 进行训练。","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fissues\u002F452",{"id":123,"question_zh":124,"answer_zh":125,"source_url":126},5531,"如何正确使用 with_gen_model_input_fn() 处理大数据集？","对于大数据集导致内存不足的问题，建议预处理数据并缓存为 ArrayRecord 文件。示例代码：\n```python\nimport os\nimport pickle\nimport grain\nfrom array_record.python import array_record_module\nfrom transformers import Gemma3Processor\n\ndef encode_batch(processor, batch):\n    # 编码批次数据，例如分词字符串、加载和预处理图像等\n    ...\n\ndef encode_with_cache(processor: Gemma3Processor, raw_dataset, cache_path: str):\n    if not os.path.exists(cache_path):\n        os.makedirs(os.path.dirname(cache_path))\n        writer = array_record_module.ArrayRecordWriter(cache_path, \"group_size:1\")\n        for batch in raw_dataset:\n            datapoint = encode_batch(processor, batch)\n            writer.write(pickle.dumps(datapoint))\n        writer.close()\n    # 创建数据加载器\n    data_source = grain.sources.ArrayRecordDataSource(cache_path)\n```","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fissues\u002F965",{"id":128,"question_zh":129,"answer_zh":130,"source_url":131},5532,"训练后准确率下降怎么办？","确保使用最新版本和正确示例。参考更新的 Colab 笔记本：https:\u002F\u002Fcolab.research.google.com\u002Fgist\u002Frajasekharporeddy\u002F9c01628c144f92bad39a727537376578\u002Fgrpo_gemma.ipynb，训练后准确率从 45.3125% 提升至 54.6875%。","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fissues\u002F688",{"id":133,"question_zh":134,"answer_zh":135,"source_url":136},5533,"安装后找不到 tunix 模块怎么办？","安装后需要重启 Jupyter 内核。如果问题持续，尝试使用 `pip install --user tunix` 安装，并确保在正确环境中运行。","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fissues\u002F1135",{"id":138,"question_zh":139,"answer_zh":140,"source_url":136},5534,"TUNIX 使用的 Hugging Face API 是否过时？","TUNIX 可能使用旧版 Hugging Face API（如 `huggingface_hub_v1.api`）。建议更新 `huggingface_hub` 包到最新版本，或参考文档确认兼容性。",[142,147,152,157,162,167,172,177,182],{"id":143,"version":144,"summary_zh":145,"released_at":146},105066,"v0.1.6","## Highlights\r\n* supports Agentic RL training, see https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Ftree\u002Fmain\u002Fexamples\u002Fagentic\u002Fgemma_grpo_demo_nb.py\r\n* supports VLM training, see https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fblob\u002Fmain\u002Fexamples\u002Fsft\u002Fvlm_training.py\r\n\r\n```python\r\nfrom tunix import AgenticGRPOConfig\r\nfrom tunix import AgenticGRPOLearner\r\n\r\nagentic_grpo_config = AgenticGRPOConfig(\r\n    num_generations=NUM_GENERATIONS,\r\n    num_iterations=NUM_ITERATIONS,\r\n    max_response_length=MAX_RESPONSE_LENGTH,\r\n    beta=BETA,\r\n    epsilon=EPSILON,\r\n    system_prompt=SWE_SYSTEM_PROMPT,\r\n    max_concurrency=1,\r\n    epsilon_high=0.28,\r\n    off_policy_steps=0,\r\n)\r\n\r\nagentic_grpo_learner = AgenticGRPOLearner(\r\n    rl_cluster=rl_cluster,\r\n    reward_fns=reward_fns,\r\n    agent_class=MyAgentClass,\r\n    agent_kwargs={},\r\n    env_class=MyEnv,\r\n    env_kwargs={\"max_steps\": MAX_STEPS},\r\n    algo_config=agentic_grpo_config,\r\n    chat_parser=chat_parser,\r\n)\r\n\r\nagentic_grpo_learner.train(train_dataset=train_dataset)\r\n```\r\n\r\n## What's Changed\r\n* Developing for v0.1.6 now. by @wang2yn84 in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F785\r\n* Fix the vllm server mode not finish issue. by @wang2yn84 in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F784\r\n* [Tunix] Update Dockerfile and deepscaler trainer script to seperate trainer model and ref model. by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F725\r\n* Add Tunix RL GRPO examples for Gemma3. by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F788\r\n* [Tunix] change model implementation to be pytree compatible. by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F782\r\n* Fix TPU nightly regression workflow to use vLLM container and add new tests. by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F754\r\n* [Tunix] Update sharding configuration for attention weights. by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F759\r\n* [Tunix] Add gcsfs to TPU nightly regression dependencies. by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F790\r\n* Adding back test_logprobs_extraction_with_missing_token. by @wang2yn84 in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F789\r\n* feat:add device indexes for sglang jax by @pathfinder-pf in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F786\r\n* Fix the rendering issue in Example gallery document. by @rajasekharporeddy in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F799\r\n* [Tunix] Remove the version pin for SGLang. by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F798\r\n* [Fixes 794] fix transformers=4.57.1 to solve issue42369 in transformers and use c… by @aolemila in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F795\r\n* Refactor gemma3 modelConfig to explicitly include all models by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F792\r\n* [Tunix] Fix nightly regression: remove unnecessary --root-dir argument from TPU nightly regression script. Fix the MATH500 eval script. by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F796\r\n* use naming utils in tunix cli by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F736\r\n* [Tunix] Remove GitHub Actions replacement in copybara. Replying on more generic google3 replacement rule by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F803\r\n* reduce safetensor loading time by @keshavb96 in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F760\r\n* [Tunix] Remove env_utils.fs_open from safetensors_loader. fsspec object doesn't have fileno. 3P test is broken: https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Factions\u002Fruns\u002F19689186862\u002Fjob\u002F56403241781?pr=744 by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F804\r\n* [Tunix] Pass HF_TOKEN to TPU nightly regression tests. by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F805\r\n* [Tunix] Follow up of cl\u002F836961494. It was out of sync with github PR. by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F807\r\n* [Tunix] Pin the vLLM TPU Docker image to a specific nightly build version for the TPU tests. by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F808\r\n* [Tunix] Update tunix nightly regression workflow schedule. Change the cron schedule from 2 AM UTC to 10 AM UTC. by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F806\r\n* Centralize Flax sharding setup in env_utils by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F797\r\n* Fix gemma3 grpo shell scripts  by @sizhit2 in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F791\r\n* [Tunix] Fix GRPO script. by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F811\r\n* rename all model configs to use \"p\" instead of  \"_\" for float values by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F740\r\n* [Tunix] Move model alignment tests from CPU to TPU run dev workflow. by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F818\r\n* handle the situation when lora_config is not provided by @Hanjun-Dai in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F813\r\n* checkpoint_options->checkpointing_options in cli\u002Fco","2026-03-13T22:57:27",{"id":148,"version":149,"summary_zh":150,"released_at":151},105067,"v0.1.5","## API Change\r\nThis release fixes a critical issue introduced in v0.1.4 that prevented correct functionality. \r\nUsers are strongly recommended to upgrade to v0.1.5.\r\n\r\n```\r\n# old:\r\nrl_trainer = GrpoLearner(\r\n  grpo_config=grpo_config,\r\n)\r\n# new:\r\nrl_trainer = GrpoLearner(\r\n  algo_config=grpo_config,\r\n)\r\n```\r\n\r\n## What's Changed\r\n* Remove grpo helper. by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F771\r\n* Fix the GitHub source links in example notebooks on dpo, grpo and qlora by @rajasekharporeddy in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F775\r\n* adding support for cns file downloads in tunix cli by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F762\r\n* Developing on v0.1.5 now by @wang2yn84 in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F776\r\n* Replace `grpo_config` with `algo_config` while calling `GRPOLearner` in GRPO Demo notebook by @rajasekharporeddy in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F778\r\n* Lazy load transformers by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F779\r\n* Fix first_micro_batch_rollout_time by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F783\r\n\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fcompare\u002Fv0.1.4...v0.1.5","2025-11-21T02:19:23",{"id":153,"version":154,"summary_zh":155,"released_at":156},105068,"v0.1.4","## Highlights\r\n\r\n* With the release of JAX to 0.8.1, flax released 0.12.1, therefore remove the qwix version limit.\r\n* Tunix supports DP on vLLM backend\r\n* Enables performance tracer: https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Ftree\u002Fmain\u002Ftunix\u002Fperf\r\n\r\n## API Changes\r\n```\r\n# Old:\r\ncluster_config = rl_cluster_lib.ClusterConfig(\r\n    role_to_mesh={\r\n        ...,\r\n    },\r\n    training_config=rl_cluster_lib.RLTrainingConfig(\r\n        ...,\r\n    ),\r\n    rollout_engine=args.rollout_engine,\r\n    rollout_config=base_rollout.RolloutConfig(\r\n        ...,\r\n    ),\r\n    rollout_vllm_model_version=VLLM_MODEL_VERSION,\r\n    ...,\r\n)\r\n# New:\r\ncluster_config = rl_cluster_lib.ClusterConfig(\r\n    role_to_mesh={\r\n        ...,\r\n    },\r\n    training_config=rl_cluster_lib.RLTrainingConfig(\r\n        ...,\r\n    ),\r\n    rollout_engine=args.rollout_engine,\r\n    rollout_config=base_rollout.RolloutConfig(\r\n        ...,\r\n        rollout_vllm_model_version=VLLM_MODEL_VERSION,\r\n        ...,\r\n    ),\r\n)\r\n```\r\n\r\n## New Features\r\n### Model Support:\r\n* Added configuration for the Qwen2.5 math-1.5b model.\r\n* Included mobile fine-tuning examples for Gemma 270M.\r\n### SGLang Integration:\r\n* Introduced an SGLang JAX sampler.\r\n* Added SGLang JAX mapping for Qwen2 models.\r\n* Enabled SGLang\u002FJAX CI.\r\n### Agentic Workflows:\r\n* Added ModelAgent and TaskEnvironment for single-turn agentic workflows.\r\n* Introduced an Agentic GRPOLearner for RL training.\r\n* Provided a script for GRPO agent mode.\r\n* Added tests for agentic_grpo_learner.\r\n* Implemented Agentic GRPO with multi-iteration support and fixes.\r\n### Training & Evaluation:\r\n* Added support for ORPO trainer.\r\n* Included scripts for OSS math500 evaluation and deepscalar.\r\n### Infrastructure:\r\n* Added Dockerfile and build scripts for Tunix for GKE development.\r\n* Implemented GitHub Actions workflows for Tunix TPU nightly regression.\r\n* Added a plugin-type custom logging backend support in MetricsLogger.\r\n\r\n## Improvements\r\n### Model Loading & Configuration:\r\n* Refactored model loading from Flax Orbax checkpoints, including fixes for Gemma and Gemma2.\r\n* Refactored gemma modelConfig to explicitly include all models.\r\n* Relaxed frozen configuration for models.\r\n### Performance & Efficiency:\r\n* Improved speed of safetensor loading.\r\n* Added per-Python-thread timeline and export of perf metrics to metrics_logger.\r\n* Rewrote the performance tracer with a new data model.\r\n* Enabled vLLM Data Parallelism on Tunix.\r\n### Architecture & Refactoring:\r\n* Moved agentic code out of the experimental folder.\r\n* Moved rollout related configs from cluster config to rollout_config.\r\n* Updated trajectory engine code.\r\n* Updated RolloutOrchestrator logic.\r\n* Implemented a concrete naming structure for parsing HuggingFace model IDs.\r\n* Updated model module to prevent AttributeError with pytree=false.\r\n### Usability:\r\n* Updated vanilla sampler to accept single strings.\r\n* Made put_exception in GRPO agentic learner asynchronous.\r\n* Enabled micro_batch_size for rollout and reference models in the PPO learner.\r\n* Added support for user-defined rollout engines.\r\n* Added Kaggle and GitHub buttons to Tunix example notebooks.\r\n* Improved HBM usage reporting in multi-process SPMD.\r\n### Internal:\r\n* Refactored TPU tests to run separately based on HF_TOKEN requirements.\r\n* Updated Tunix GitHub Actions to trigger on push to main.\r\n* Moved Docker files to the root directory.\r\n* Added backward compatibility for set_mesh.\r\n\r\n## Bug Fixes\r\n* Fixed broken CI due to vLLM.\r\n* Fixed vLLM driver tests.\r\n* Improved test collection to only include target tests.\r\n* Fixed a conditional issue in the Tunix Gemma implementation.\r\n* Fixed nnx.remat usage with bound methods.\r\n* Fixed the OSS GRPO training script.\r\n* Fixed Qwen2 mapping for SGLang\u002FJAX.\r\n* Fixed an incorrect loss type issue.\r\n* Fixed max_step initialization when profiling.\r\n* Fixed issues with multiple metrics loggers.\r\n* Reduced test flakiness.\r\n* Fixed broken links in README.md.\r\n* Corrected algo_config naming in GRPOLearner.\r\n* Fixed the get_logprobs_from_vllm_output utility function.\r\n* Fixed TypeError in example notebooks by updating mesh indexing (MESH[0] to len(MESH[0])).\r\n* Addressed a very weird bug. (Details pending)\r\n\r\n## Documentation\r\n* Fixed documentation build for ReadTheDocs.\r\n* Minor fix on grpo_demo description.\r\n* Added README for SGLang JAX.\r\n* Updated docstring usage for dataclasses.\r\n\r\n##  Internal & Tooling\r\n* Automated GitHub issue assignment to all engineers.\r\n* Converted notebook files (.ipynb) to Python scripts (_nb.py) and removed Jupyter cell markers.\r\n* Updated debug logging.\r\n* Pinned Qwix version to 0.1.1 (and later removed the pin).\r\n* Ensured latest dependencies are installed by forcing reinstall.\r\n* Temporarily disabled SGLang tests.\r\n* Removed gcsfs from pyproject.toml dependencies.\r\n\r\n\r\n## Detailed PRs\r\n* Fix the gemma2 loading from flax orbax checkpoint. [1\u002FN] Refactor model loading by @wang2yn84 in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F595\r\n* Fix gemma model. [2\u002FN] Ref","2025-11-20T05:13:15",{"id":158,"version":159,"summary_zh":160,"released_at":161},105069,"v0.1.3","A maintenance and feature release focused on TPU readiness, test hardening, and model additions. Highlights include a JAX upgrade, SFT\u002FCI improvements, new Qwen and Llama3 model variants, and multiple bugfixes across training and distillation tooling.\r\n\r\n### Highlights\r\n\r\n* Bumped JAX to 0.8.0 for improved compatibility and performance. Jax 0.7.2 has performance degradation on compilation and we are passing over this version.\r\n* Add vLLM TPU to the dev mode. \r\n* Qwen2.5 (including 1.5B) and Llama3 (70B & 405B) support added.\r\n\r\n## What's Changed\r\n* Bump up Tunix to v0.1.3 for dev by @wang2yn84 in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F551\r\n* more unittest by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F550\r\n* Move CLI utils test to CPU test. by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F532\r\n* Clean up vllm tests. by @wang2yn84 in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F556\r\n* fix qwen2.5 model by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F558\r\n* add qwen2.5 1.5b by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F559\r\n* make shell scripts executable by @sizhit2 in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F545\r\n* Refactor the weight mapping config by @wang2yn84 in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F562\r\n* [Tunix] Minor change to remove unnecessary type casting by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F565\r\n* Make sft smoke test executable and runnable in tpu workflow. by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F552\r\n* Fix broken distillation notebook by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F563\r\n* Modify DPO loss function by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F564\r\n* Async rollout code update by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F566\r\n* Exporting the CheckpointManager class by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F572\r\n* Fixes copy bara service, the replace rule doesn't work by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F575\r\n* Fix PeftTrainer and DPO bugs by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F580\r\n* add build test for \u002Fmodels. by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F577\r\n* Add test import check for all build target under \u002Frl, \u002Futils, \u002Ftests folder. by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F576\r\n* Bump up Jax version to 0.8.0 by @wang2yn84 in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F581\r\n* Fix metric logging for DPO by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F583\r\n* add llama3 70 & 405b by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F589\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fcompare\u002Fv0.1.2...v0.1.3","2025-10-20T17:43:50",{"id":163,"version":164,"summary_zh":165,"released_at":166},105070,"v0.1.2","This release of Tunix introduces support for new models, enhances core functionalities for more flexible and efficient workflows, and includes several important fixes.\r\n\r\n### Highlights\r\n\r\n* **Expanded Model Support:** We've added a configuration for `qwen-8b` and ported the Llama3 example to the Tunix CLI. Additionally, GRPO disaggregated `llama3.1-70b` is now supported through MaxText, including checkpoint saving.\r\n* **Enhanced Flexibility:** Users can now specify a different data type for the rollout model and take advantage of more flexible PyTree support in the checkpoint manager. This release also introduces flexible collect modes and tokenization support, along with support for multiple EOS tokens in the vanilla sampler.\r\n\r\n### Other Changes\r\n\r\n* Downgraded Jax version to 0.7.1 in prod mode due to performance regression, dev mode still supports Jax v0.7.2\r\n* Fixes to the front page `pip install` command and GRPO examples.\r\n* Improvements to the checkpoint manager and resharding library.\r\n* Added a backward compatibility test for Orbax checkpoint restoration.\r\n* Various code simplifications, refactoring, and documentation updates.\r\n\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fcompare\u002Fv0.1.1...v0.1.2\r\n\r\n## What's Changed\r\n* [Tunix] Allow specifying a different data type for the rollout model. by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F513\r\n* Fix the front page pip install command. by @wang2yn84 in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F515\r\n* Remove prompt_template.py by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F514\r\n* Tool code update by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F471\r\n* simplify micro batching config by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F516\r\n* Add explicit imports for specific TFDS datasets. by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F519\r\n* Adding a qwen-8b config by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F522\r\n* Environment code update by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F512\r\n* [Tunix] Update the checkpoint manager with more flexible PyTree. by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F337\r\n* Add BibTeX by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F528\r\n* Ensure github workflow failure block on presubmit by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F487\r\n* [Tunix] fix the grpo example which blocks copybara presubmit by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F531\r\n* [Tunix] Add backward compatibility test for Orbax checkpoint restoration. by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F530\r\n* [Tunix] Update reshard lib to respect logical axis rules. by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F518\r\n* support multiple eos tokens in vanilla sampler by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F525\r\n* Add sft smoke test. by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F533\r\n* Port Precur.AI llama3 example to Tunix CLI by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F520\r\n* Make GRPO disaggregated llama3.1 70b work with pathways including ckpt saving by @A9isha in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F527\r\n* Rename 'convert_messages_to_tokens_and_masks' to 'tokenize_and_generate_masks' by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F539\r\n* Change docker version to jax0.7.1_rev1 by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F544\r\n* Add flexible collect modes and tokenization support. by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F526\r\n* fix mtnt import by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F546\r\n* update function docstring for tokenize_and_generate_masks by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F547\r\n* Move grpo shell scripts. by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F543\r\n* minor simplification by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F541\r\n\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fcompare\u002Fv0.1.1...v0.1.2\r\n","2025-10-10T18:14:01",{"id":168,"version":169,"summary_zh":170,"released_at":171},105071,"v0.1.1","This release focuses on improving performance and stability across TPU and Kaggle environments, introducing new utilities for agentic RL workflows, and adding broader model and configuration support. It also includes several important bug fixes and developer experience improvements.\r\n\r\n**Run Tunix on Kaggle TPU**\r\n\r\nWe’re excited to announce that Tunix can now be launched directly in Kaggle notebooks with TPU acceleration — making it easier than ever to experiment, prototype, and run reinforcement learning workflows without complex setup.\r\n\r\n**Key highlights**\r\n\r\nFirst-class TPU support on Kaggle – run GRPO and other RL pipelines end-to-end in a Kaggle notebook.\r\n\r\nPre-configured runtime – no manual dependency juggling needed; version compatibility and performance tuning are handled automatically.\r\n\r\nLaunch the notebook here:\r\n[Knowledge Distillation Demo](https:\u002F\u002Fwww.kaggle.com\u002Fcode\u002Ftunixdevteam\u002Fknowledge-distillation)\r\n[QLoRA Demo](https:\u002F\u002Fwww.kaggle.com\u002Fcode\u002Ftunixdevteam\u002Fqlora-demo)\r\n[DPO Demo](https:\u002F\u002Fwww.kaggle.com\u002Fcode\u002Ftunixdevteam\u002Fdpo-demo-with-math)\r\n[GRPO Demo](https:\u002F\u002Fwww.kaggle.com\u002Fcode\u002Ftunixdevteam\u002Fgrpo-demo)\r\n\r\n**New Features & Improvements**\r\n\r\n- Model & Training Options\r\n\r\n> - Added support for Gemma-3-270M model configuration.\r\n> - Enabled setting default parameter dtype for Gemma-3 models.\r\n> - Added remat options to models to improve memory efficiency.\r\n> - Created a new list container type to support both Flax ≤0.11.2 and ≥0.12.0 versions.\r\n\r\n- Pathways & TPU Performance\r\n\r\n> - Introduced experimental pre-sharding (experimental_reshard) for Pathways on Cloud TPU.\r\n> - Improved weight synchronization logic to handle KV head duplication.\r\n> - Disabled certain profiler options by default to improve stability on Pathways backend.\r\n\r\n- Configuration & CLI Improvements\r\n\r\n> - Enabled generic creation of optax.optimizer and optax.learning_rate_schedule directly from CLI.\r\n> - Relaxed JAX version constraints to ensure compatibility with Kaggle images.\r\n> - Added minimum resource requirements for launch scripts in the README.\r\n\r\n- Documentation\r\n\r\n> - Added ReadTheDocs link in README.\r\n> - Expanded external notebooks with step-by-step guidance for long-running tasks.\r\n\r\n**Bug Fixes**\r\n\r\n- Fixed a bug in reward function logic causing incorrect training signals.\r\n- Fixed a checkpoint handling issue where Colab failed to locate the final checkpoint and now cleans up intermediate directories.\r\n- Fixed Kaggle image performance issues.\r\n- Fixed type errors in agents\u002F modules.\r\n- Optimized masked index lookups using jnp.where for better runtime efficiency.\r\n- Resharded prompt and completion tokens to the REFERENCE mesh when rollout and reference models are distributed.\r\n\r\n**Dependency & Version Updates**\r\n\r\n- JAX pinned to 0.7.1 and libtpu downgraded to resolve Cloud TPU performance regressions. \r\n- Relaxed JAX version requirement for Kaggle compatibility.\r\n\r\n\r\n**Full Changelog**:\r\n\r\n* Bump up the version to v0.1.0 by @wang2yn84 in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F446\r\n* Delete this notebook as it's redundant now. Prepare for the release. by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F445\r\n* Add min resources requirements for launch scripts to README by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F424\r\n* Enable generic creation of optax.optimizer, optax.learning_rate_schedule from cli by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F435\r\n* [Tunix] Reshard prompt and completion tokens to the `REFERENCE` mesh before computing reference log probabilities if needed. This is needed when rollout and reference are distributed. by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F451\r\n* Add Typed... types to ArrayLike. by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F461\r\n* Downgrad the Jax\u002Flibtpu version to resolve performance issue on Cloud TPU by @wang2yn84 in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F465\r\n* Pin Jax version to 0.7.1 by @wang2yn84 in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F468\r\n* add a comment for version pinning by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F469\r\n* update internal grpo notebook by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F463\r\n* Adds experimental pre-shard to Pathways on Cloud `experimental_reshard` by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F473\r\n* Relax the jax version requirement to get a working Kaggle image. by @wang2yn84 in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F474\r\n* add remat options to model by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F470\r\n* Create a new list container type to support both flax\u003C=0.11.2 and >=0.12.0. by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F476\r\n* Enable setting default param dtype for Gemma 3 model by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fpull\u002F482\r\n* new reward functions and unit tests by @copybara-service[bot] in https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002F","2025-10-08T01:58:18",{"id":173,"version":174,"summary_zh":175,"released_at":176},105072,"v0.1.0","We’re thrilled to announce Tunix v0.1.0, the first public release of Google’s lightweight, JAX-native library for post-training large language models (LLMs) using both reinforcement learning (RL) and supervised fine-tuning (SFT). Tunix is built for researchers and production teams who want maximum control and scalability when aligning and improving foundation models — from data loading to distributed rollout and training on TPUs.\r\n\r\nHighlights of v0.1.0\r\n\r\nSFT (Supervised Fine-Tuning): Seamlessly train your LLMs with labeled datasets to bootstrap alignment before RL or as a standalone approach.\r\n\r\nHigh-efficiency Reinforced Learning (RL) policies such as GRPO, GSPO, PPO, DPO, etc. designed for instruction-tuning and reward-based LLM alignment.\r\n\r\nEnd-to-End RL Pipeline: From reward function definition to rollout and policy optimization, everything is fully integrated and composable.\r\n\r\nMulti-Model Support: Works out of the box with leading open-weight models, including Gemma 2\u002F3, LLaMA 3, and Qwen 2\u002F3 — and can be extended to other Hugging Face models with minimal effort.\r\n\r\nSeamless TPU \u002F CPU Execution: Tunix is built on top of JAX and Flax with first-class support for multi-device and multi-host environments.\r\n\r\nDataset Flexibility: Use tensorflow datasets, Kaggle datasets, or custom Grain datasets with minimal changes.\r\n\r\nModular Design: Clean abstractions for samplers, reward functions, trainers, and optimizers — making it easy to extend or plug into your own workflows.\r\n\r\nGet Started\r\n\r\nInstall Tunix from PyPI:\r\n```\r\npip install google-tunix[prod]\r\n```\r\n\r\nWe recommend starting with the [GRPO demo notebook](https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ftunix\u002Fblob\u002Fmain\u002Fexamples\u002Fgrpo_demo.ipynb)\r\n to see how reinforcement learning can be applied to real LLM training.","2025-09-30T15:42:09",{"id":178,"version":179,"summary_zh":180,"released_at":181},105073,"v0.1.0.dev1","This is the first development release of Tunix, Google’s reinforcement learning library for language model post-training.\r\n\r\nNote: This is a pre-release (.dev1) version meant for testing and feedback.\r\n\r\nAPIs and behavior may change before the official 0.1.0 stable release.\r\n\r\nUse this build to validate early integrations, experiment with new features, and provide feedback.\r\n\r\n Install this dev release:\r\n```sh\r\npip install --pre google-tunix[prod]==0.1.0.dev1\r\n```","2025-09-30T07:03:52",{"id":183,"version":184,"summary_zh":185,"released_at":186},105074,"v0.1.0.dev0","This is the first development release of Tunix, Google’s reinforcement learning library for language model post-training.\r\n\r\nNote: This is a pre-release (.dev0) version meant for testing and feedback.\r\n\r\nAPIs and behavior may change before the official 0.1.0 stable release.\r\n\r\nUse this build to validate early integrations, experiment with new features, and provide feedback.\r\n\r\n Install this dev release:\r\n```sh\r\npip install --pre google-tunix==0.1.0.dev0\r\n```","2025-09-30T04:45:03"]