# Google 發布 Tunix 更新版本推出非同步引擎

> 📖 本站完整內容索引（documentation index）：[llms.txt](/llms.txt)

> 原作者：Google for Developers (@googledevs) · 策展與摘要：EasyVibeCoding · 平台：X (Twitter) · 熱度：🔥 · 日期：2026-07-22

> 原始來源：https://x.com/googledevs/status/2079612377952125140

## 中文摘要

Google 發布 Tunix 更新版本推出非同步引擎。

![](https://pub-75d4fe1e4e80421b9ecb1245a7ae0d1a.r2.dev/curated/d25951204e019fb9.jpg)
> 這張插圖以「AGENTIC RL」為標題，中央為配戴耳機與螢幕上顯示「tunix」字樣的機器人，周圍環繞著象徵教育、醫療、遊戲、財務及運算等多元應用領域的圖示。

**核心更新**：
Google for Developers 於 2026 年 7 月 22 日宣布發布 Tunix 的重大更新，專門用於擴展 AI Agent 的強化學習（Agentic RL）。隨著大型語言模型從靜態對話轉向動態的 agentic 工作流程，訓練推理型 Agent 常面臨硬體閒置與多輪決策的效能瓶頸。Tunix 的最新版本透過原生架構解決了這些問題，讓開發者能在 JAX 與 TPU 環境中高效訓練大型語言模型 Agent。

![](https://pub-75d4fe1e4e80421b9ecb1245a7ae0d1a.r2.dev/curated/0dd203453faa0c92.png)
> Tunix 推出的非同步 Rollout（Asynchronous Rollouts）機制透過將 TPU 計算與環境及初始化延遲完全解耦，消除同步 Rollout 中 TPU 的空閒與等待時間，顯著提升 Agentic RL 的整體 Rollout 吞吐量。

**關鍵架構與效能優化**：
- **Asynchronous Rollouts**：透過高並行 rollout 引擎，將 TPU 執行與主機端（host-side）的環境延遲（如網路 I/O 或工具執行）完全解耦。
- **Barrier-Free Pipelining**：採用動態的生產者-消費者架構，持續將變長軌跡分批串流至訓練器，防止管線停滯。
- **RL-Specific Lightweight Profiling**：內建微秒級的輕量化 instrumentation，將領域專屬的 RL 指標與 TPU 時間軸進行關聯，協助開發者快速找出系統瓶頸。

![](https://pub-75d4fe1e4e80421b9ecb1245a7ae0d1a.r2.dev/curated/0a79390b6132f7ec.png)
> 這張系統架構圖展示了非同步軌跡收集（Async Trajectory Collection）與消費者/生產者（Consumer/Producer）架構，涵蓋 Rollout Orchestrator、Trajectory Collector、Post Process、Ref Inference 以及 Trainer 的資料流與處理流程。

**模組化抽象與生態比較**：
- Tunix 提供開箱即用的 `TaskEnvironment` 與 `ToolEnvironment` 類別，並允許使用者透過繼承 `BaseTaskEnv` 來介接任意外部系統，大幅降低導入如 SWE-bench 等開源基準的門檻。
- 與現有生態相比，Tunix 原生針對 JAX/TPU 生態系打造，彌補了 PyTorch 為主的框架（如 OpenRLHF 與 veRL）及傳統單輪 SFT/RLHF 工具（如 Hugging Face TRL）在多輪非同步循環上的不足。

![](https://pub-75d4fe1e4e80421b9ecb1245a7ae0d1a.r2.dev/curated/21ab467d13044dc3.png)
> Tunix 透過非同步解耦 Rollout 引擎，重疊環境互動與 TPU 執行，有效彌補 Agentic RL 訓練中的加速器閒置時間。

開發者可透過 [Tunix 官方 GitHub 專頁](https://github.com/google/tunix)查看程式碼、參閱 [Tunix 文件網頁](https://tunix.readthedocs.io)深入了解 Agentic RL 架構，或前往專案的 `/examples` 資料夾開始執行第一項訓練作業。


## 媒體內容

**Tunix 推出的非同步 Rollout（Asynchronous Rollouts）機制透過將 TPU 計算與環境及初始化延遲完全解耦，消除同步 Rollout 中 TPU 的空閒與等待時間，顯著提升 Agentic RL 的整體 Rollout 吞吐量。**

**數據表（1）Synchronous Rollouts**

| 項目 | 數值 |
| --- | --- |
| 流程 | Init (0, 1) → LLM Generation (batch: 0, 1) → Env (0, 1) → LLM Generation (batch: 0, 1) → Init (2, 3) → LLM Generation (batch: 2, 3) → ... → Advantage Calculation |
| 問題標註1 | TPUs sitting idle during env/init |
| 問題標註2 | Stragglers causing idleness in TPU |

**數據表（2）Asynchronous Rollouts**

| 項目 | 數值 |
| --- | --- |
| 流程 | 流水線交錯執行 (Init 0..3, LLM 0..2, Env 0..2, Reward 1..2) → ... → Advantage Calculation |
| 優勢標註1 | Each stage independently starting asap w/o gap (init → LLM → env → ...) |
| 優勢標註2 | Overlapping TPU computation with env/init of others |
| 優勢標註3 | Higher overall rollout throughput |

**Tunix 透過非同步解耦 Rollout 引擎，重疊環境互動與 TPU 執行，有效彌補 Agentic RL 訓練中的加速器閒置時間。**

**數據表**

| 項目 | 數值 |
| --- | --- |
| Global Track Events | Actor cluster - (Execution) 涵蓋 idle 與執行區段 · Rollout cluster - (Execution) rollout (step=2)、rollout (step=3)、rollout (step=4) |
| 標註1=most idle time covered within a step by overlapping async rollouts, only small gaps remain, caused by unlikely overlapping of *all* environment interactions |  |
| 標註2=some idle time at end of each step (full batch) with on-policy & weight sync |  |
| Host & TPU Track Events | Actor Cluster (tpu4) 間歇性 TPU 執行與同步 · Host - Main threads (Environment) 多線程環境交互與 rollout 步驟 · Rollout Cluster (tpu0) 高密度並行 rollout 執行區段 |
| 時間範圍 | Start 0 s · Duration 2182.68 s |

## 標籤

功能更新, Agent, 框架更新, Google
