betaFeedback

WorksComputer Science

ThunderSync: Lossless Acceleration of Agentic Reinforcement Learning

Abstract

Language models are moving beyond generating answers to pursuing long-horizon goals in interactive environments. Post-training these agents requires long, heterogeneous trajectories, and synchronous systems leave learner engines idle until rollout and verification finish. To squeeze out these pipeline bubbles, asynchronous training overlaps rollout and learning across updates, but comes at the cost of policy staleness. We introduce ThunderSync, which starts gradient computation as soon as all required inputs are fixed, without policy staleness. For group relative policy optimization (GRPO), ThunderSync computes each trajectory's score gradient as soon as the reward for that trajectory arrives, without waiting for the group. For on-policy distillation (OPD), it computes gradients for each completed agentic turn's teacher-scored actions while tool calls run in the sandbox. We prove that gradient streaming produces the same GRPO and OPD updates as batch-synchronous training, without changing either objective. On SWE-bench Verified and Terminal Bench 4.0, we train models to the same performance up to 1.9×1.9 \times faster than synchronous training. With zero policy staleness, ThunderSync also outperforms asynchronous training at a fixed budget by up to 2.472.47 percentage points.

A Blog post § GitHub

Introduction

Language models are increasingly trained as agents for long-horizon decision-making in interactive environments, reasoning and using tools in response to feedback. Reinforcement learning (RL) from environment or verifier feedback has emerged as a promising way to improve this behavior [22, 11, 30 WDC+25, 14]. However, training these agents requires interaction trajectories that are expensive to generate and heterogeneous in duration, with long-tailed completion times [17, 7, 36]. In batch-synchronous RL, learner engines remain idle until rollout engines finish the batch and all rewards arrive [10, 36]. We found that learner GPUs sit idle for 49.5% of step time in synchronous GRPO and OPD training while they wait for rollout and verification (Figure 3). Prior work reports idle fractions as high as 81% [36], and the slowest 10% of rollout requests can take up to half of rollout time [32], which itself accounts for 70% to over 90% of training time [13, 53].

Pipeline bubbles in synchronous agentic RL

Figure 3. Pipeline bubbles in synchronous agentic RL. GPU utilization during GRPO training on SWE-smith, with four rollout GPUs above the axis and four learner GPUs below. Rollout utilization (busy share of generation slots) drops as long-tail trajectories finish. Hatched bands mark idle time. • Sync learners wait for the last reward for 49.5% of each step, and rollout GPUs wait while the learner trains. • ThunderSync starts each trajectory’s backward pass when its reward arrives and completes 15 optimizer steps in the GPU-hours Sync needs for 8.

Existing systems reduce these pipeline bubbles, idle gaps between dependent stages, by overlapping computation and coordinating resource allocation [26, 41 ZZW+25, 10, 19]. Asynchronous execution overlaps rollout and learning across updates, but some trajectories come from older policies. This policy staleness can require extra algorithmic machinery, including importance-weighted off-policy correction, filtering, clipping, or explicit staleness control [9, 10, 19, 16]. On-policy pipelines overlap execution within a fixed rollout, but complete-group schedules still delay trajectory-local backward passes until all group rewards arrive [4].

We argue that the apparent trade-off between pipeline overlap and zero staleness is artifactual, arising from coarse execution barriers. Although a synchronous update requires the complete batch, its gradient computation can begin earlier. For example, in group relative policy optimization (GRPO) [40], group rewards determine how to weight each trajectory’s score gradient, but the gradient can be computed before all rewards arrive. We therefore ask: can learner computation begin as soon as its objective dependencies are satisfied with zero staleness?

We introduce ThunderSync, which streams gradients through dependency-aware scheduling of learner work. During update kk, trajectories are sampled from πθk\pi_{\theta_k} and gradients are evaluated at θk\theta_k. For GRPO, a trajectory’s advantage seems to need every reward in its group. ThunderSync nevertheless starts that trajectory’s backward pass as soon as its own reward arrives, and two running sums of score gradients recover the exact group gradient once the group closes (§ 3.4). For on-policy distillation (OPD) [1], ThunderSync releases a turn’s student backward pass from a frozen teacher scores the turn’s action tokens, allowing overlap with tool execution and later turns. After all trajectories, groups, and gradient work finish, ThunderSync combines the gradients, takes one optimizer step, and publishes θk+1\theta_{k+1}. ThunderSync is therefore asynchronous in execution and synchronous in policy updates.

We use SWE-smith and SETA-For for post-training [50, 37] and evaluate on SWE-bench Verified and Terminal Bench 4.0 [YYW+24; MSC+26]. Our scheduling analysis predicts step wall time speedup approaching 2×2\times over synchronous execution when rollout and learner work are balanced and the residual tail and publication cost vanish. With a fixed trajectory batch size, shorter steps let ThunderSync learn from more trajectories within the same GPU-hours, potentially improving end-to-end performance. Figure 1 compares ThunderSync with Sync by training cost: each arrow marks where ThunderSync reaches the pass@3 of a Sync checkpoint, at 1.6 to 1.9× lower cost.

Figure 1. ThunderSync matches Sync’s SWE-bench Verified pass@3 at up to 1.9× lower training cost under GRPO (left pair) and OPD (right pair). At a 128-GPU-hour budget, its zero-staleness schedule improves pass@3 by up to 2.47 percentage points over Async and Fully Async, both of which admit stale rollouts.

Our main contributions are as follows:

  • We introduce ThunderSync and gradient streaming, overlapping rollout and learner computation while preserving a synchronous optimizer step and zero policy staleness.

  • We derive exact gradient reductions for GRPO and turn-level OPD, allowing early backward computation while preserving their batch-synchronous updates.

  • We evaluate ThunderSync on SWE-bench Verified and Terminal Bench 4.0 under GRPO and OPD. ThunderSync reaches the common pass@3 targets up to 1.9× faster than Sync while retaining zero policy staleness. At 128 GPU-hours, ThunderSync achieves the highest pass@3 in all settings, 1.27 to 2.47 points above Async.

Related Work

Post-training with Reinforcement Learning Towards Agentic Tasks

RL post-training extends single-turn generation to agents that learn through long-horizon interaction with external environments. ArCHer develops hierarchical multi-turn RL, while DigiRL combines offline and online RL for mobile-device control [ZZP+24; BZC+24]. Web and search agents learn through self-evolving curricula, browser interaction, and outcome rewards [33, 47, 22, 39, 5, 52]. Tool-use research studies strategic interpreter use, fine-grained rewards, planning supervision, and dynamic user interaction [11, 31, 24 ZWM+25]. Further work addresses trajectory-level optimization failures, multi-step supervision, and procedural or capability-targeted training environments [46, 12, 8, 38, 23]. Software agents learn from executable environments, software-evolution data, and execution feedback [30 WDC+25, 14]. Agent Lightning and VerlTool provide reusable infrastructure across heterogeneous agent workflows [25, 20].

Optimization of Reinforcement Learning

Distributed RLHF systems coordinate generation, reference and reward inference, and actor and critic training, using model placement, device reallocation, and stage fusion to reduce idle time [49, 18, 26, 41 ZZW+25]. Building on actor-learner decoupling in distributed RL [9 PHK+20], LlamaRL, AReaL, AsyncFlow, and StreamRL support disaggregated generation and training, streaming execution, asynchronous weight synchronization, and control of policy staleness [45, 10, 19 ZZS+25]. For heterogeneous agentic rollouts, PipelineRL and RolloutPipe pipeline rollout and learner execution [29, 4]. JigsawRL, Libra, TideRL, and WAR address fine-grained scheduling, elastic resource allocation, long tails, and inference caching [17, 7, 36, 48]. SAO performs asynchronous optimization from individually completed rollouts [16]. ThunderSync schedules learner computation as each objective source becomes ready, overlapping it with unfinished rollouts while preserving a fixed policy snapshot and a single synchronous optimizer step. The agent, reward, and optimization objective remain unchanged.

Methods

We present ThunderSync, a gradient streaming framework for zero-stale agentic post-training (Figure 2). ThunderSync releases learner computation when each source becomes ready. Exact gradient reduction and a synchronous optimizer barrier preserve the update semantics of GRPO and on-policy distillation (OPD) while allowing rollout and learning to overlap.

Figure 2. Schematic schedules for GRPO (a) and OPD (b). • Sync waits for full batches; • Async overlaps adjacent batches with one-step staleness; • Fully Async updates rollout weights while trajectories remain in flight. • ThunderSync streams ready gradients with one batch-synchronous optimizer step and zero staleness.

Background

Group relative policy optimization (GRPO). Given a prompt, GRPO samples a group of trajectories and normalizes their rewards within the group to obtain relative advantages. The policy update weights each trajectory’s scored action-token log probabilities by its detached advantage.

On-policy distillation (OPD). OPD generates trajectories with the student policy and evaluates the student’s action tokens under a frozen teacher. The resulting token-level supervision defines a distillation loss for the action tokens of each agentic turn.

Actor-learner execution protocols. Agentic reinforcement learning alternates between two expensive stages: generating long, tool-using trajectories and optimizing the policy from the resulting training signals. Conventional synchronous training places a batch barrier between these stages, leaving the learner idle until every trajectory and reward is available (Figure 3). Fully asynchronous methods remove this idle time, but typically update the policy while older rollouts remain in flight, introducing policy staleness. ThunderSync follows a single principle: each computation is released at the earliest time when its mathematical dependencies are satisfied.

Problem Formulation

Objective sources. Consider update kk with policy πθk\pi_{\theta_k} and logical rollout batch Bk\mathcal{B}_k. Each trajectory is a sequence of agentic turns, where a turn contains a policy-generated action and the resulting environment or tool observation. We call an independently releasable unit of learner computation an objective source. Source jj is ready at time τj\tau_j once all its inputs are fixed.

Release semantics. The ready unit depends on the training objective. For a GRPO group GG of mm trajectories, source ii is associated with trajectory ii and becomes ready when its token sequence, scored-token mask, and reward rir_i are fixed. The group statistics remain unavailable until all mm rewards arrive. In OPD, the scored action tokens of each turn form a source. Once these tokens and their mask are fixed, the frozen teacher can score them using their realized causal context. The teacher scores release the corresponding student backward pass, which can overlap with tool execution and subsequent turns.

Scheduling objective. Our problem is to release each source at its earliest objective-valid time while preserving the corresponding batch-synchronous update. All trajectories in update kk are sampled from πθk\pi_{\theta_k}, and all gradients are evaluated at the fixed parameters θk\theta_k. After the logical batch closes and all gradient work finishes, the optimizer takes one step to produce θk+1\theta_{k+1}. The logical batch and objective remain unchanged; only the timing of eligible learner work differs.

ThunderSync Framework

Release rule. ThunderSync releases each source’s learner computation at its ready time τj\tau_j, which can precede the completion of its group or of the batch; gradients accumulate at θk\theta_k.

Readiness-driven scheduling. Ready sources enter a work-conserving queue in readiness order; admission never waits for a smaller trajectory index, or for an unrelated group below a per-rank cap (Appendix § 9). Independent groups may be reduced concurrently, while each group preserves a deterministic reduction order. We include deferred gradient propagation at trajectory or group closure as learner work with its own release time. Index learner work items in service order; let τj\tau_j and pjp_j denote the release time and service time of item jj. On a single learner lane with c0=0c_0 = 0, completion time satisfies

cj=max⁡{τj,cj−1}+pj.(1)c_j = \max\{\tau_j, c_{j-1}\} + p_j. \tag*{(1)}

For nn learner work items, let RkR_k be the time at which the complete rollout batch closes and PkP_k the common final reduction, optimizer, and publication suffix. The update endpoint is

Tk=max⁡{Rk,cn}+Pk.(2)T_k = \max\{R_k, c_n\} + P_k. \tag*{(2)}

A batch-synchronous method postpones all learner work until RkR_k. For GRPO, a group-ready pipeline releases all sources in a group at its final reward. ThunderSync uses each source’s ready time for either objective, moving eligible learner work into rollout intervals and reducing the learner tail after the final trajectory.

Zero-stale optimizer barrier. ThunderSync waits for every registered trajectory and group to close and for all deferred gradient propagation to finish. Distributed reduction and objective-specific normalization then produce the batch update direction gkg_k (§ 3.4). ThunderSync clips this direction and applies exactly one optimizer step,

θk+1=Opt⁡(θk,clip⁡(gk)).(3)\theta_{k+1} = \operatorname{Opt}\left(\theta_k,\operatorname{clip}(g_k)\right). \tag*{(3)}

ThunderSync publishes the resulting adapter or policy parameters to the rollout replicas. Each replica loads the new version, clears policy-dependent state, and acknowledges that it serves θk+1\theta_{k+1} before the next update begins. Every rollout and learner source within update kk is therefore bound to θk\theta_k, and no trajectory is optimized against a policy that changed while it was in flight. Appendix § 14 gives the full algorithm and the GRPO and OPD implementations.

Objective-Specific Gradient Streaming

Streaming the GRPO gradient. The main obstacle to streaming the GRPO gradient is that the advantage of one trajectory depends on the rewards of its entire group. Let G\mathcal{G} be a group of mm trajectories. For trajectory i∈Gi \in\mathcal{G}, define its masked policy score and corresponding source gradient as

Si(θ)=∑t∈Miwi,tlog⁡πθ(ai,t∣hi,t),Hi=∇θSi(θ)∣θ=θk,(4)S_i(\theta) = \sum_{t \in\mathcal{M}_i} w_{i,t} \log\pi_\theta(a_{i,t} \mid h_{i,t}), \qquad H_i = \left.\nabla_\theta S_i(\theta)\right|_{\theta=\theta_k}, \tag*{(4)}

where Mi\mathcal{M}_i is the scored action-token set, wi,tw_{i,t} the token weighting, and rir_i the trajectory reward. We set w(i,t)=1/(∣Bk∣Li)w(i,t) = 1 / (|\mathcal{B}_k|L_i), where LiL_i is the scored-token count of trajectory ii and ∣Bk∣|\mathcal{B}_k| is the number of groups in the batch (32 in our experiments), following the GRPO reduction [40] The reductions differ because the signal is per trajectory in GRPO and per token in OPD: each trajectory carries one reward, each token carries one teacher score [1]. Let

μG=1m∑i∈Gri,σG=1m∑i∈G(ri−μG)2.(5)\mu_{\mathcal{G}} = \frac{1}{m}\sum_{i \in\mathcal{G}} r_i, \qquad\sigma_{\mathcal{G}} = \sqrt{\frac{1}{m}\sum_{i \in\mathcal{G}}(r_i-\mu_{\mathcal{G}})^2}. \tag*{(5)}

With the group-normalized advantages held constant during differentiation, the group update direction is

gG=1m∑i∈Gri−μGσG+ϵHi.(6)g_{\mathcal{G}} = \frac{1}{m}\sum_{i \in\mathcal{G}}\frac{r_i-\mu_{\mathcal{G}}}{\sigma_{\mathcal{G}}+\epsilon}H_i. \tag*{(6)}

Although μG\mu_{\mathcal{G}} and σG\sigma_{\mathcal{G}} require group completion, the gradient decomposes exactly as

gG=1mGG(1)−μGGG(2)σG+ϵ,GG(1)=∑i∈GriHi,GG(2)=∑i∈GHi.(7)g_{\mathcal{G}} = \frac{1}{m}\frac{G_{\mathcal{G}}^{(1)}-\mu_{\mathcal{G}}G_{\mathcal{G}}^{(2)}}{\sigma_{\mathcal{G}}+\epsilon}, \qquad G_{\mathcal{G}}^{(1)} = \sum_{i \in\mathcal{G}}r_iH_i, \qquad G_{\mathcal{G}}^{(2)} = \sum_{i \in\mathcal{G}}H_i. \tag*{(7)}

ThunderSync computes HiH_i as soon as trajectory ii becomes ready and incrementally accumulates GG(1)G_{\mathcal{G}}^{(1)} and GG(2)G_{\mathcal{G}}^{(2)}. When all rewards and source gradients in the group are available, the scalar-weighted combination in Equation (7) gives gGg_{\mathcal{G}}. Summing the group directions gives gk=∑G⊂BkgGg_k = \sum_{\mathcal{G}\subset\mathcal{B}_k}g_{\mathcal{G}} for the optimizer barrier. This preserves the batch-barrier update while allowing trajectory backward passes to begin before group completion.

Streaming the OPD gradient. In OPD, each turn provides a gradient source once the frozen teacher has scored its action tokens. Let Uk\mathcal{U}_k be the set of turns in Bk\mathcal{B}_k, and let Mj\mathcal{M}_j contain the scored action tokens of turn jj. We normalize the OPD update by the total number of scored tokens in the batch. Define the detached token advantage and the turn’s unnormalized update direction as

Aj,t=sg⁡[log⁡πT(aj,t∣hj,t)−log⁡πθk(aj,t∣hj,t)],A_{j,t} = \operatorname{sg}\left[\log\pi_T(a_{j,t}\mid h_{j,t})-\log\pi_{\theta_k}(a_{j,t}\mid h_{j,t})\right],
gj=∑t∈MjAj,t∇θlog⁡πθ(aj,t∣hj,t)∣θ=θk,(8)g_j = \left.\sum_{t \in\mathcal{M}_j} A_{j,t}\nabla_\theta\log\pi_\theta(a_{j,t}\mid h_{j,t})\right|_{\theta=\theta_k}, \tag*{(8)}

where πT\pi_T is the frozen teacher and sg⁡\operatorname{sg} denotes stop-gradient. Each advantage depends only on the sampled token, its realized causal context, and the fixed student and teacher policies. ThunderSync releases the turn-local backward pass as soon as the teacher scores are available, allowing learner computation to overlap with tool execution and subsequent turns. It accumulates unnormalized gradient contributions and completes any deferred gradient propagation through earlier context before final reduction. The batch update direction is

gk=1Nk∑j∈Ukgj,Nk=∑j∈Uk∣Mj∣.(9)g_k = \frac{1}{N_k}\sum_{j \in\mathcal{U}_k}g_j, \qquad N_k = \sum_{j \in\mathcal{U}_k}|\mathcal{M}_j|. \tag*{(9)}

The total scored-token count NkN_k is fixed only when the logical batch closes, so ThunderSync defers this scalar normalization while turn-level backward passes proceed. Dividing the accumulated gradient by NkN_k before clipping and the single optimizer step gives the same mathematical update as batch-synchronous OPD, with every rollout and learner computation bound to θk\theta_k. Appendix § 12 confirms both equivalences numerically on B200 and H200 GPUs.

Experiments

Setup

Models, datasets and benchmarks.

  • Models: We use Qwen-3.8-27B [34, 35] for full fine-tuning and the separate LoRA configuration (Appendix § 13.§ 2). The model comparison also includes GLM-4.7-Flash-31B [51, 15]. Appendix § 9 specifies the Qwen OPD teacher, which remains fixed across execution schedules.

  • Datasets: We use SWE-smith [50] and SETA-Env [37] for post-training, covering repository-level software engineering and broader terminal tasks, respectively. Appendix § 8 details data revisions, filtering, splits, and benchmark separation.

  • Benchmarks: We evaluate on SWE-bench Verified [21] and Terminal Bench 4.0 [MSC+26], using the same tasks, agent interface, and inference budget across execution schedules. Terminal Bench 4.0 tasks are excluded from post-training. Appendix § 10 specifies success criteria, pass@3 aggregation, and checkpoint comparisons. We also report pass@1 and pass@5 on both benchmarks in Appendix § 13.§ 1.

Workloads and configurations. Each GRPO update uses 32 prompts with eight trajectories sampled per prompt, totaling 256 trajectories. Each OPD update uses 32 prompts with four independent trajectories sampled per prompt, totaling 128 trajectories. Both objectives allow up to 300 agentic turns and 1,024 generated tokens per turn. The reference configuration uses a single node with eight NVIDIA B200 GPUs; the hardware comparison also includes a node with eight NVIDIA H200 GPUs. Appendix § 9 provides the full optimization and generation settings.

Baselines. Within each objective, we hold the model, workload, optimizer, precision, and hardware allocation fixed and compare ThunderSync against three execution schedules:

  • Sync: A zero-stale baseline that starts learning after the complete rollout batch is available.

  • Async: A one-update-stale baseline that overlaps learning with the next rollout batch.

  • Fully Async: Rollout and learning proceed without a batch-level barrier between them. Policy updates can occur during in-flight trajectories, yielding variable policy lag.

Sync and Async use the official verL [41] pipeline for GRPO and the SkyRL [3] pipeline for OPD. Sync, Async, and ThunderSync use vLLM for rollout, with the same chunked prefill and prefix caching settings. We evaluate with the benchmarks’ official harnesses; Appendices § 9.§ 2 and § 10 describe the rollout pipelines and harnesses.

Learning efficiency and agent performance

Time to matched performance. ThunderSync reaches the target pass@3 on SWE-bench Verified 1.9× faster than Sync under both GRPO and OPD (Figure 5, left). For example, the GRPO target of 74.01% is first reached at 121.3 GPU-hours with ThunderSync and 233.5 GPU-hours with Sync. The advantage also holds when training on SETA-Env and evaluating on Terminal Bench 4.0, whose tasks are excluded from post-training: ThunderSync reaches the targets 1.8× faster under GRPO and 1.9× faster under OPD (Figure 5, left; curves in Figure 6).

Figure 5. Left: time to matched pass@3. Right: Async and Fully Async relative to ThunderSync at 128 GPU-hours.

Figure 6. Terminal Bench 4.0 pass@3 vs. training cost and mean training reward vs. GPU-hours. Arrows mark where ThunderSync reaches the score of a Sync checkpoint; labels give the cost ratio.

Performance at a fixed training budget. At the same 128-GPU-hour training budget (16 hours on the eight-GPU node), ThunderSync achieves higher pass@3 than Async on both benchmarks (Figure 5, right). On SWE-bench Verified, ThunderSync leads by 2.47 percentage points under GRPO and 1.27 under OPD. On Terminal Bench 4.0, it leads by 1.52 percentage points under GRPO and 2.02 under OPD. Each score comes from the latest completed checkpoint available within the budget; Appendix § 10 details the evaluation protocol.

Step wall time. ThunderSync overlaps learner work with rollout (Figure 4, left). After 650.0 s (GRPO) and 658.5 s (OPD) of rollout and verification, Sync adds 464.4 and 656.2 s of learner work, ThunderSync only 20.5 and 11.6 s. With publication, its steps take 687.7 and 685.7 s, 1.91× and 1.94× faster than Sync and within Async’s seed spread, at zero policy lag. Over a run, shorter steps fit more trajectory batches into the same GPU-hours, which is why ThunderSync reaches each pass@3 level at lower training cost (Figure 1 and Figure 6).

Figure 4. Step wall time (left) and trainer active MFU (right) for GRPO and OPD.

Efficiency across models and hardware

The speedup follows how the stages balance on each model and GPU (§ 4.4). On B200, Qwen-3.8-27B is near balance and reaches 1.91×1.91\times and 1.94×1.94\times over Sync under GRPO and OPD. GLM-4.7-Flash-31B activates about 3B parameters, so its learner work is short, rollout bounds the step, and the speedup is 1.64×1.64\times and 1.63×1.63\times (Table 1). On H200, the same Qwen workload becomes learner-bound and reaches 1.63×1.63\times and 1.67×1.67\times (Table 2). Each comparison fixes the workload and GPU allocation across schedules, using Sync on the same hardware as the baseline.

MethodPolicy lag (staleness) ↓GRPO Avg. trainer active MFU (%) ↑GRPO Speedup (×) ↑GRPO Trainer peak GPU memory (GB) ↓OPD Avg. trainer active MFU (%) ↑OPD Speedup (×) ↑OPD Trainer peak GPU memory (GB) ↓
Qwen-3.8-27B
Sync024.0±0.324.0 \pm0.31.00±0.001.00 \pm0.00117.0±0.8117.0 \pm0.823.4±0.423.4 \pm0.41.00±0.001.00 \pm0.00118.0±0.9118.0 \pm0.9
Async145.4±0.245.4 \pm0.21.89±0.031.89 \pm0.03117.2±1.1117.2 \pm1.144.8±0.544.8 \pm0.51.92±0.041.92 \pm0.04119.3±1.0119.3 \pm1.0
Fully AsyncVariable45.7±0.245.7 \pm0.21.90±0.031.90 \pm0.03118.6±1.2118.6 \pm1.245.1±0.345.1 \pm0.31.93±0.041.93 \pm0.04120.1±1.1120.1 \pm1.1
ThunderSync045.9±0.145.9 \pm0.11.91±0.041.91 \pm0.04122.8±1.3122.8 \pm1.345.3±0.245.3 \pm0.21.94±0.031.94 \pm0.03121.3±1.2121.3 \pm1.2
GLM-4.7-Flash-31B
Sync012.2±0.112.2 \pm0.11.00±0.001.00 \pm0.00124.0±1.0124.0 \pm1.011.5±0.111.5 \pm0.11.00±0.001.00 \pm0.00122.1±0.8122.1 \pm0.8
Async119.8±0.219.8 \pm0.21.62±0.031.62 \pm0.03124.0±1.4124.0 \pm1.418.4±0.218.4 \pm0.21.60±0.031.60 \pm0.03122.5±1.3122.5 \pm1.3
Fully AsyncVariable19.9±0.319.9 \pm0.31.63±0.041.63 \pm0.04125.2±1.3125.2 \pm1.318.5±0.218.5 \pm0.21.61±0.031.61 \pm0.03123.4±1.2123.4 \pm1.2
ThunderSync020.0±0.220.0 \pm0.21.64±0.031.64 \pm0.03129.4±1.9129.4 \pm1.918.7±0.118.7 \pm0.11.63±0.021.63 \pm0.02124.1±1.5124.1 \pm1.5

Table 1. Full fine-tuning efficiency on SWE-smith across models using NVIDIA B200 GPUs. GRPO and OPD are compared separately per configuration; for OPD, the model is the student.

MethodPolicy lag (staleness) ↓GRPO Avg. trainer active MFU (%) ↑GRPO Speedup (×) ↑GRPO Trainer peak GPU memory (GB) ↓OPD Avg. trainer active MFU (%) ↑OPD Speedup (×) ↑OPD Trainer peak GPU memory (GB) ↓
NVIDIA B200 × 8
• Sync024.0 ± 0.31.00 ± 0.00117.0 ± 0.823.4 ± 0.41.00 ± 0.00118.0 ± 0.9
• Async145.4 ± 0.21.89 ± 0.03117.2 ± 1.144.8 ± 0.51.92 ± 0.04119.3 ± 1.0
• Fully AsyncVariable45.7 ± 0.21.90 ± 0.03118.6 ± 1.245.1 ± 0.31.93 ± 0.04120.1 ± 1.1
• ThunderSync045.9 ± 0.11.91 ± 0.04122.8 ± 1.345.3 ± 0.21.94 ± 0.03121.3 ± 1.2
NVIDIA H200 × 8
• Sync031.3 ± 0.41.00 ± 0.00117.1 ± 0.929.8 ± 0.41.00 ± 0.00118.5 ± 1.0
• Async150.4 ± 0.51.61 ± 0.04117.5 ± 1.249.2 ± 0.41.65 ± 0.03118.2 ± 1.1
• Fully AsyncVariable50.7 ± 0.41.62 ± 0.03118.9 ± 1.349.5 ± 0.51.66 ± 0.04119.0 ± 1.1
• ThunderSync051.0 ± 0.31.63 ± 0.03121.9 ± 1.449.8 ± 0.41.67 ± 0.03120.4 ± 1.3

Table 2. Full fine-tuning efficiency on SWE-smith across GPU platforms with Qwen-3.8-27B.

Trainer active MFU divides learner FLOPs by the complete update wall time and by trainer GPU capacity. The window covers rollout waiting, environment execution, teacher scoring, learner work, and policy publication, counting overlap once, so overlapping learner work with rollout raises the metric by reducing trainer idle time. ThunderSync has the highest average active MFU in every configuration, from 18.7% for GLM to 51.0% for Qwen on H200. H200’s Sync MFU exceeds B200’s because the learner, not rollout, bounds its step, so Sync’s learner idles less. Figure 4 (right) shows the Qwen/B200 curves stabilizing after startup; Appendix § 7 defines the FLOP accounting.

ThunderSync’s peak GPU memory exceeds Sync’s in every configuration, at most from 117.0 to 122.8 GB per learner GPU (Qwen, GRPO). These peaks exclude the pinned host RAM holding the FP32 accumulator and GRPO group statistics (Appendix § 9); rollout and teacher inference use separate GPUs. Table 7 reports LoRA (Appendix § 13.§ 2).

MethodPolicy lag (staleness) ↓GRPO: Trainer active MFU (%) ↑GRPO: Speedup (×\times) ↑GRPO: Peak GPU memory (GB) ↓OPD: Trainer active MFU (%) ↑OPD: Speedup (×\times) ↑OPD: Peak GPU memory (GB) ↓
Qwen-3.8-27B LoRA
Sync019.51.0075.419.01.0073.4
Async132.61.6776.032.11.6974.0
Fully AsyncVariable32.81.6877.132.31.7074.8
ThunderSync033.01.6979.232.51.7176.0
GLM-4.7-Flash-31B LoRA
Sync010.91.0075.110.31.0073.1
Async117.71.6275.616.51.6073.6
Fully AsyncVariable17.81.6376.316.61.6174.2
ThunderSync017.91.6477.316.71.6275.0

Table 7. LoRA efficiency on NVIDIA B200 GPUs. Each speedup uses the same model and objective’s Sync reference. OPD model names refer to the student.

Workload scaling and overlap efficiency

We show how ThunderSync approaches its 2×2\times speedup bound across stage balance, trajectory heterogeneity, batch size, and horizon; Appendix § 11 derives this bound and the release laws. Every comparison in this section holds the workload and GPU allocation fixed between Sync and ThunderSync, so no speedup comes from a change in workload or allocation.

Computation balance. Equal stage times offer the largest saving: complete overlap halves their combined duration, giving 2×2\times speedup when final reduction, optimizer, and publication overhead is negligible. If one stage dominates, it limits the saving. Appendix § 11.6 sweeps the ratio of rollout time to learner time at full capacity; one denotes equal times. We hold this balance below.

Trajectory heterogeneity. Agent trajectories vary in length, and Sync’s learner waits for the slowest (Figure 3). ThunderSync starts a trajectory’s backward pass once its reward arrives, so the learner works while rollout continues. In a separate scaling setup, over 150 measured steps per objective at balance (Figure 7a), GRPO’s speedup rises from 1.58×1.58\times at near-equal durations, where only rollout waves overlap, to 1.95×1.95\times as the spread grows. OPD releases work per turn and stays at 1.731.73 to 1.94×1.94\times.

Figure 7. (a) Speedup and trainer active MFU of measured steps versus trajectory duration dispersion, with least-squares fits. (b) Predicted speedup at Trollout/Ttrain=1T_{\mathrm{rollout}} / T_{\mathrm{train}} = 1.

Batch and horizon. Figure 7b varies trajectories per optimizer step and agentic turns per trajectory. Rollout capacity is fixed at 128 trajectories, so larger batches run in successive waves. ThunderSync processes ready work from earlier waves while later waves run. At balance, only the final wave’s learner work remains after rollout ends, forming the learner tail. As the batch grows, the tail and policy publication take a smaller share of the update, so the predicted speedup approaches 2×2\times.

With the completion-time distribution held fixed, GRPO’s predicted speedup does not change with turn count, because a trajectory’s work is released only when its reward arrives. For OPD, more turns spread releases and shorten the tail, with diminishing gains limited by deferred work (Appendix § 11.§ 2).

Prediction and overhead. For Figure 8, we measured 588 paired configurations across both objectives, varying batch size at 40 turns and horizon at 512 trajectories while sweeping the rollout-to-learner time ratio. These scaling experiments use a separate setup from the learning-curve runs; Appendix § 11.§ 5 specifies allocation and concurrency. Predictions from measured release traces differ from analytical predictions by 1.6% on average and at most 10.6%; measured wall-clock speedups average 6.5% below the trace predictions. These gaps describe release-model error and the remaining runtime overhead, respectively (Appendix § 11.§ 5).

Figure 8. Speedup over Sync. Contours show the analytical prediction across batch size (upper) and horizon (lower). Scatter panels pool both sweeps and plot this prediction against predictions from measured release traces (open circles) and measured wall-clock speedups (filled circles).

Conclusion

We presented ThunderSync, which overlaps rollout and learning with zero off-policy staleness. It streams ready gradients at a fixed policy snapshot and takes one optimizer step after the batch closes, preserving the synchronous GRPO and OPD updates. Gradient sufficient statistics let GRPO backward passes start before all group rewards arrive, and teacher-scored turns let OPD learning proceed during tool execution. Step wall time speedup can approach 2×2 \times when rollout and learner work are balanced and the learner tail and update overhead are negligible. Agent training at frontier scale moves only as fast as experiments turn into evidence. By recovering idle learner time without changing the objective, ThunderSync shortens that loop, so the same compute answers more research questions. Further discussion, including limitations, appears in Appendix § 6.

Limitation and further discussion

ThunderSync rests on one premise: learner work should begin as soon as the objective’s dependencies allow. How much this saves is therefore set as much by the workload as by the scheduler. Objectives whose gradient inputs resolve early, such as turn-level OPD, leave more learner work to overlap with rollout than objectives that wait on group-level signals, and the benefit is largest when rollout and learner work take comparable time. Starting work early also means keeping partial gradient state until each group or batch closes, which exchanges trainer memory for wall time. We regard these dependencies as a design space. Finer readiness units and admission that weighs memory against remaining service would move more learner work into the rollout window, and identifying readiness units for other objectives would extend exact gradient streaming beyond GRPO and OPD. Scaling the same principle to multi-node training and a broader set of agentic workloads is a natural next step.

Efficiency measurement

Trainer active MFU

Throughout this paper, trainer active MFU denotes the learner’s model FLOPs divided by the complete update wall time and the peak capacity of the trainer GPUs. We use this label for the step-averaged trainer metric, whose time window includes rollout waiting and trainer idle intervals.

For update kk, let FktrainF_k^{\mathrm{train}} be the model FLOPs required by the learner, TkstepT_k^{\mathrm{step}} its complete update wall time, and PdP_d the dense-BF16 peak rate used for trainer GPU dd. We define

MFUkactive=FktrainTkstep∑d∈DtrainPd.(10)\mathrm{MFU}_k^{\mathrm{active}} = \frac{F_k^{\mathrm{train}}}{T_k^{\mathrm{step}}\sum_{d\in D_{\mathrm{train}}} P_d}. \tag*{(10)}

The capacity denominator includes the trainer GPUs, with the same peak-rate convention for all methods within a hardware configuration. Figure 4 and Table 1, Table 2, and Table 7 use this definition.

The denominator uses the same wall-clock intervals as step wall time below. For Sync and ThunderSync, an interval begins with the update’s rollout and ends when the rollout replicas acknowledge the published policy. It includes environment and reward processing, teacher scoring, all learner work, final reduction, optimizer execution, and publication. Waiting for a source to become ready remains included. For Async, we use complete steady-state update cycles between successive policy-publication acknowledgements, counting concurrent stages once. For ThunderSync, deferred context gradients and shared-prefix backward must finish within the measured update.

The FLOPs numerator follows the model architecture and the contexts processed by the learner. Context tokens contribute computation even when their loss mask is zero. For LoRA, the count includes forward computation and backward propagation through frozen weights, as well as adapter gradients. Activation-checkpoint recomputation contributes to elapsed time without being credited as additional model FLOPs. Rollout generation and teacher scoring contribute to elapsed time, but their FLOPs and GPU capacity are excluded from this trainer-side metric.

Operator accounting. For a matrix product with dimensions (m×k)(k×n)(m \times k)(k \times n), the counter credits 2mkn2mkn FLOPs. A linear layer processing TT tokens with input/output widths din,doutd_{\mathrm{in}},d_{\mathrm{out}} therefore costs 2Tdindout2Td_{\mathrm{in}}d_{\mathrm{out}} per forward pass. When both input and weight gradients are required, backward adds two such products. A frozen LoRA base omits the weight-gradient product but retains the input-gradient product wherever gradients propagate through it. The rank-rr adapter’s forward and backward products are counted separately.

The ledger sums executed attention projections, query-key and attention-value products, dense and recurrent blocks, and vocabulary projections using their actual tensor shapes. For GLM, routed-expert products use the number of tokens dispatched to each expert; shared experts and routing computation are included separately. Neither total stored parameters nor the nominal active-parameter count alone is an adequate FLOP counter. Padding that reaches a kernel counts as executed work. Each record keeps useful model work separate from checkpoint recomputation, so the latter increases elapsed time without inflating the credited numerator.

Average trainer active MFU

For a reporting window of NN completed updates after warmup, average trainer active MFU is

MFU‾active=1N∑k=1NMFUkactive.(11)\overline{\mathrm{MFU}}^{\mathrm{active}} = \frac{1}{N}\sum_{k=1}^{N}\mathrm{MFU}_{k}^{\mathrm{active}} . \tag*{(11)}

Each term uses the learner FLOPs and complete wall time of the same update cycle. With fixed learner work and trainer capacity, shorter updates increase trainer active MFU. Overlapping learner computation with rollout can therefore raise this metric without changing kernel throughput. Within one configuration, all schedules process the same learner FLOPs, so the MFU ratio to Sync tracks the step wall time speedup; across models and hardware, learner FLOPs differ.

Profiling window and aggregation. We completed 40 updates for each of seeds 42, 43, and 44, discarded updates 1–4 as startup, and profiled updates 5–40 (N=36N = 36). Startup includes initial compilation and allocator/cache growth; it is distinct from learning-rate warmup. All schedules retain the same number of complete steady-state intervals, with extra pipeline startup/drain work recorded outside the Async measurement window. The wall-time denominator uses a common host timebase for complete update cycles. Gaps with no admitted learner work remain included; we do not replace this window with a union of active kernel intervals.

CUDA events recorded device service without synchronizing after every turn. We collected detailed operator counts in a separate untimed trace pass with the same workload and tensor shapes. Within each seed, MFU is averaged over the 36 updates and speedup is the ratio of mean step times. We report the mean and, where shown, sample standard deviation across the three seed-level summaries, rather than treating 108 correlated updates as independent runs.

Step wall time speedup

Step wall time is the elapsed wall-clock time per completed training update. The interval includes rollout, environment and reward processing, learner work, final reduction, and policy publication. It ends when the rollout replicas acknowledge the updated policy. For NN completed updates, let T‾methodstep\overline{T}^{\mathrm{step}}_{\mathrm{method}} be elapsed time divided by NN. Speedup for each objective and configuration is

Speedupmethod=T‾SyncstepT‾methodstep,(12)\mathrm{Speedup}_{\mathrm{method}} = \frac{\overline{T}^{\mathrm{step}}_{\mathrm{Sync}}}{\overline{T}^{\mathrm{step}}_{\mathrm{method}}}, \tag*{(12)}

where both times use the same workload, hardware allocation, and number of completed updates after warmup. This is a ratio of mean step wall times, not a mean of per-step ratios or a ratio of kernel execution times. For Async, the window covers completed steady-state update cycles with the declared one-update policy lag; overlapping stages contribute once to elapsed time.

Hardware allocation and memory

Each eight-GPU configuration assigns four GPUs to the learner. GRPO uses the remaining four for rollout; OPD uses two for rollout and two for the teacher. ThunderSync replicates parameters, shards optimizer state, and accumulates gradients on the host. Appendix § 9 gives the precision and execution settings. The dense-BF16 peak rates used in the MFU denominator are 2,250 TFLOP/s per B200 GPU and 989.5 TFLOP/s per H200 GPU.

We report two kinds of memory. GPU memory is the HBM on each learner GPU; host memory is the CPU RAM of the node. Table 1 and Table 2 report trainer peak GPU memory per GPU. The reported peak is the largest among the learner GPUs during an update, including gradient accumulation, distributed reduction, and optimizer execution. It covers resident model and optimizer state, activations, gradient buffers, and temporary storage on those GPUs. Rollout KV caches and teacher memory belong to their separate GPU pools. The serving memory fraction of 0.65 controls the rollout executors’ memory budget.

We reset each learner process’s CUDA peak-memory counters at the start of the profiled update, after the persistent model and optimizer state is resident, and read them after all backward, reduction, and optimizer work has completed. We report torch.cuda.max_memory_allocated() as the tensor allocation peak, taking the maximum across learner ranks and profiled updates within each seed, and convert bytes to decimal GB (10910^{9} bytes). We record reserved allocator memory and device-wide memory from NVML separately, since they include different allocations.4 Deferred-state buffers that stay on the learner GPUs count toward ThunderSync’s GPU peak. The FP32 batch accumulator and the GRPO group statistics sit in pinned host memory, so this counter does not include them; Appendix § 9 bounds their host-memory size. A model-state size or a serving-memory limit is not a measured peak. We use the same collection procedure for the full fine-tuning and LoRA comparisons.

Training data and benchmark separation

Data sources and versions

The software-engineering workload uses SWE-smith, and the terminal workload uses SETA-Env. These are separate post-training workloads, evaluated on SWE-bench Verified and Terminal Bench 4.0, respectively. Table 3 fixes the latest public revisions inspected on September 6, 2026. Revisions stay fixed throughout a comparison, including benchmark task definitions and evaluation resources.

CollectionRoleTasksRevision or release
SWE-smith PythonPost-training50,90877cab9055d42
SETA-EnvPost-training4,5673c3bc8975b05
SWE-bench VerifiedEvaluation50078f471bf655a
Terminal Bench 4.0Evaluation66v4.0.0 / 452bf305c6da

Table 3. Pinned data sources. Sizes describe the inspected source pools before the filtering and development split in Table 4.

SWE-smith. SWE-smith constructs executable repository-repair tasks by introducing bugs into working codebases and identifying tests that fail after the change [50]. Its construction methods include language-model rewrites, procedural edits, combined bugs, and pull-request mirroring. The original paper reports 50,137 instances from 128 repositories. The selected, maintained Python release contains 50,908 instances from 131 repositories.5 Each record supplies a problem statement, a repository environment, a bug-inducing patch, and test identifiers. The environment setup must apply this patch before agent interaction; its direction is the opposite of the solution patch in SWE-bench. Existing repository tests can be visible during SWE-smith training, so training reward and performance on held-out repair tasks measure different things.

SETA-Env. SETA builds terminal environments from community questions and answers, Kaggle notebooks, and natural-language shell-command examples. SETA-Synth creates tasks with executable environments and verifiers; SETA-Evol changes their difficulty or context [37]. The inspected release has 3,255 synthesized and 1,312 evolved task directories, matching the 4,567 tasks reported in its paper and dataset card.6 Each task includes instructions, an environment definition, a reference solution, and executable tests. SETA’s construction procedure checks a no-op solution and an oracle solution, then audits systematic rollout failures for task-design flaws. These upstream checks describe dataset construction; they do not replace validation of the environments used in ThunderSync runs.

Filtering and development splits

The static SWE-smith filter requires a nonempty instance identifier, problem statement, repository identifier, and environment image, and retains one record per instance identifier. This removes 11,437 records, all with empty problem statements. The remaining 39,471 instances cover 131 repositories. Before comparing repository identities, the filter maps SWE-smith mirror names back to their original owner/repository names and normalizes case. None of these repositories matches the 12 repositories in the pinned SWE-bench Verified set.

For SETA, the static filter requires task.toml, instructions, an environment Dockerfile, a test entrypoint, and a reference-solution entrypoint. All 4,567 task directories pass this check. A source-family identifier removes the evolution suffix from an evolved task’s identifier. Tasks in the same source family stay in one split, including evolved tasks whose original is absent from the release.

The development split contains 5% of groups, rounded up: repositories for SWE-smith and source families for SETA. Groups are ordered by the SHA-256 digest of the normalized group identifier; the first groups form the development set. The remaining groups form the training set. This produces Table 4. Task lists and their digests define the split independently of model performance or trajectory completion time. This five-percent group split is a ThunderSync protocol choice, not an official development split supplied by either dataset.

StageSWE-smith PythonSETA-Env
Source tasks50,9084,567
Removed by static field/file checks11,4370
Eligible tasks39,4714,567
Split groups131 repositories3,474 source families
Training tasks37,0844,333
Development tasks2,387234
Training/development groups124 / 73,300 / 174

Table 4. Statically constructed cohorts for the declared protocol, before prompt-length checks, container validation, and semantic-overlap review.

Executable validation. For SWE-smith, we ran the validation harness on the original repository, then applied the bug-inducing patch and tested it again. Its collection rule requires at least one repair test and one retained passing test; evaluation with the gold repair provides a separate harness sanity check.7 For SETA, we started a fresh environment for each of the no-op and reference solutions, recorded the verifier output, and required the reference solution to pass without the no-op already solving the task. These checks validate the environment and reward signal, not the trained policy.

The run manifest records the task identifier, source revision, image digest, verifier revision, validation outcome, and any exclusion reason. Prompt-length filtering uses the pinned student tokenizer and the actual serialized system, tool, and task prompt before rollout. A failing task is removed from every schedule’s cohort before shuffling; its removal updates the task count and list digest. Table 4 reports the static cohort construction; the execution manifest records subsequent validation exclusions and the final task lists used by each comparison.

A task’s difficulty, a zero-variance GRPO group, or a long trajectory does not trigger exclusion. Although campaign-specific SETA launchers can select benchmark tasks or discard uniform-reward groups, our comparison retains those groups and excludes Terminal Bench tasks from training. Within a seed, schedules draw prompts from the same shuffled training list without replacement, reshuffling when it is exhausted. The two datasets are not mixed, and development tasks contribute no training gradients.

Scope of benchmark separation

Excluding benchmark task identifiers is only one check on data separation. The SWE-smith paper describes using a SWE-bench Verified problem statement as a style demonstration during issue generation (Appendix D of [50]). Repository disjointness therefore does not establish that its construction was independent of benchmark text. For SETA, checks must cover instructions, reference solutions, tests, and source ancestry, including relationships to earlier Terminal Bench releases. The static checks above do not establish semantic decontamination. The overlap review first matches task IDs, canonical repository or source IDs, and hashes of whitespace-normalized instructions, solutions, and tests. Candidate paraphrases and evolved descendants then require source inspection. A confirmed benchmark derivative excludes its entire source family before splitting; ambiguous cases remain recorded rather than being certified clean. Counts of candidates, confirmed overlaps, and exclusions accompany the final cohort manifest.

The protocol excludes benchmark tasks, solutions, verifier outputs, and identified derivatives from training, prompts, and development selection. Upstream data generation or model pretraining may still expose the student or teacher to benchmark content. Results therefore compare schedules with matched data and models, without establishing that every task was unseen throughout model development.

Optimization and generation settings

Logical batches and optimization

Table 5 gives shared optimization settings for Sync, Async, and ThunderSync within each objective. The main configuration updates the student’s language-model parameters. The text-only agent interface does not use Qwen’s vision components. The LoRA configuration is separate from full fine-tuning.

SettingGRPOOPD
Prompts per optimizer update3232
Trajectories per prompt84 independent samples
Trajectories per optimizer update256128
OptimizerAdamWAdamW
Full fine-tuning learning rate10−610^{-6}10−610^{-6}
Learning-rate schedule / warmupConstant / noneConstant / none
Adam (β1\beta_1, β2\beta_2) / ϵ\epsilon(0.9, 0.999) / 10−810^{-8}(0.9, 0.999) / 10−810^{-8}
Weight decay00
Global gradient-norm clipping1.01.0
Optimizer steps per logical batch11
Additional PPO epochs00
Reference-policy KL / entropy bonus0 / 00 / 0
Loss-bearing tokensGenerated assistant tokensGenerated assistant tokens
ReductionMean over trajectoriesGlobal scored-token mean
Advantage stabilization ϵ\epsilon10−610^{-6}Not applicable
Student forward precisionBF16BF16
Gradient accumulation / Adam stateFP32 (host) / BF16FP32 (host) / BF16
Training seeds42, 43, 4442, 43, 44

Table 5. Declared optimization settings. Each column is a separate comparison among execution schedules. The learning rate for the separate LoRA configuration is 10−510^{-5}.

The full fine-tuning learning rate, Adam moments, clipping threshold, and temperature-one sampling follow conventional GRPO settings, including the corresponding TRL defaults. They are fixed across schedules rather than selected separately for each method. The constant learning rate, trajectory-mean GRPO reduction, and single logical update are explicit ThunderSync choices; adopting an entire framework’s default configuration would not preserve the objective defined here. We save the resolved configuration with each run’s model and data revisions. For GRPO, let LiL_i be trajectory ii’s scored-token count. Setting wi,t=1/(32Li)w_{i,t}=1/(32L_i) in § 3.4 makes the sum of group directions a mean over the 256 trajectory-normalized directions. Rewards are standardized within each eight-trajectory group using the population standard deviation. Uniform-reward groups contribute zero policy gradient and retain their place in the batch and timing record. The group-normalized advantages are held constant during differentiation, and each logical batch produces one optimizer step.

OPD applies the sampled-token log-probability difference in Equation (8), with both distributions evaluated at temperature one. Four trajectories per prompt provide independent samples; OPD has no group-relative reward normalization. Accumulation uses the global scored-token denominator in Equation (9). Both objectives normalize and reduce gradients across ranks before global clipping and the single optimizer step. Prompt and observation tokens supply causal context without direct loss.

For the Qwen LoRA configuration, the specified rank is 32, scaling parameter α=64\alpha= 64, dropout is zero, and the base weights remain frozen. The targets are q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj, in_proj_qkv, in_proj_z, in_proj_b, in_proj_a, and out_proj. Batch sizes, generation limits, and evaluation settings remain those of the corresponding objective.

Agent interaction and generation

Rollout pipelines. We use verl’s official Agent Loop for GRPO and SkyRL’s official multi-turn generation pipeline, through SkyRLGymGenerator and SkyRL-Gym, for OPD. Both use vLLM as the rollout engine. The agent loop alternates model generation with shell-tool execution in the task environment and retains the resulting history for the next turn. Independent trajectories run concurrently, so a tool call waiting for its result does not block generation for other trajectories.10 The same agent interface and vLLM serving settings apply to Sync, Async, and ThunderSync within each objective.

Table 6: Generation settings shared across schedules. Training and evaluation use the same per-attempt token and turn limits.

SettingValue
Maximum agentic turns per trajectory300
Maximum generated tokens per turn1,024
Maximum total generated tokens per trajectory16,384
Maximum initial prompt tokens16,384
Maximum total context tokens131,072
Maximum retained observation per tool call4,096 tokens (head and tail equally)
Sampling temperature / top-pp / top-kk1.0 / 1.0 / disabled
Repetition / presence / frequency penalties1.0 / 0 / 0
Thinking modeEnabled; reasoning tokens count toward the limits
Tool calls per agent turnAt most one
Ordinary tool-command timeout120 seconds
Student rollout weights / KV cacheBF16 / BF16
Student serving memory fraction0.65
Maximum active sequences per rollout replica16
Chunked prefill / prefix cachingEnabled / enabled
Speculative decodingDisabled
Evaluation attempts per task and checkpoint3 (5 in Appendix § 13.§ 1)

Table 6. Generation settings shared across schedules. Training and evaluation use the same per-attempt token and turn limits.

Shared serving optimizations. All schedules enable vLLM’s chunked prefill and automatic prefix caching, and disable speculative decoding. Chunked prefill batches prompt chunks with decode requests. Prefix caching reuses matching cached prefixes, including retained conversation history across turns when the cache is available on the serving replica. Policy publication invalidates policy-dependent caches before requests use the new weights. These serving optimizations are common to the comparison; ThunderSync changes when ready learner work is admitted.11

The limits in Table 6 are independent ceilings. In particular, 300 turns do not imply an allowance of 300 × 1,024 generated tokens once the trajectory-level limit is reached. Initial prompts exceeding their limit are recorded before training and excluded consistently across schedules. During a trajectory, reaching the generation or context limit ends the attempt; previous turns are not removed to create additional context capacity. The agent retains the first and last 2,048 tokens of longer tool outputs, with the same truncation rule in every arm. An unparsable action consumes its turn and returns a fixed parser-error observation. Each independent attempt starts from a fresh task environment.

The agent interface supplies the task instruction and a common shell tool, with fixed system and tool descriptions within a model configuration. There is no retrieval from benchmark solutions or evaluator-controlled files. The teacher scores the student’s serialized causal history, including its retained observations, rather than a separately rewritten conversation. Qwen reasoning history is preserved in that history. Sampling seeds are assigned by run seed, optimizer update, task identifier, trajectory index, and turn index, independently of arrival order. Matching these seeds does not imply identical trajectories once the policies differ, particularly for Async.

Teacher and hardware allocation

The teacher for Qwen-3.8-27B is Qwen/Qwen3.8-Flash-Next-FP8, revision 236dfdf28582; the student is Qwen/Qwen3.8-27B, revision 1d4bf0f2ff60. The identical tokenizer gives token-level correspondence for OPD. The teacher remains frozen, uses its released FP8 quantization configuration on both GPU types, and supplies log probabilities only for the sampled assistant tokens. Log-probability normalization and score transport use FP32; this does not undo approximation introduced by FP8 teacher weights. Teacher scoring uses the same causal prefix and scoring implementation across schedules, with work becoming eligible after each completed turn.

The hardware configurations are one node with eight B200 GPUs and one with eight H200 GPUs. The declared allocation reserves four GPUs for the student learner. GRPO uses the remaining four for rollout replicas; OPD uses two for rollout replicas and two for the teacher, with teacher tensor parallelism of two. Student replicas each use one GPU. ThunderSync replicates the BF16 student on each of the four learner GPUs, shards the AdamW state across them, and accumulates gradients in FP32 in host memory, with activation checkpointing; this lets each rank release sources independently. Under GRPO, each open group also keeps its two FP32 statistics Gg(1)G_g^{(1)} and Gg(2)G_g^{(2)} in pinned host memory; they are allocated with the group’s first source and freed when the group closes. An optional admission cap kk defers the backward of a trajectory from a new group while kk groups on its rank hold statistics, so only its tokens wait. The statistics and the batch accumulator then occupy at most 4(2k+1)P4(2k+1)P bytes of host memory per rank for PP parameters, regardless of the number of prompts per batch. We set k=1k=1, which bounds the statistics and batch accumulator at 1.30 TB for Qwen and 1.49 TB for GLM across the four learner ranks. The Sync and Async baselines use the same GPU allocation and the optimization and precision settings of Table 5. With 16 active sequences per replica, the reference allocation permits up to 64 concurrently scheduled generation sequences for GRPO and 32 for OPD. These limits govern vLLM generation, separately from the number of trajectories in a logical update or waiting on tools. Environment and verifier resource limits and concurrency settings are fixed across schedules. The resolved launch configurations will accompany the code release. The workload-scaling experiments use a separate allocation and trajectory-capacity setup (Appendix § 11.§ 5).

The Qwen teacher’s released tensors occupy approximately 185.5 GB before quantization scales, caches, and runtime buffers. Its two-GPU allocation and scoring procedure remain fixed across schedules.

GLM configuration. The GLM student is zai-org/GLM-4.7-Flash, revision 7dd20894a642, with about 31.22 billion stored parameters and approximately three billion active parameters per token. Its released configuration has 47 decoder layers, 64 routed experts per MoE layer, and four selected experts per token.12 The GLM LoRA configuration uses r=32r=32, α=64\alpha=64, zero dropout, and the same 10−510^{-5} learning rate. It targets the attention projections q_a_proj, q_b_proj, kv_a_proj_with_mqa, kv_b_proj, and o_proj. Routed experts, embeddings, and the output head remain frozen. These targets give 42,063,872 adapter parameters over the 47 decoder layers. The adaptation rank is separate from the architecture’s query/KV compression ranks.13 Comparisons remain within each model’s adapter configuration.

For GLM OPD, we use the frozen teacher zai-org/GLM-5.3-Flash, FP8 revision 690b705278a3. Its tokenizer file is byte-identical to the student’s. We score the student’s unchanged token IDs and causal prefix, retain its reasoning and tool history, and return sampled-token log probabilities in FP32.14 The teacher’s tensors require about 328.25 GB before caches and runtime buffers. GLM OPD uses tensor parallelism over two B200 GPUs; the H200 comparison uses Qwen. Before timing, we checked capacity with the 131,072-token context, scoring buffers, and resident quantization state.

Our shared temperature of one differs from the GLM model card’s SWE-bench/Terminal Bench setting of 0.7 at top-p=1p = 1. Table 6 fixes the other generation limits; the comparison does not reproduce the model card’s evaluation budget.

Comparison controls

Comparisons fix the objective, model, adaptation, initial checkpoint, training list, rewards, optimizer, precision, serving settings, environment resources, and hardware across schedules. GRPO and OPD differ in trajectory counts and supervision costs, so equal updates do not imply equal compute. Sync and ThunderSync use one policy snapshot for rollout and learning. Async follows a one-step-off schedule: after startup, each training batch is sampled from a policy one optimizer update behind the current learner. Specifically, trajectories are sampled from πθk−1\pi_{\theta_{k-1}}, while the learner evaluates the same surrogate at θk\theta_k, without an additional behavior-policy importance correction. Holding the surrogate fixed makes this a controlled comparison of execution schedules rather than of staleness corrections such as the decoupled objective of AReaL [10]. Fully Async follows the fully asynchronous trainers of verl [41] for GRPO and SkyRL [3] for OPD, in the style of AReaL [10]. Rollout and learner GPUs run independently: the learner starts an update once the completed groups for one logical batch are available, while rollout continues. After each update, the new weights reach the rollout engines in flight: generation pauses, the weights are swapped, and unfinished trajectories resume under the new policy. A trajectory can therefore span several policy versions, and one batch can mix trajectories of different ages. A staleness bound limits how far rollout runs ahead of the learner, so the policy lag varies but stays bounded.

For Sync, Async, and ThunderSync, completion order affects admission, not batch membership: every scheduled trajectory and scored turn completes before the update. The shared-prefix learner optimization in Appendix § 14 also applies to all schedules. Equal mathematical updates need not be bitwise identical across kernels.

Evaluation setup

Benchmarks and success criteria

SWE-bench Verified. We use the official SWE-bench evaluation harness (swebench.harness.run_evaluation) for all 500 tasks in the pinned Verified test set. This human-validated subset of SWE-bench contains real GitHub issues paired with repository states and executable tests [YYW+24]. Each attempt receives the issue statement and the repository at its base commit. The evaluator applies the agent’s proposed changes and the benchmark’s test patch in an isolated environment. Resolution requires all designated FAIL_TO_PASS and PASS_TO_PASS tests to pass. Missing test results, invalid patches, and agent timeouts count as failures. Gold patches and evaluation-only tests are evaluator inputs excluded from the agent prompt.15

Terminal Bench 4.0. We use Harbor, the benchmark’s official harness, to evaluate all 66 tasks in release v4.0.0, including their pinned instructions, environments, resource allocations, and verifiers. The benchmark tests completion of terminal tasks through changes to the environment [MSC+26]. Each attempt starts from the task’s initial state, and success follows its official verifier. Reference solutions and verifier files remain outside the agent’s accessible task files. Tasks requiring GPUs or multiple containers retain those resources in the evaluation configuration; they are not silently excluded.

Version 4.0 changes task definitions and resources relative to 3.0 and sets an eight-hour agent timeout.16 The protocol retains those task resources and the eight-hour outer timeout, while imposing the shared token, turn, and ordinary tool-command limits in Appendix § 9.§ 2. Its scores therefore describe ThunderSync’s specified agent interface and inference budget. They are not directly interchangeable with leaderboard results from other interfaces or budgets. SETA’s original experiments used Terminal Bench 2.0; their scores are not baselines for the version-4.0 comparison here.

Training rewards and evaluation success. For the declared SWE-smith workload, the training reward is one only when all designated repair and regression tests pass, and zero otherwise. For SETA, the selected training reward follows its partial-progress definition: r=p+0.51[p=1]r = p + 0.5 \mathbf{1}[p = 1], where pp is the fraction of passed verifier tests [37]. The same task-specific reward is used across schedules; OPD records it for monitoring while its gradient uses teacher scores. Terminal Bench evaluation uses official task success rather than SETA’s partial reward. Consequently, reward scales should be compared within a workload.

Attempts, aggregation, and uncertainty

The protocol specifies three independent attempts per task at each evaluated checkpoint, with settings from Table 6. If yij∈{0,1}y_{ij} \in\{0,1\} indicates success on attempt jj for task ii, the percentage is

pass@3⁡=100M∑i=1M1[∑j=13yij>0](13)\operatorname{pass@3} = \frac{100}{M}\sum_{i=1}^{M}\mathbf{1}\left[\sum_{j=1}^{3}y_{ij} > 0\right] \tag*{(13)}

where M=500M = 500 for SWE-bench Verified and M=66M = 66 for Terminal Bench 4.0. Each task has equal weight. Attempts restart the environment and agent history; a later attempt receives no solution or verifier feedback from an earlier one. Pass@3 is the fraction solved at least once in three attempts. Averaging attempt success estimates pass@1. No fourth attempt is selected using verifier feedback.

We evaluated training seeds 42, 43, and 44 separately, then averaged their scores. Three evaluation attempts from one checkpoint do not constitute three independent training runs.

An infrastructure failure is recorded separately from an agent failure. A retry is allowed only to replace an attempt invalidated by an infrastructure fault, using the same task, checkpoint, and assigned seed; all retries remain in the execution record. A persistently unavailable task leaves the benchmark evaluation incomplete. It is not dropped from the denominator to improve the reported score. Agent mistakes, refusals, and exhausted inference budgets remain failed attempts.

Checkpoints and GPU-hours comparisons

Matched evaluation and training budgets. Within each objective and model configuration, ThunderSync, Sync, Async, and Fully Async use the same evaluation tasks and settings. Terminal Bench tasks are excluded from post-training. We report held-out pass@3 and compare schedules by the time needed to reach the same benchmark-specific pass@3 target and by pass@3 after the same 128-GPU-hour training budget. Time to matched performance includes the learning progress across updates; it is distinct from the per-step speedup defined in Appendix § 7.

We requested checkpoint snapshots at one-hour training-time intervals and saved them at the next completed optimizer boundary, recording their publication times. The fixed-budget comparison uses the latest completed checkpoint published no later than 128 GPU-hours. Time to a target is the first evaluated checkpoint attaining that target, with an unreached target reported as unreached within the budget. We fixed the targets before inspecting the comparative runs.

For comparisons across seeds, we formed a common time axis from the union of checkpoint publication times. At each time, each run contributes its latest published, evaluated checkpoint score; no future checkpoint is used. The mean of the three runs defines the displayed step curve. Its first target crossing and its value at 128 GPU-hours use this same rule.

The training clock starts with the first training rollout request, after model and environment initialization, whose time is reported separately. GPU-hours multiply this clock by the eight GPUs of the node. Training cost in US dollars multiplies GPU-hours by Lambda’s on-demand price for an eight-GPU B200 instance, $6.69 per GPU-hour ($53.52 per node-hour, excluding tax). It covers rollout, environment interaction, verification, teacher scoring, learner computation, and policy publication, counting overlap once. Teacher scoring contributes to elapsed time but its FLOPs are excluded from the student MFU numerator. Offline benchmark evaluation is timed separately from training. Checkpointing pauses remain in the training clock. Warmup time excluded from steady-state step profiling remains in end-to-end learning curves.

Hyperparameter or prompt changes are selected using development tasks, then frozen for all schedules. Benchmark checkpoints are evaluated on the declared cadence rather than selected retrospectively for a favorable score. Alongside GPU-hours curves, run records must retain optimizer updates, sampled trajectories, and generated tokens, so that a fixed-time comparison can be distinguished from a fixed-work comparison.

Checkpoint records. Each checkpoint record binds the training seed, update number, policy hash, publication time, processed trajectories/tokens, and one success/failure record for each task and attempt. It also stores benchmark, prompt, tokenizer, harness, and container revisions, plus infrastructure retry records. We used these records to compute pass@3 and select checkpoints.

Scalability theory

Step time and the learner tail

We compare schedules for one logical batch generated and differentiated at the fixed policy snapshot θk\theta_k. Let RR be the time until the last rollout event required by the objective is available. Learner job jj becomes ready at time τj\tau_j and takes pjp_j units of service on the learner. The total learner service is L=∑j=1npjL = \sum_{j=1}^{n} p_j. After rollout and learning finish, a common serial suffix PP covers final reduction, the optimizer step, policy publication, reload, and rollout-replica acknowledgement.

The comparison fixes the physical jobs and their service times, rollout time, hardware allocation, and suffix across schedules. It assumes enough device memory to admit each source when it becomes ready. In particular, service times do not change with concurrent rollout activity or with the schedule’s choice of release times. The release laws below assume 0≤τj≤R0 \le\tau_j \le R; work reserved for the final optimizer barrier belongs to PP. These assumptions isolate savings from earlier release.

Index jobs in nondecreasing readiness order. On one learner lane, the completion time cjc_j follows

c0=0,cj=max⁡(τj,cj−1)+pj,TThunderSync=max⁡(R,cn)+P.(14)c_0 = 0,\qquad c_j = \max(\tau_j,c_{j-1}) + p_j,\qquad T_{\mathrm{ThunderSync}} = \max(R,c_n) + P. \tag*{(14)}

Repeated substitution gives

cn=max⁡1≤j≤n(τj+∑i=jnpi).(15)c_n = \max_{1 \le j \le n}\left(\tau_j + \sum_{i=j}^{n} p_i\right). \tag*{(15)}

For the induction step, substitute the expression for cj−1c_{j-1} into max⁡(τj,cj−1)+pj\max(\tau_j,c_{j-1}) + p_j: the new job either starts at its own readiness time or extends one of the earlier uninterrupted service intervals. Releasing a job earlier keeps or reduces the endpoint when service times and job order stay fixed. Readiness order also attains the minimum endpoint on one lane: all jobs released at or after τj\tau_j must be processed after that time, giving the lower bound attained in Equation (15).

Define the learner tail in units of rollout time as λK=[cn−R]+/R\lambda_K = [c_n-R]_+/R, where [x]+=max⁡(x,0)[x]_+ = \max(x,0). Thus RλKR\lambda_K is the learner time remaining after rollout closes. The two other normalized quantities are ρ=L/R\rho= L/R, the learner service relative to rollout time, and κ=P/R\kappa= P/R, the final suffix relative to rollout time. Sync starts all learner jobs after RR, so

TSync=R+L+P,TThunderSync=R(1+λK)+P,T_{\mathrm{Sync}} = R + L + P,\qquad T_{\mathrm{ThunderSync}} = R(1+\lambda_K)+P,
SSync=TSyncTThunderSync=1+ρ+κ1+λK+κ.(16)S_{\mathrm{Sync}}=\frac{T_{\mathrm{Sync}}}{T_{\mathrm{ThunderSync}}}=\frac{1+\rho+\kappa}{1+\lambda_K+\kappa}. \tag*{(16)}

Both stages must finish, so every overlap schedule takes at least max⁡(R,L)+P\max(R,L)+P. Thus,

SSync≤R+L+Pmax⁡(R,L)+P≤2.(17)S_{\mathrm{Sync}}\le\frac{R+L+P}{\max(R,L)+P}\le2. \tag*{(17)}

Reaching 2×2\times requires equal stage times, a negligible suffix, and no learner tail. Equal stage times maximize the ideal overlap opportunity; the actual peak can shift when a nonzero tail remains.

How work release determines the tail

Write u=t/Ru=t/R for time as a fraction of the rollout window. Let F−(u)F^{-}(u) be the fraction of learner service released strictly before uRuR:

F−(u)=1L∑τj<uRpj.(18)F^{-}(u)=\frac{1}{L}\sum_{\tau_j<uR}p_j. \tag*{(18)}

This fraction weights each job by its service time. Counting ready jobs alone is insufficient when late trajectories also require more learning. At a release time, L[1−F−(u)]L[1-F^{-}(u)] includes the newly released jobs and all later jobs. Equation (15) therefore gives

1+λK=max⁡{1,sup⁡0≤u≤1[u+ρ(1−F−(u))]}.(19)1+\lambda_K=\max\left\{1,\sup_{0\le u\le1}\left[u+\rho\left(1-F^{-}(u)\right)\right]\right\}. \tag*{(19)}

The strict-before convention includes the service of jobs released at the same instant. Replacing it with an inclusive fraction would omit those jobs at their release time.

The maximum lag behind uniform service release is D=sup⁡0≤u≤1[u−F−(u)]D=\sup_{0\le u\le1}[u-F^{-}(u)]; any trace satisfies

[ρ−1]+≤λK≤[ρ−1]++ρD,λK=Dwhen ρ=1.(20)[\rho-1]_+\le\lambda_K\le[\rho-1]_++\rho D,\qquad\lambda_K=D\quad\text{when }\rho=1. \tag*{(20)}

To obtain the upper bound, write the expression inside the supremum in Equation (19), minus one, as (ρ−1)(1−u)+ρ[u−F−(u)](\rho-1)(1-u)+\rho[u-F^{-}(u)]. Its first term is at most [ρ−1]+[\rho-1]_+ and its second at most ρD\rho D. The lower bound follows from the need to process all LL service. At balance, the first term vanishes, so the tail equals the release lag.

GRPO. The plotted model assumes independent trajectory completion times U∼Uniform⁡(0,1)U\sim\operatorname{Uniform}(0,1) and conditional mean learner service proportional to UγU^\gamma, with γ≥0\gamma\ge0. The fraction of service associated with trajectories completed by uu is then

H(u)=∫0utγ dt∫01tγ dt=uγ+1.(21)H(u)=\frac{\int_0^u t^\gamma\,\mathrm{d}t}{\int_0^1 t^\gamma\,\mathrm{d}t}=u^{\gamma+1}. \tag*{(21)}

A fraction 1−β1-\beta of service is ready at each trajectory’s reward; the rest, β\beta, waits for all mm trajectories in the group. By independence, all other members finish with probability um−1u^{m-1}, giving

FGRPO(u)=(1−β)uγ+1+βuγ+m.(22)F_{\mathrm{GRPO}}(u)=(1-\beta)u^{\gamma+1}+\beta u^{\gamma+m}. \tag*{(22)}

Substituting this continuous release model into Equation (19) gives the plotted tail. If ρ[γ+1+β(m−1)]≤1\rho[\gamma+1+\beta(m-1)]\le1, it is zero. Otherwise an interior maximum, when present, satisfies

(1−β)(γ+1)uγ+β(γ+m)uγ+m−1=1ρ.(23)(1-\beta)(\gamma+1)u^\gamma+\beta(\gamma+m)u^{\gamma+m-1}=\frac{1}{\rho}. \tag*{(23)}

The endpoint values cover the boundary cases. Turn count does not appear after ρ\rho, mm, β\beta, and the normalized completion and service distribution are fixed. This explains the flat GRPO surface under these conditions; changing trajectory length in a real workload can change those inputs.

OPD. For a trajectory completed at UU, model aa equal-service turns with teacher-scored releases at jU/ajU/a, j=1,…,aj = 1,\ldots,a. Let δ\delta be the fraction of learner service deferred to trajectory completion. Block jj is ready by uu when U≤au/jU \le au/j. Weighting by the same service model UγU^\gamma gives

FOPD(u)=1−δa∑j=1amin⁡(1,auj)γ+1+δuγ+1.(24)F_{\mathrm{OPD}}(u) = \frac{1-\delta}{a}\sum_{j=1}^{a}\min\left(1,\frac{au}{j}\right)^{\gamma+1}+\delta u^{\gamma+1}. \tag*{(24)}

Each turn can release work before its trajectory closes, including for late trajectories with large learner service. When δ=1\delta= 1, all work waits for trajectory completion. For δ=0\delta= 0 and a→∞a \to\infty, the release fraction tends to u(1+1/γ)−uγ+1/γu(1+1/\gamma)-u^{\gamma+1}/\gamma for γ>0\gamma> 0, and to u(1−log⁡u)u(1-\log u) for γ=0\gamma= 0, with value zero at u=0u = 0. These functions are at least uu on [0,1][0,1], so D=0D = 0 and the tail reaches its minimum [ρ−1]+[\rho-1]_+. For finite horizons, deferred work and the actual spacing of teacher scores determine how much of this benefit is realized.

Batch size and successive rollout waves

Let one full rollout wave take time WW, with learner service ρwW\rho_w W and normalized tail λw\lambda_w. Consider ww identical full waves launched successively at intervals of WW, followed by one final suffix PP; write κw=P/W\kappa_w = P/W. A job released at normalized time uu within wave ii has all later waves’ service behind it. Its candidate completion time, divided by WW, is

(i−1)+u+ρw[1−F−(u)]+ρw(w−i).(25)(i-1)+u+\rho_w[1-F^-(u)]+\rho_w(w-i). \tag*{(25)}

Maximizing over ii selects the last wave when ρw≤1\rho_w \le1 and the first when ρw>1\rho_w > 1. After also including rollout completion, the resulting speedup is

SSync(w)=w(1+ρw)+κwwmax⁡(1,ρw)+κw−[ρw−1]++λw.(26)S_{\mathrm{Sync}}(w)=\frac{w(1+\rho_w)+\kappa_w}{w\max(1,\rho_w)+\kappa_w-[\rho_w-1]_++\lambda_w}. \tag*{(26)}

At balance this becomes (2w+κw)/(w+κw+λw)(2w+\kappa_w)/(w+\kappa_w+\lambda_w). The final tail and suffix remain fixed while the overlapped work grows, so the ratio approaches two. Away from balance, the limit is (1+ρw)/max⁡(1,ρw)(1+\rho_w)/\max(1,\rho_w). These statements assume repeated full waves. Continuous refill and partially occupied waves require either their actual release trace in Equation (19) or an explicit approximation.

Finite batches and model limitations

Equation (19) is exact for a finite trace under the lane assumptions. The plotted surfaces replace that trace by a continuous release distribution. If two release distributions differ by at most ϵ\epsilon at every time, their normalized endpoints differ by at most ρϵ\rho\epsilon: their expressions inside the supremum differ pointwise by at most that amount, and taking a supremum and a maximum preserves this bound:

∣λ(F,ρ)−λ(G,ρ)∣≤ρsup⁡u∣F(u)−G(u)∣.(27)\left|\lambda(F,\rho)-\lambda(G,\rho)\right|\le\rho\sup_u\left|F(u)-G(u)\right|. \tag*{(27)}

For example, nn equal-service atoms placed at the midpoint quantiles of a continuous distribution have discrepancy at most 1/(2n)1/(2n) and tail error at most ρ/(2n)\rho/(2n). Random finite batches need a bound for their sampling process. At fixed RR and LL, replacing a random release distribution by its mean is optimistic for completion time: the endpoint is a maximum of affine functions of the release distribution and hence convex, so its expected value is at least the endpoint of the mean distribution.

For statically assigned learner queues, apply the recurrence separately to each rank and take the latest completion. A pooled service rate can miss a slow rank. Memory pressure that delays admission, packing that waits for additional sources, unequal turn costs, teacher delays, or readiness-dependent learner service must also be reflected in the trace. If concurrent rollout changes kernel service or methods execute different physical work, the prediction uses service times measured under those conditions.

Figure parameters and comparison with measurements

The workload-scaling experiments were run separately to analyze overlap, with a trajectory-capacity setting of Q=128Q = 128. Their batch sizes, horizons, and GPU allocations are independent of the reference learning-curve configuration in Appendix § 9; QQ is not the reference vLLM replica’s active-sequence limit.

Figure 7b, Figure 9, and Figure 10 evaluate Equations (22), (24), and (26). For these analytical sweeps, we fix rollout capacity Q=128Q = 128 trajectories, GRPO group size m=8m = 8, closure fraction β=0.02\beta= 0.02, OPD deferred fraction δ=0.45\delta= 0.45, service exponent γ=0.49\gamma= 0.49, and suffix κw=0.05\kappa_w = 0.05.

Speedup surfaces for GRPO and OPD

Figure 9. Speedup over Sync as a function of the rollout-to-training time ratio and agentic turns per trajectory, at fixed trajectories per optimizer step (256 to 2048), for GRPO (top) and OPD (bottom).

Speedup over Sync as a function of the rollout-to-training time ratio and trajectories per optimizer step, at fixed agentic turns per trajectory (10 to 300), for GRPO (top) and OPD (bottom).

Figure 10. Speedup over Sync as a function of the rollout-to-training time ratio and trajectories per optimizer step, at fixed agentic turns per trajectory (10 to 300), for GRPO (top) and OPD (bottom).

Let BB denote trajectories per optimizer step and rr the rollout time divided by learner time at full capacity. The plotting approximation uses

w=max⁡(1,B/Q),ρw=min⁡(1,B/Q)r.(28)w = \max(1, B/Q), \qquad\rho_w = \frac{\min(1, B/Q)}{r}. \tag*{(28)}

Figure 7b fixes r=1r = 1. For B<QB < Q, the model keeps one rollout window and reduces learner service in proportion to occupancy. For noninteger B/Q>1B/Q > 1, it extends the full-wave formula continuously. These approximations extend the full-wave model to partial occupancy. The ratio sweeps vary rr; their actual speedup peak need not be exactly at one.

Figure 8 compares the analytical surfaces with measured release traces and wall-clock speedups. We evaluated 588 paired configurations, 294 per objective. At 40 turns, the batch grid is B∈{64,96,128,192,256,384,512,768,1024,1536,2048}B \in\{64, 96, 128, 192, 256, 384, 512, 768, 1024, 1536, 2048\}; at B=512B = 512, the horizon grid is a∈{10,15,20,30,40,60,100,150,200,300}a \in\{10, 15, 20, 30, 40, 60, 100, 150, 200, 300\}. Each grid point uses seven nominal rollout-to-learner ratios {0.35,0.5,0.7,1,1.4,2,2.8}\{0.35, 0.5, 0.7, 1, 1.4, 2, 2.8\} and two repetitions, giving 11×7×2=15411 \times7 \times2 = 154 and 10×7×2=14010 \times7 \times2 = 140 configurations. The plotted ratio uses the measured stage times for the selected GPU allocation, rather than the ratio of GPU counts. The horizon sweep varies the turn limit up to 300; its turn limit and resulting context lengths are recorded separately from the learning-curve runs.

Each configuration has an analytical prediction sis_i, a trace prediction oio_i (open marker), and a measured wall-clock speedup fif_i (filled marker). We computed oio_i by replaying the observed source readiness and service times through Equation (14). The ratio fif_i compares Sync and ThunderSync with the same model, logical workload, GPU roles, precision, and generation settings within the cell. These controls hold within a configuration even when the allocation changes between cells.

The reported differences are computed for each paired configuration as

ei=100∣oi−si∣si,di=100oi−fioi.(29)e_i = 100\frac{\lvert o_i - s_i\rvert}{s_i}, \qquad d_i = 100\frac{o_i - f_i}{o_i}. \tag*{(29)}

Across both objectives and both rows, the mean of eie_i is 1.5911% and its maximum is 10.5541%; the mean of did_i is 6.5148%. The main text rounds these to 1.6%, 10.6%, and 6.5%. The first difference measures the release model’s agreement with the trace prediction; the second measures the remaining gap to runtime execution. The common optimizer and publication suffix is already present through κw\kappa_w, so the second difference does not represent the entire publication cost.

Trace collection and calibration. We recorded a manifest for each objective, model, batch, horizon, and integer GPU allocation, including tensor/data parallelism, teacher allocation, environment concurrency, and memory limits. Sync and ThunderSync executed the same logical workload within each cell. The measured RR, LL, and PP then determine the cell’s time ratio, so each ratio reflects measured service rates.

Each trace records a source’s task, trajectory, group, policy version, learner rank, readiness time, service start/end, scored-token count, and deferred-work completion. GRPO readiness is receipt of the required reward; OPD readiness is receipt of valid teacher scores. Device events measure service, while a shared host clock records arrival and publication acknowledgements. Replay uses both τj\tau_j and pjp_j in Equation (14), with separate queues for statically assigned ranks. Teacher waiting and deferred backward stay in the trace. We calibrated release-law parameters on separate traces and held them fixed for evaluation. Profiling windows follow Appendix § 7; missing or infeasible cells are reported explicitly.

Balance sweeps

Figures 9 and 10 sweep the rollout-to-learner ratio rr from 0.3 to 4 with the parameters of Appendix F.5. Both figures are analytical evaluations of Equation (26); they contain no measured points. Figure 9 fixes the batch size and varies the horizon, and Figure 10 fixes the horizon and varies the batch size.

For batches that fill at least one rollout wave (B≥QB \ge Q), every panel peaks near balance, r≈1r \approx1. There, the predicted speedup is 1.84× for GRPO at 256 trajectories per step and 1.98× at 2,048; OPD reaches 1.97 to 1.98× at 256 and 2.00× at 2,048. Away from balance, the larger stage bounds the step, and the speedup falls toward the full-overlap limit (1+ρw)/max⁡(1,ρw)(1 + \rho_{\mathrm{w}})/\max(1,\rho_{\mathrm{w}}) of Appendix F.3, which is symmetric in log rr. For B≥QB \ge Q, halving or doubling the ratio caps the speedup near 1.5× (1.46 to 1.50×), r=0.35r = 0.35 or 2.8 gives 1.34 to 1.36×, and r=4r = 4 gives 1.24 to 1.25×, for both objectives. Below one full wave, the plotting rule scales learner service by B/QB/Q, so balance moves to r≈B/Qr \approx B/Q: at B=64B = 64 the peak sits near r=0.5r = 0.5, with 1.71× for GRPO and 1.95× for OPD. This bends the bright band toward smaller ratios at the bottom of Figure 10.

The horizon matters only near balance. GRPO’s surface does not change with turn count, as Appendix F.2 explains. For OPD, more turns spread releases and shorten the tail, but at 256 trajectories per step the speedup at r=1r = 1 moves only from 1.967× at 10 turns to 1.975× at 300 turns. Batch size has the larger effect: more waves amortize the final tail and suffix, which is why the bright band at r≈1r \approx1 widens as trajectories per step grow in Figure 10.

Empirical update equivalence

We verify the equivalence of § 3.4 on the B200 and H200 nodes of Appendix D, comparing the updates of Sync and ThunderSync on identical logical batches.

Protocol. For each objective, we record ten consecutive logical batches of a Qwen-3.8-27B Sync run, including tokens, scored-token masks, rewards, and teacher scores, and replay them under Sync and ThunderSync from the same initial parameters θ0\theta_0. ThunderSync ingests trajectories and scored turns in their recorded completion order. Replaying fixed batches isolates the learner computation. Both schedules use the optimizer settings of Table 5 and run twice: with the BF16 student forward used in training and with an FP32 forward as the reference. We compare the first batch direction g0g_0 before clipping, coordinate by coordinate, and after each update kk report the parameter gap

Δk=∥θkours−θksync∥∥θksync−θ0∥(30)\Delta_k = \frac{\lVert\theta_k^{\mathrm{ours}} - \theta_k^{\mathrm{sync}} \rVert}{\lVert\theta_k^{\mathrm{sync}} - \theta_0 \rVert} \tag*{(30)}

the distance between the two schedules relative to the distance that training has moved the parameters.

Results. Figure 11 and Figure 12 show the same result on both GPU types. In FP32, the ThunderSync and Sync gradients coincide coordinate by coordinate (panels a and d), with relative errors of 5.1×10−75.1 \times10^{-7} for GRPO and 1.1×10−61.1 \times10^{-6} for OPD on B200. In BF16, both schedules stay within a few percent of the FP32 gradient (panels b and e): relative errors are 0.77% for Sync and 0.96% for ThunderSync under GRPO, and 4.2% and 1.2% under OPD, where Sync’s BF16 error is larger. Across ten updates, the FP32 parameter gap stays below 6×10−56 \times10^{-5}, nearly three orders of magnitude below the gap between BF16 and FP32 Sync, and the BF16 gap between the schedules follows that same BF16 curve (panels c and f). ThunderSync reproduces the batch-synchronous update at every step within the numerical precision of training.

Figure 11. Update equivalence on B200 for GRPO (top row) and OPD (bottom row). (a, d) Each point is one randomly sampled coordinate of the first batch direction g0g_0 with FP32 arithmetic, ThunderSync against Sync. (b, e) Both schedules with BF16 arithmetic against the FP32 Sync direction. (c, f) Parameter gap Δk\Delta_k (Equation (30)) after each of ten replayed updates, with the gap between BF16 and FP32 Sync as reference. Dashed diagonals mark equality.

Six-panel comparison of Sync and ThunderSync gradients and parameter gaps for GRPO and OPD on H200Vector (PDF)

Panel (a) FP32: identical gradients. GRPO. Sync gradient; ThunderSync gradient. cosine = 1 − 1.2e-13; rel. error = 4.96e-07.

Panel (b) BF16 vs FP32 gradient. GRPO. FP32 Sync gradient; BF16 gradient. Sync (BF16), rel. error 0.00777; ThunderSync (BF16), rel. error 0.00958.

Panel (c) Parameter gap per update. GRPO. Update kk (replayed rollouts). Sync: BF16 vs FP32; BF16: ThunderSync vs Sync; FP32: ThunderSync vs Sync. ∥θkours−θksync∥/∥θksync∥\lVert\theta_k^{\mathrm{ours}}-\theta_k^{\mathrm{sync}}\rVert/\lVert\theta_k^{\mathrm{sync}}\rVert.

Panel (d) FP32: identical gradients. OPD. Sync gradient (×10−3\times10^{-3}); ThunderSync gradient (×10−3\times10^{-3}). cosine = 1 − 8.0e-13; rel. error = 1.26e-06.

Panel (e) BF16 vs FP32 gradient. OPD. FP32 Sync gradient (×10−3\times10^{-3}); BF16 gradient (×10−3\times10^{-3}). Sync (BF16), rel. error 0.0416; ThunderSync (BF16), rel. error 0.0117.

Panel (f) Parameter gap per update. OPD. Update kk (replayed rollouts). Sync: BF16 vs FP32; BF16: ThunderSync vs Sync; FP32: ThunderSync vs Sync. ∥θkours−θksync∥/∥θksync∥\lVert\theta_k^{\mathrm{ours}}-\theta_k^{\mathrm{sync}}\rVert/\lVert\theta_k^{\mathrm{sync}}\rVert.

Figure 12. Update equivalence on H200, with panels as in Figure 11.

Binary-reward clipped-PPO extension. We extend the replay comparison to the clipped PPO surrogate with binary rewards, including subsequent minibatch updates and repeated optimization epochs. Both schedules use identical rollout data, behavior log-probabilities, minibatch order, and initial model and optimizer states. Gradients are recomputed at each update, and the comparison includes later updates with active surrogate clipping. We compare gradient directions before global norm clipping and parameter gaps after each optimizer step, following the definitions above. In the FP32 replay, the maximum gradient relative error is 2.1×10−62.1 \times10^{-6} and the maximum normalized parameter gap is 6.4×10−56.4 \times10^{-5}. If confirmed experimentally, these results would support update equivalence within numerical precision for the tested binary-reward clipped-PPO extension, including updates where the learner differs from the behavior policy.

Further Experimental Results

Pass@1 and Pass@5

Pass@kk is the fraction of tasks solved at least once in kk independent attempts. Following Chen et al. [6], we estimate it from n≥kn \ge k attempts per task: if cic_i of the nn attempts on task ii succeed,

pass⁡@k=100M∑i=1M(1−(n−cik)(nk)),(31)\operatorname{pass}@k = \frac{100}{M} \sum_{i=1}^{M} \left(1 - \frac{\binom{n-c_i}{k}}{\binom{n}{k}}\right), \tag*{(31)}

which is unbiased for the probability that at least one of kk attempts succeeds. Pass@1 is the mean attempt success rate. With n=kn = k the estimator reduces to the empirical rate of tasks solved at least once, the form of pass@3 in Equation (13).

For this appendix, each evaluated checkpoint runs five independent attempts per task (n=5n = 5), from which both pass@1 and pass@5 are computed; the other settings follow Table 6, and attempts restart the environment and agent history as in Appendix § 10. Figure 13 and Figure 14 report pass@1 and pass@5 against training cost for Qwen-3.8-27B and GLM-4.7-Flash-31B under GRPO and OPD, in the form of Figure 1. Pass@1 scores a single attempt; pass@5 credits a task solved in any of the five.

Figure 13. Pass@1 (left two panels) and pass@5 (right two panels) on SWE-bench Verified against training cost for Qwen-3.8-27B and GLM-4.7-Flash-31B under GRPO (top row) and OPD (bottom row). Arrows mark where ThunderSync reaches the score of a Sync checkpoint; labels give the cost ratio.

Figure 14. Pass@1 (left two panels) and pass@5 (right two panels) on Terminal Bench 4.0 against training cost for Qwen-3.8-27B and GLM-4.7-Flash-31B under GRPO (top row) and OPD (bottom row). Arrows mark where ThunderSync reaches the score of a Sync checkpoint; labels give the cost ratio.

Efficiency with LoRA

We profiled the Qwen and GLM LoRA configurations on eight B200 GPUs (Table 7). Each configuration uses four learner GPUs, replicated BF16 frozen weights, FP32 adapter state, and the objective-specific rollout and teacher allocation in Appendix § 9.

For Sync, Async, and ThunderSync, LoRA retains the efficiency ordering of full fine-tuning. ThunderSync reaches 16.7% to 33.0% trainer active MFU, slightly above Async’s 16.5% to 32.6% and above Sync’s 10.3% to 19.5%. Its step wall time speedups are 1.69/1.71×\times for Qwen and 1.64/1.62×\times for GLM under GRPO/OPD, compared with Async’s 1.67/1.69×\times and 1.62/1.60×\times, respectively. ThunderSync retains zero policy lag in every configuration.

For Qwen, the speedups are smaller than under full fine-tuning; for GLM, whose step is already bound by rollout, they barely change. Freezing base weights removes their parameter-gradient and optimizer work, reducing the learner work available to overlap with rollout and teacher scoring. Forward and input-gradient computation through those weights remains necessary. Trainer active MFU counts learner FLOPs over the complete update wall time, including rollout waiting. It therefore reflects both the reduced learner work under LoRA and the idle time remaining after overlap.

For these three schedules, trainer GPU memory is lower with LoRA than with full fine-tuning. ThunderSync’s GPU peaks range from 75.0 to 79.2 GB per learner GPU, with an additional 1.9 to 3.8 GB relative to Sync for live gradient statistics and deferred state. The measurements include frozen weights, adapter and optimizer state, activations, and temporary buffers; the separate rollout and teacher pools are excluded. The GLM teacher and adapter targets are specified in Appendix § 9.§ 3.

ThunderSync algorithm and implementation

Algorithm 1 summarizes one ThunderSync update. The rollout and learner threads run concurrently at the fixed policy snapshot θk\theta_k. For GRPO, a ready source contains a trajectory’s scored action tokens and reward. For OPD, it contains a turn’s scored action tokens and frozen-teacher scores. Completion events release deferred context backward and group reduction once their dependencies are satisfied. The implementations below give the objective-specific normalization and optimizer conventions.

Algorithm 1 ThunderSync: gradient streaming with a synchronous update

  1. Input: Policy πθk\pi_{\theta_k}, batch Bk\mathcal{B}_k, objective oo, frozen teacher πT\pi_T for OPD

  2. Output: Updated θk+1\theta_{k+1}, acknowledged by every rollout replica

  3. Q←Queue⁡();\mathcal{Q} \leftarrow\operatorname{Queue}(); register all trajectories and groups in Bk\mathcal{B}_k

  4. Initialize objective accumulators A\mathcal{A}; keep θk\theta_k fixed

  5. Thread 1: Rollout and supervision (producer)

  6. for all trajectories i∈Bki \in\mathcal{B}_k in parallel do

  7. Generate with πθk\pi_{\theta_k}; enqueue ready sources and completion events as they occur

  8. end for

  9. Thread 2: Learner (consumer)

  10. while a registered trajectory or group remains unfinished do

  11. e←Q.pop⁡()e \leftarrow\mathcal{Q}.\operatorname{pop}() (Wait for the next available event)

  12. if ee is a GRPO trajectory source ii in group G\mathcal{G} then

  13. Hi←∇θSi(θ)∣θ=θkH_i \leftarrow\nabla_{\theta} S_i(\theta)|_{\theta=\theta_k}

  14. GG(1)←GG(1)+riHiG_{\mathcal{G}}^{(1)} \leftarrow G_{\mathcal{G}}^{(1)} + r_i H_i; GG(2)←GG(2)+HiG_{\mathcal{G}}^{(2)} \leftarrow G_{\mathcal{G}}^{(2)} + H_i

  15. else if ee is an OPD turn source jj then

  16. Accumulate gjg_j and ∣Mj∣|\mathcal{M}_j| in A\mathcal{A} (Equation (8))

  17. end if

  18. Update completion state; finish eligible group reductions and deferred backward

  19. end while

  20. Synchronous batch barrier

  21. Wait for all rollouts, source gradients, and deferred work in Bk\mathcal{B}_k to finish

  22. g^k←DistributedReduceAndNormalize⁡(A,o)\hat{g}_k \leftarrow\operatorname{DistributedReduceAndNormalize}(\mathcal{A}, o)

  23. θk+1←Opt⁡(θk,clip⁡(g^k))\theta_{k+1} \leftarrow\operatorname{Opt}(\theta_k,\operatorname{clip}(\hat{g}_k)) (Exactly one optimizer step)

  24. Publish θk+1\theta_{k+1}; wait for every replica to reload, clear caches, and acknowledge

  25. return θk+1\theta_{k+1}

Shared-prefix backward in all schedules. Sync, Async, and ThunderSync all reuse shared-prefix computation on the learner. Training-time prefix reuse has earlier applications in preference optimization [43] and in branching agent trajectories [44]. At a fixed learner snapshot, we compute the shared prefix once, process each continuation with its causal context, and accumulate its gradient with respect to the prefix boundary states. After all branch contributions are available, one backward pass through the shared prefix propagates their sum, with the objective’s weights and normalization preserved. For GRPO, the reward-weighted and unweighted boundary contributions are combined when the group rewards are fixed.

For OPD, teacher-scored turns contribute boundary gradients before the final token normalization. This is a common learner optimization in the comparison, distinct from vLLM’s inference-time prefix cache. ThunderSync admits eligible branch work earlier; shared-prefix backward remains part of each schedule’s measured learner work and update time.

The following Python-style pseudocode describes one logical update of ThunderSync. Rollout workers and the learner use the same fixed policy version throughout the update. Each learner rank processes its assigned groups. Helpers represent model execution, gradient storage, and distributed collectives. publish_and_wait publishes the updated parameters and waits for every rollout replica to load them, clear policy-dependent caches, and acknowledge the new version.

GRPO

Implementation 1 shows reward-ready admission and the decomposition in Equation (7). The source gradient can also be prepared when content is complete and bound to its reward later. Gradient arithmetic includes any captured boundary adjoints; finish_group_backward propagates their combined contribution through deferred context. The code applies the sum of group directions, gk=∑GgGg_k = \sum_G g_G, as in § 3.4; the token weights in Appendix § 9 make this sum the mean over the trajectory-normalized directions.

def thundersync_grpo_step(model, rollout, batch, optimizer, eps, max_norm):
    """One reward-linear GRPO epoch; optimizer has maximize=True."""
    params = trainable_parameters(model)
    version = rollout.policy_version
    groups = register_groups(batch)  # Sizes, rewards, zero G1/G2 buffers
    batch_grad = zeros_like(params)
    optimizer.zero_grad(set_to_none=True)

    # 1. Start learner work while other trajectories are still running.
    for src in rollout.reward_ready_sources(batch, version):
        assert src.policy_version == version
        group = groups[src.group_id]
        logp = rebuild_scored_logprobs(model, src)  # Fixed action mask
        score = (src.token_weights * logp).sum()
        H = backward_with_boundary_capture(score, params)

    # 2. Fold each completed source once into its group statistics.
    group.G1 += src.reward * H
    group.G2 += H
    group.rewards.append(src.reward)
    group.num_reduced += 1

    # 3. Combine only after every reward and source gradient arrives.
    if group.num_reduced == group.size:
        r = torch.tensor(group.rewards, dtype=torch.float64)
        mu, sigma = r.mean(), r.std(unbiased=False)
        update = (group.G1 - mu * group.G2) / (group.size * (sigma + eps))
        batch_grad += finish_group_backward(group, update)
        group.close()

    # 4. Complete the logical batch before any parameter mutation.
    rollout.wait_batch_closed(batch)
    assert all(group.closed for group in groups.values())
    wait_for_all_backward_and_reduction_work()
    global_grad = all_reduce_sum(batch_grad)  # Sum of group directions
    write_parameter_grads(params, global_grad)
    torch.nn.utils.clip_grad_norm_(params, max_norm)
    optimizer.step()  # Exactly one ascent step at the batch barrier
    optimizer.zero_grad(set_to_none=True)

    # 5. The next rollout batch starts only after every replica ACKs.
    rollout.publish_and_wait(model, version + 1)
    return version + 1

Implementation 1. ThunderSync GRPO update. Each trajectory releases its score gradient independently; group closure fixes the reward coefficients. The optimizer uses gradient ascent.

On-policy distillation

Implementation 2 follows the turn-level OPD path. Each teacher score uses the sampled action’s realized causal context; scoring may run upstream of the learner, but is shown inline here. The detached student log probabilities come from the same policy snapshot, so the importance ratio equals one while retaining its derivative. The loss gradient is the negative of Equation (8). Turn backward captures adjoints at cut state boundaries; trajectory and group closure propagate the remaining adjoints before the batch update. The final sum divided by the global scored-token count is equivalent to the runner’s rescaling followed by a data-parallel average.

def thundersync_opd_step(student, teacher, rollout, batch, optimizer, max_norm):
    """One token-mean OPD update; teacher is frozen, optimizer descends."""
    params = trainable_parameters(student)
    version = rollout.policy_version
    groups = register_groups(batch)
    token_count = 0
    optimizer.zero_grad(set_to_none=True)

    # 1. Ingest turns as rollout workers generate actions and call tools.
    for event in rollout.turn_and_completion_events(batch, version):
        assert event.policy_version == version
        group = groups[event.group_id]
        if event.kind == "turn":
            with torch.no_grad():
                teacher_lp = teacher.score_action_tokens(event)
            logp = append_turn_and_get_scored_logprobs(student, event)
            if logp.numel() == 0:  # Unscored context still updates state
                continue
            old_logp = logp.detach()  # Same fixed student snapshot
            advantage = (teacher_lp - old_logp).detach()
            ratio = torch.exp(logp - old_logp)
            loss = -(ratio * advantage).sum()

            # 2. Backward now; retain adjoints needed by earlier context.
            backward_with_boundary_capture(loss, params)
            token_count += logp.numel()

        elif event.kind == "trajectory_complete":
            # 3. Replay deferred state adjoints through completed turns.
            replay_deferred_state_adjoints(event.trajectory_id)
            group.close_trajectory(event.trajectory_id)
            if group.all_trajectories_closed():
                finish_shared_prefix_backward(group)
            group.close()

    # 4. All turns, replay work, and registered groups must be complete.
    rollout.wait_batch_closed(batch)
    assert all(group.closed for group in groups.values())
    wait_for_all_backward_and_reduction_work()
    local_grad = materialize_parameter_grads(params)
    global_grad = all_reduce_sum(local_grad)
    global_tokens = all_reduce_sum(token_count)
    assert global_tokens > 0
    write_parameter_grads(params, global_grad / global_tokens)
    torch.nn.utils.clip_grad_norm_(params, max_norm)
    optimizer.step()  # Exactly one descent step at the batch barrier
    optimizer.zero_grad(set_to_none=True)

    # 5. Publish the new policy before admitting the next logical batch.
    rollout.publish_and_wait(student, version + 1)
    return version + 1

Implementation 2. ThunderSync on-policy distillation update. Teacher-scored turns release backward immediately. Deferred context gradients and global token normalization finish before one optimizer step.

References

  1. [1]Rishabh Agarwal, Nino Vieillard, Yongchao Zhou, Piotr Stanczyk, Sabela Ramos Garea, Matthieu Geist, and Olivier Bachem. “On-Policy Distillation of Language Models: Learning from Self-Generated Mistakes”. In: The Twelfth International Conference on Learning Representations. 2024.arxiv.org/abs/2306.13649
  2. [3]Shiyi Cao, Sumanth Hegde, Dacheng Li, Tyler Griggs, Shu Liu, Eric Tang, Jiayi Pan, Xingyao Wang, Akshay Malik, Graham Neubig, Kourosh Hakhamaneshi, Richard Liaw, Philipp Moritz, Matei Zaharia, Joseph E. Gonzalez, and Ion Stoica. SkyRL-v0: Train Real-World Long-Horizon Agents via Reinforcement Learning. 2025.
  3. [4]Rongjian Chen, Jianmin Hu, Kejiang Ye, and Minxian Xu. “RolloutPipe: Overlapping Pipelined Rollout and Training in Disaggregated On-Policy LLM Reinforcement Learning”. In: arXiv preprint arXiv:2606.26997 (2026).arxiv.org/abs/2606.26997
  4. [5]Mingyang Chen, Linzhuang Sun, Tianpeng Li, Haoze Sun, Yijie Zhou, Chenzheng Zhu, Haofen Wang, Jeff Z. Pan, Wen Zhang, Huajun Chen, Fan Yang, Zenan Zhou, and Weipeng Chen. “ReSearch: Learning to Reason with Search for LLMs via Reinforcement Learning”. In: Advances in Neural Information Processing Systems. 2025, pp. 85287–85307.arxiv.org/abs/2503.19470
  5. [6]Mark Chen, Jerry Tworek, Heewoo Jun, Qiming Yuan, Henrique Ponde de Oliveira Pinto, Jared Kaplan, Harri Edwards, Yuri Burda, Nicholas Joseph, Greg Brockman, et al. “Evaluating Large Language Models Trained on Code”. In: arXiv preprint arXiv:2107.03374 (2021).arxiv.org/abs/2107.03374
  6. [7]Kaiwen Chen, Xin Tan, Jingzong Li, Zhi Zhou, Cen Li, Jiang Liu, Meng Jie, Jiazhi Jiang, and Hong Xu. “Libra: Efficient Resource Management for Agentic RL Post-Training”. In: arXiv preprint arXiv:2606.03077 (2026).arxiv.org/abs/2606.03077
  7. [8]Yifeng Ding, Hung Le, Songyang Han, Kangrui Ruan, Zhenghui Jin, Varun Kumar, Zijian Wang, and Anoop Deoras. “Empowering Multi-Turn Tool-Integrated Agentic Reasoning with Group Turn Policy Optimization”. In: Proceedings of the 64th Annual Meeting of the Association for Computational Linguistics. 2026, pp. 42409–42423.
  8. [9]Lasse Espeholt, Hubert Soyer, Remi Munos, Karen Simonyan, Volodymyr Mnih, Tom Ward, Yotam Doron, Vlad Firoiu, Tim Harley, Iain Dunning, Shane Legg, and Koray Kavukcuoglu. “IMPALA: Scalable Distributed Deep-RL with Importance Weighted Actor-Learner Architectures”. In: Proceedings of the 35th International Conference on Machine Learning. 2018, pp. 1407–1416.arxiv.org/abs/1802.01561
  9. [10]Wei Fu, Jiaxuan Gao, Xujie Shen, Chen Zhu, Zhiyu Mei, Chuyi He, Shusheng Xu, Guo Wei, Jun Mei, Jiashu Wang, et al. “AReaL: A large-scale asynchronous reinforcement learning system for language reasoning”. In: Advances in Neural Information Processing Systems. 2025, pp. 36256–36282.arxiv.org/abs/2505.24298
  10. [11]Jiazhan Feng, Shijue Huang, Xingwei Qu, Ge Zhang, Yujia Qin, Baoquan Zhong, Chengquan Jiang, Jinxin Chi, and Wanjun Zhong. “ReTool: Reinforcement Learning for Strategic Tool Use in LLMs”. In: International Conference on Learning Representations. 2026, pp. 37909–37926.arxiv.org/abs/2504.11536
  11. [12]Anna Goldie, Azalia Mirhoseini, Hao Zhou, Irene Cai, and Christopher D Manning. “Synthetic Data Generation and Multi-Step Reinforcement Learning for Reasoning and Tool Use”. In: Second Conference on Language Modeling. 2025.
  12. [13]Wei Gao, Yuheng Zhao, Dakai An, Tianyuan Wu, Lunxi Cao, Shaopan Xiong, Ju Huang, Weixun Wang, Siran Yang, Wenbo Su, Jiamang Wang, Lin Qu, Bo Zheng, and Wei Wang. “RollPacker: Mitigating Long-Tail Rollouts for Fast, Synchronous RL Post-Training”. In: arXiv preprint arXiv:2509.21009 (2025).arxiv.org/abs/2509.21009
  13. [14]Jonas Gehring, Kunhao Zheng, Jade Copet, Vegard Mella, Taco Cohen, and Gabriel Synnaeve. “RLEF: Grounding Code LLMs in Execution Feedback with Reinforcement Learning”. In: Forty-second International Conference on Machine Learning. 2025.arxiv.org/abs/2410.02089
  14. [15]GLM Team, Aohan Zeng, Xin Lv, Qinkai Zheng, Zhenyu Hou, Bin Chen, Chengxing Xie, Cunxiang Wang, Da Yin, Hao Zeng, Jiajie Zhang, et al. “GLM-4.5: Agentic, Reasoning, and Coding (ARC) Foundation Models”. In: arXiv preprint arXiv:2508.06471 (2025).
  15. [16]Zhenyu Hou, Yujiang Li, Jie Tang, and Yuxiao Dong. “Single-Rollout Asynchronous Optimization for Agentic Reinforcement Learning”. In: arXiv preprint arXiv:2607.07508 (2026).arxiv.org/abs/2607.07508
  16. [17]Zhengding Hu, Hehua Ouyang, Chang Chen, Zaifeng Pan, Yue Guan, Zhongkai Yu, Zhen Wang, Steven Swanson, and Yufei Ding. “JigsawRL: Assembling RL Pipelines for Efficient LLM Post-Training”. In: arXiv preprint arXiv:2604.23838 (2026).arxiv.org/abs/2604.23838
  17. [18]Jian Hu, Xibin Wu, Wei Shen, Jason Klein Liu, Weixun Wang, Songlin Jiang, Haoran Wang, Hao Chen, Bin Chen, Wenkai Fang, et al. “OpenRLHF: A ray-based easy-to-use, scalable and high-performance rlhf framework”. In: Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing: System Demonstrations. 2025, pp. 656–666.DOI
  18. [19]Zhenyu Han, Ansheng You, Haibo Wang, Kui Luo, Guang Yang, Wenqi Shi, Menglong Chen, Sicheng Zhang, Zeshun Lan, Chunshi Deng, Huazhong Ji, Wenjie Liu, Yu Huang, Yixiang Zhang, Chenyi Pan, Jing Wang, Xin Huang, Chunsheng Li, and Jianping Wu. “AsyncFlow: An Asynchronous Streaming RL Framework for Efficient LLM Post-Training”. In: arXiv preprint arXiv:2507.01663 (2026).arxiv.org/abs/2507.01663
  19. [20]Dongfu Jiang, Yi Lu, Zhuofeng Li, Zhiheng Lyu, Ping Nie, Haozhe Wang, Alex Su, Hui Chen, Kai Zou, Chao Du, Tianyu Pang, and Wenhu Chen. “VerlTool: Towards Holistic Agentic Reinforcement Learning with Tool Use”. In: Transactions on Machine Learning Research (2026).arxiv.org/abs/2509.01055
  20. [21]Carlos E. Jimenez, John Yang, Alexander Wettig, Shunyu Yao, Kexin Pei, Ofir Press, and Karthik Narasimhan. “SWE-bench: Can Language Models Resolve Real-world GitHub Issues?” In: International Conference on Learning Representations. 2024, pp. 54107–54157.arxiv.org/abs/2310.06770
  21. [22]Bowen Jin, Hansi Zeng, Zhenrui Yue, Jinsung Yoon, Sercan O Arik, Dong Wang, Hamed Zamani, and Jiawei Han. “Search-R1: Training LLMs to Reason and Leverage Search Engines with Reinforcement Learning”. In: Second Conference on Language Modeling. 2025.arxiv.org/abs/2503.09516
  22. [23]Hangoo Kang, Tarun Suresh, Jon Saad-Falcon, and Azalia Mirhoseini. “TRACE: Capability-Targeted Agentic Training”. In: arXiv preprint arXiv:2604.05336 (2026).arxiv.org/abs/2604.05336
  23. [24]Zhiwei Li, Yong Hu, and Wenqing Wang. “Encouraging Good Processes Without the Need for Good Answers: Reinforcement Learning for LLM Agent Planning”. In: Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing: Industry Track. 2025, pp. 1654–1666.arxiv.org/abs/2508.19598
  24. [25]Xufang Luo, Yuge Zhang, Zhiyuan He, Zilong Wang, Siyun Zhao, Dongsheng Li, Luna K. Qiu, and Yuqing Yang. “Agent Lightning: Train ANY AI Agents with Reinforcement Learning”. In: arXiv preprint arXiv:2508.03680 (2025).arxiv.org/abs/2508.03680
  25. [26]Zhiyu Mei, Wei Fu, Kaiwei Li, Guangju Wang, Huanchen Zhang, and Yi Wu. “ReaL: Efficient RLHF Training of Large Language Models with Parameter Reallocation”. In: Proceedings of Machine Learning and Systems. 2025.arxiv.org/abs/2406.14088
  26. [29]Alexandre Piché, Ehsan Kamalloo, Rafael Pardinas, Xiaoyin Chen, and Dzmitry Bahdanau. “PipelineRL: Faster On-Policy Reinforcement Learning for Long Sequence Generation”. In: arXiv preprint arXiv:2509.19128 (2025).arxiv.org/abs/2509.19128
  27. [30]Jiayi Pan, Xingyao Wang, Graham Neubig, Navdeep Jaitly, Heng Ji, Alane Suhr, and Yizhe Zhang. “Training Software Engineering Agents and Verifiers with SWE-Gym”. In: Forty-second International Conference on Machine Learning. 2025.arxiv.org/abs/2412.21139
  28. [31]Cheng Qian, Emre Can Acikgoz, Qi He, Hongru Wang, Xiusi Chen, Dilek Hakkani-Tur, Gokhan Tur, and Heng Ji. “Toolrl: Reward is all tool learning needs”. In: Advances in Neural Information Processing Systems. 2025, pp. 105523–105553.arxiv.org/abs/2504.13958
  29. [32]Ruoyu Qin, Weiran He, Weixiao Huang, Yangkun Zhang, Yikai Zhao, Bo Pang, Xinran Xu, Yingdi Shan, Yongwei Wu, and Mingxing Zhang. “Seer: Online Context Learning for Fast Synchronous LLM Reinforcement Learning”. In: 20th USENIX Symposium on Operating Systems Design and Implementation (OSDI 26). 2026, pp. 883–901.arxiv.org/abs/2511.14617
  30. [33]Zehan Qi, Xiao Liu, Iat Long Iong, Hanyu Lai, Xueqiao Sun, Jiadai Sun, Xinyue Yang, Yu Yang, Shuntian Yao, Wei Xu, Jie Tang, and Yuxiao Dong. “WebRL: Training LLM Web Agents via Self-Evolving Online Curriculum Reinforcement Learning”. In: International Conference on Learning Representations. 2025, pp. 79791–79821.arxiv.org/abs/2411.02337
  31. [34]Qwen Team. Qwen3.8-27B. https://huggingface.co/Qwen/Qwen3.8-27B. Hugging Face model card. Aug. 2026.
  32. [35]Qwen Team. Qwen3.8-Max: A New Bar for Coding and Cowork. https://qwen.ai/blog?id=qwen3.8. Aug. 2026.
  33. [36]Yanyu Ren, Xizheng Wang, Xiao Liu, Bowen Lv, Hanchen Zhang, Shudan Zhang, Hanyu Lai, Shuai Wang, Li Chen, Dan Li, and Jie Tang. “TideRL: Boosting Agentic RL Goodput with Readiness-Aware Scheduling”. In: arXiv preprint arXiv:2608.10402 (2026).arxiv.org/abs/2608.10402
  34. [37]Qijia Shen, Zhiqi Huang, Vamsidhar Kamanuru, Aznaur Aliev, Jay Rainton, Ahmed Awelkair, Zhichen Zeng, Jiajun Li, Shi Dong, Yueming Yuan, Boyuan Ma, Qizheng Zhang, Jiwei Fu, Yuzhen Mao, Wendong Fan, Ping Nie, Philip Torr, Bernard Ghanem, Changran Hu, Jonathan Lingjie Li, Urmish Thakker, and Guohao Li. “SETA: Scaling Environments for Terminal Agents”. In: arXiv preprint arXiv:2607.10891 (2026).arxiv.org/abs/2607.10891
  35. [38]Michael Sullivan, Mareike Hartmann, and Alexander Koller. “Procedural Environment Generation for Tool-Use Agents”. In: Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing. 2025, pp. 18544–18562.
  36. [39]Huatong Song, Jinhao Jiang, Yingqian Min, Jie Chen, Zhipeng Chen, Wayne Xin Zhao, Lei Fang, and Ji-Rong Wen. “R1-Searcher: Incentivizing the Search Capability in LLMs via Reinforcement Learning”. In: arXiv preprint arXiv:2503.05592 (2025).arxiv.org/abs/2503.05592
  37. [40]Zhihong Shao, Peiyi Wang, Qihao Zhu, Runxin Xu, Junxiao Song, Xiao Bi, Haowei Zhang, Mingchuan Zhang, Y. K. Li, Y. Wu, and Daya Guo. “DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models”. In: arXiv preprint arXiv:2402.03300 (2024).arxiv.org/abs/2402.03300
  38. [41]Guangming Sheng, Chi Zhang, Zilingfeng Ye, Xibin Wu, Wang Zhang, Ru Zhang, Yanghua Peng, Haibin Lin, and Chuan Wu. “HybridFlow: A Flexible and Efficient RLHF Framework”. In: Proceedings of the Twentieth European Conference on Computer Systems. 2025, pp. 1279–1297.DOI
  39. [43]Franklin Wang and Sumanth Hegde. “Accelerating Direct Preference Optimization with Prefix Sharing”. In: NeurIPS 2024 Workshop on Fine-Tuning in Modern Machine Learning: Principles and Scalability. 2024.arxiv.org/abs/2410.20305
  40. [44]Jinghui Wang, Shaojie Wang, Yinghan Cui, Xuxing Chen, Chao Wang, Liang Huang, Can Tang, Xiaojiang Zhang, Junyi Peng, Li Wan, Haotian Zhang, and Bin Chen. “Tree Training: Accelerating Agentic LLMs Training via Shared Prefix Reuse”. In: arXiv preprint arXiv:2511.00413 (2026).arxiv.org/abs/2511.00413
  41. [45]Bo Wu, Sid Wang, Yunhao Tang, Jia Ding, Eryk Helenowski, Liang Tan, Tengyu Xu, Tushar Gowda, Zhengxing Chen, Chen Zhu, Xiaocheng Tang, Yundi Qian, Beibei Zhu, and Rui Hou. “LlamaRL: A Distributed Asynchronous Reinforcement Learning Framework for Efficient Large-Scale LLM Training”. In: arXiv preprint arXiv:2505.24034 (2025).arxiv.org/abs/2505.24034
  42. [46]Zihan Wang, Kangrui Wang, Qineng Wang, Pingyue Zhang, Linjie Li, Zhengyuan Yang, Xing Jin, Kefan Yu, Minh Nhat Nguyen, Licheng Liu, Eli Gottlieb, Yiping Lu, Kyunghyun Cho, Jiajun Wu, Fei-Fei Li, Lijuan Wang, Yejin Choi, and Manling Li. “RAGEN: Understanding Self-Evolution in LLM Agents via Multi-Turn Reinforcement Learning”. In: arXiv preprint arXiv:2504.20073 (2025).arxiv.org/abs/2504.20073
  43. [47]Zhepei Wei, Wenlin Yao, Yao Liu, Weizhi Zhang, Qin Lu, Liang Qiu, Changlong Yu, Puyang Xu, Chao Zhang, Bing Yin, Hyokun Yun, and Lihong Li. “WebAgent-R1: Training Web Agents via End-to-End Multi-Turn Reinforcement Learning”. In: Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing. 2025, pp. 7909–7928.arxiv.org/abs/2505.16421
  44. [48]Ryan Xu, Atlas Zhao, David Bao, and Frank Du. “WAR: Workload-Aware Rollouts for Synchronous Agentic Reinforcement Learning”. In: arXiv preprint arXiv:2607.17299 (2026).arxiv.org/abs/2607.17299
  45. [49]Zhewei Yao, Reza Yazdani Aminabadi, Olatunji Ruwase, Samyam Rajbhandari, Xiaoxia Wu, Ammar Ahmad Awan, Jeff Rasley, Minjia Zhang, Conglong Li, Connor Holmes, Zhongzhu Zhou, Michael Wyatt, Molly Smith, Lev Kurilenko, Heyang Qin, Masahiro Tanaka, Shuai Che, Shua iwen Leon Song, and Yuxiong He. “DeepSpeed-Chat: Easy, Fast and Affordable RLHF Training of ChatGPT-like Models at All Scales”. In: arXiv preprint arXiv:2308.01320 (2023).arxiv.org/abs/2308.01320
  46. [50]John Yang, Kilian Lieret, Carlos E. Jimenez, Alexander Wettig, Kabir Khandpur, Yanzhe Zhang, Binyuan Hui, Ofir Press, Ludwig Schmidt, and Diyi Yang. “SWE-smith: Scaling Data for Software Engineering Agents”. In: Advances in Neural Information Processing Systems. 2025, pp. 107402–107452.arxiv.org/abs/2504.21798
  47. [51]Z.ai. GLM-4.7-Flash. https://huggingface.co/zai-org/GLM-4.7-Flash. Hugging Face model card. Jan. 2026.
  48. [52]Yuxiang Zheng, Dayuan Fu, Xiangkun Hu, Xiaojie Cai, Lyumanshan Ye, Pengrui Lu, and Pengfei Liu. “DeepResearcher: Scaling Deep Research via Reinforcement Learning in Real-World Environments”. In: Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing. 2025, pp. 414–431.arxiv.org/abs/2504.03160
  49. [53]Yuzhen Zhou, Jiajun Li, Yusheng Su, Gowtham Ramesh, Zilin Zhu, Xiang Long, Chenyang Zhao, Jin Pan, Xiaodong Yu, Ze Wang, Kangrui Du, Jialian Wu, Ximeng Sun, Jiang Liu, Qiaolin Yu, Hao Chen, Zicheng Liu, and Emad Barsoum. “APRIL: Active Partial Rollouts in Reinforcement Learning to Tame Long-tail Generation”. In: arXiv preprint arXiv:2509.18521 (2025).arxiv.org/abs/2509.18521

Paper details

vlnc:W_b9ztqsvp
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents