Create and explore imaginative 3D worlds with our new product Dreamfield (opens in a new tab)
Papers
Topics
Authors
Recent
Search
2000 character limit reached

ThunderSyncRL (Reinforcement Learning) | Overview

Updated 9 October 2026
  • ThunderSyncRL is a lossless, readiness-driven system that allows asynchronous computation without sacrificing policy equality in agentic reinforcement learning. This is achieved by merging logical synchronization with readiness synchronization at the required inputs' point of availability, thereby reducing learner idleness while preserving data integrity.
  • The system separates readiness synchronization from policy synchronization, ensuring that learners compute gradients as soon as inputs are available, optimizing overall system efficiency.
  • The practical significance of ThunderSyncRL has been demonstrated with performance gains of between 1.63× and 1.94×. This was especially notable in retaining policy equality, reduces GPU hours for training, and shows a significant drop in wait time between steps for ThunderSyncRL compared to synchronous learning systems.
  • Follow_up_questions_for_uknowledge-user”: What specific workload types can benefit the most from ThunderSyncRL? How does ThunderSyncRL handle diverse reward and teacher scoring in agentic RL systems? Is batch completion dependent on path-dominated workloads in ThunderSyncRL? How does ThunderSyncRL address memory pressure issues in agentic RL systems? What are the major trade-offs in implementing ThunderSyncRL compared to fully asynchronous training systems and their significance for performance and stability? Find recent papers about agentic reinforcement learning for reinforcement Learning training.

ThunderSyncRL is a lossless, readiness-driven training system for agentic reinforcement learning that overlaps rollout, verification, and learner computation without introducing policy staleness. It preserves the semantics of batch-synchronous Group Relative Policy Optimization (GRPO) and on-policy distillation (OPD) while launching gradient computation as soon as the mathematical inputs for an individual trajectory or agentic turn become available. The system separates asynchronous execution from synchronous parameter updates: all contributions for logical update kk are evaluated under one fixed policy πθk\pi_{\theta_k}, accumulated exactly, globally reduced, clipped, and followed by a single optimizer step and policy publication (Kang et al., 5 Oct 2026).

1. Motivation and design position

Agentic RL workloads are dominated by long-horizon, heterogeneous trajectories. A LLM may generate an action, invoke a tool, wait for sandbox execution, receive an observation, and continue through multiple turns. Rollout duration and reward or teacher-score availability consequently exhibit substantial variability.

Conventional synchronous training follows the sequence

roll out all trajectories→obtain all rewards or teacher scores→train→publish the next policy.\text{roll out all trajectories} \rightarrow \text{obtain all rewards or teacher scores} \rightarrow \text{train} \rightarrow \text{publish the next policy}.

This preserves a single policy snapshot and a well-defined logical batch, but learner engines remain idle until rollout-side dependencies close. The reported synchronous GRPO/OPD configuration left learner GPUs idle for 49.5%49.5\% of a step while waiting for rollout and verification.

Fully asynchronous training overlaps rollout and learning across policy versions. Its principal cost is policy staleness: trajectories may be generated by πθk−1\pi_{\theta_{k-1}} or older policies while the learner updates θk\theta_k. This changes the data distribution and can require importance weighting, clipping, filtering, lag control, or other off-policy corrections.

ThunderSyncRL occupies an intermediate position. Execution is asynchronous, but policy updates remain synchronous. For logical batch Bk\mathcal B_k, every trajectory is generated under one fixed policy πθk\pi_{\theta_k}, and every learner computation is evaluated at θk\theta_k. The system begins independent learner work as soon as its objective inputs are fixed, while deferring only reductions or normalizations that mathematically require information from the complete logical batch.

The resulting distinction is between readiness synchronization and policy synchronization. Readiness synchronization determines when a local gradient contribution may be computed; policy synchronization occurs only after the complete logical update has been reduced and applied.

2. Readiness-driven execution model

A logical batch contains independently executable objective sources. A source may be a reward-ready GRPO trajectory or a teacher-scored OPD turn. Let source jj become ready at time πθk\pi_{\theta_k}0 and require πθk\pi_{\theta_k}1 time to execute. On a single learner lane, the completion recursion is

πθk\pi_{\theta_k}2

If πθk\pi_{\theta_k}3 is the time at which all rollout-side dependencies close, πθk\pi_{\theta_k}4 is the completion time of learner work, and πθk\pi_{\theta_k}5 is the final reduction, optimizer, and publication suffix, ThunderSyncRL has step time

πθk\pi_{\theta_k}6

Synchronous training instead performs all learner work after rollout completion:

πθk\pi_{\theta_k}7

The scheduler maintains a work-conserving readiness queue subject to memory and per-rank admission limits. Completion order affects execution order, not logical batch membership. Learner engines can therefore process short or early-completing sources while longer tool calls, trajectories, or verification tasks remain active.

Writing πθk\pi_{\theta_k}8, the synchronous duration is

πθk\pi_{\theta_k}9

If roll out all trajectories→obtain all rewards or teacher scores→train→publish the next policy.\text{roll out all trajectories} \rightarrow \text{obtain all rewards or teacher scores} \rightarrow \text{train} \rightarrow \text{publish the next policy}.0 denotes the learner tail after rollout closure, the ThunderSyncRL duration can be written as

roll out all trajectories→obtain all rewards or teacher scores→train→publish the next policy.\text{roll out all trajectories} \rightarrow \text{obtain all rewards or teacher scores} \rightarrow \text{train} \rightarrow \text{publish the next policy}.1

The corresponding speedup is

roll out all trajectories→obtain all rewards or teacher scores→train→publish the next policy.\text{roll out all trajectories} \rightarrow \text{obtain all rewards or teacher scores} \rightarrow \text{train} \rightarrow \text{publish the next policy}.2

The ideal ceiling is

roll out all trajectories→obtain all rewards or teacher scores→train→publish the next policy.\text{roll out all trajectories} \rightarrow \text{obtain all rewards or teacher scores} \rightarrow \text{train} \rightarrow \text{publish the next policy}.3

Thus, the largest gains arise when rollout and learner workloads are comparable, learner work becomes available early, and the final reduction and publication suffix is small. When nearly all learner work is released only at batch completion, or one stage dominates the critical path, the attainable gain approaches the ordinary pipeline limit.

The system uses a policy-version barrier at the logical-update level. Rollout workers execute with policy version roll out all trajectories→obtain all rewards or teacher scores→train→publish the next policy.\text{roll out all trajectories} \rightarrow \text{obtain all rewards or teacher scores} \rightarrow \text{train} \rightarrow \text{publish the next policy}.4; only after all registered sources, deferred computations, global reduction, clipping, and the optimizer step complete is roll out all trajectories→obtain all rewards or teacher scores→train→publish the next policy.\text{roll out all trajectories} \rightarrow \text{obtain all rewards or teacher scores} \rightarrow \text{train} \rightarrow \text{publish the next policy}.5 published.

3. GRPO gradient streaming

Batch-synchronous GRPO formulation

For a prompt, GRPO samples a group

roll out all trajectories→obtain all rewards or teacher scores→train→publish the next policy.\text{roll out all trajectories} \rightarrow \text{obtain all rewards or teacher scores} \rightarrow \text{train} \rightarrow \text{publish the next policy}.6

of roll out all trajectories→obtain all rewards or teacher scores→train→publish the next policy.\text{roll out all trajectories} \rightarrow \text{obtain all rewards or teacher scores} \rightarrow \text{train} \rightarrow \text{publish the next policy}.7 trajectories. Trajectory roll out all trajectories→obtain all rewards or teacher scores→train→publish the next policy.\text{roll out all trajectories} \rightarrow \text{obtain all rewards or teacher scores} \rightarrow \text{train} \rightarrow \text{publish the next policy}.8 has reward roll out all trajectories→obtain all rewards or teacher scores→train→publish the next policy.\text{roll out all trajectories} \rightarrow \text{obtain all rewards or teacher scores} \rightarrow \text{train} \rightarrow \text{publish the next policy}.9, action-token set 49.5%49.5\%0, and masked policy score

49.5%49.5\%1

Its trajectory score gradient, evaluated at the fixed rollout policy, is

49.5%49.5\%2

Group-relative normalization uses

49.5%49.5\%3

and

49.5%49.5\%4

With detached advantages, the group gradient is

49.5%49.5\%5

The reference setting uses groups of 49.5%49.5\%6, population rather than unbiased standard deviation, and 49.5%49.5\%7. With 32 prompts and eight trajectories per prompt, one logical update contains 256 trajectories.

Sufficient-statistics decomposition

The coefficient multiplying 49.5%49.5\%8 cannot be finalized until all group rewards are available. The score gradient 49.5%49.5\%9, however, depends only on trajectory πθk−1\pi_{\theta_{k-1}}0 and the fixed policy πθk−1\pi_{\theta_{k-1}}1. ThunderSyncRL therefore accumulates two group-level sufficient statistics:

πθk−1\pi_{\theta_{k-1}}2

The group gradient can be expressed as

πθk−1\pi_{\theta_{k-1}}3

For each reward-ready trajectory, the learner performs

πθk−1\pi_{\theta_{k-1}}4

πθk−1\pi_{\theta_{k-1}}5

When the final group member arrives, ThunderSyncRL computes πθk−1\pi_{\theta_{k-1}}6 and πθk−1\pi_{\theta_{k-1}}7, forms the exact group gradient, and completes deferred backward propagation through shared prefixes or captured boundary states. The logical-batch gradient is then

πθk−1\pi_{\theta_{k-1}}8

The equality follows from

πθk−1\pi_{\theta_{k-1}}9

Consequently, the order in which trajectory gradients are computed does not change the mathematical result. ThunderSyncRL does not estimate group statistics prematurely and does not apply approximate advantages.

Conditions for losslessness

Lossless equivalence to batch-synchronous GRPO requires:

  1. all trajectories in a logical update originate from the same policy θk\theta_k0;
  2. gradients are evaluated at unchanged parameters θk\theta_k1;
  3. group membership is fixed;
  4. rewards, masks, token weights, and causal contexts are fixed;
  5. advantages are detached;
  6. accumulation uses the same reduction and normalization convention;
  7. only one optimizer step occurs after batch closure;
  8. clipping and optimizer-state updates occur after the complete gradient is formed.

Zero-variance groups remain in the batch but contribute zero policy gradient under the stated stabilization convention.

4. OPD gradient streaming

On-policy distillation generates trajectories with a student policy while a frozen teacher scores the student’s sampled action tokens. Agentic execution has the form

θk\theta_k2

For turn θk\theta_k3, let θk\theta_k4 denote its scored action tokens. The detached teacher-student log-probability difference is

θk\theta_k5

The turn contribution is

θk\theta_k6

The batch OPD direction is token-normalized:

θk\theta_k7

Once a turn’s sampled tokens and causal context are complete, the frozen teacher can score them and ThunderSyncRL can begin the student backward pass. That backward computation overlaps with sandbox execution of the current turn, generation of later turns, rollout of other trajectories, and teacher scoring of other turns.

Because θk\theta_k8 is unknown until logical-batch closure, ThunderSyncRL accumulates unnormalized contributions and token counts:

θk\theta_k9

This is equivalent to forming the batch token-mean loss first and differentiating it because the denominator is independent of Bk\mathcal B_k0. Deferred state-adjoint propagation through earlier shared context is completed before the optimizer barrier.

Unlike GRPO, OPD has no group reward normalization. This makes turn-level streaming more direct: teacher-scored turns constitute independently executable objective sources once their causal histories are fixed.

5. System architecture and synchronization barriers

ThunderSyncRL comprises several cooperating subsystems:

  • Rollout workers run vLLM with policy version Bk\mathcal B_k1 and generate trajectories or agentic turns.
  • Environment and tool workers execute shell commands, sandbox calls, and other external operations.
  • Reward or teacher-scoring workers produce GRPO rewards or OPD token scores.
  • A readiness queue carries trajectory, turn, reward, and scoring-completion events.
  • Learner engines consume ready sources and accumulate gradients.
  • A logical-batch barrier waits for registered trajectories, groups, and deferred backward work.
  • A distributed reduction stage performs global gradient reduction, objective-specific normalization, clipping, and one optimizer step.
  • A policy-publication stage publishes the new version, invalidates policy-dependent caches, and waits for rollout acknowledgements before the next logical update.

The reference system uses four learner GPUs. GRPO uses four additional rollout GPUs; OPD uses two rollout GPUs and two teacher GPUs. Gradients and some GRPO statistics are accumulated in FP32 host memory. An admission cap limits the number of simultaneously open groups to control memory.

The principal synchronization barrier is therefore not the start of learner computation. It is the point at which the system must guarantee that all contributions required for the exact logical update are present. Earlier execution remains asynchronous, but the optimizer step and policy publication remain globally ordered.

ThunderSyncRL can also reuse shared-prefix computation. Branch-specific continuations are processed independently, while boundary adjoints are accumulated and propagated through shared prefixes once all relevant contributions are available. This reduces redundant learner work in agentic trajectories with common context.

The method is not equivalent to asynchronous optimization. It does not apply optimizer updates as individual trajectories or turns arrive. It does not change the active policy while a logical batch is being accumulated, and it does not rely on stale trajectories to hide learner latency.

6. Evaluation, performance, and limitations

Experimental configuration

The principal experiments use:

  • students Qwen-3.8-27B and GLM-4.7-Flash-31B;
  • SWE-smith and SETA-Env training data;
  • SWE-bench Verified with 500 tasks;
  • Terminal Bench 4.0 with 66 tasks;
  • one node with eight NVIDIA B200 GPUs, with Qwen experiments also on eight H200 GPUs;
  • GRPO batches of 32 prompts and eight trajectories per prompt, totaling 256 trajectories;
  • OPD batches of 32 prompts and four trajectories per prompt, totaling 128 trajectories;
  • a maximum of 300 turns and 1,024 generated tokens per turn;
  • AdamW with learning rate Bk\mathcal B_k2;
  • one optimizer step per batch;
  • global norm clipping of Bk\mathcal B_k3;
  • seeds 42, 43, and 44.

The comparison includes:

  • Sync, which waits for the complete rollout batch before learning;
  • Async, with approximately one-update policy lag;
  • Fully Async, in which rollout weights may change while trajectories remain in flight.

Reported results

On SWE-bench Verified, ThunderSyncRL reached the same pass@3 target as synchronous training up to Bk\mathcal B_k4 faster under both GRPO and OPD. For GRPO, a Bk\mathcal B_k5 target was reached at:

Bk\mathcal B_k6

for ThunderSyncRL compared with

Bk\mathcal B_k7

for Sync.

On Terminal Bench 4.0, the reported speedups were Bk\mathcal B_k8 for GRPO and Bk\mathcal B_k9 for OPD.

At a fixed 128-GPU-hour budget, ThunderSyncRL exceeded Async by the following margins:

Evaluation GRPO OPD
SWE-bench Verified πθk\pi_{\theta_k}0 points πθk\pi_{\theta_k}1 points
Terminal Bench 4.0 πθk\pi_{\theta_k}2 points πθk\pi_{\theta_k}3 points

Measured Qwen/B200 step times were approximately:

  • GRPO: Sync, πθk\pi_{\theta_k}4 seconds; ThunderSyncRL, πθk\pi_{\theta_k}5 seconds; speedup πθk\pi_{\theta_k}6.
  • OPD: Sync, πθk\pi_{\theta_k}7 seconds; ThunderSyncRL, πθk\pi_{\theta_k}8 seconds; speedup πθk\pi_{\theta_k}9.

Rollout and verification required approximately 650–660 seconds in both configurations. Sync then added approximately 646–656 seconds of learner work, whereas ThunderSyncRL left only a small final learner tail.

For Qwen on H200, speedups were θk\theta_k0 for GRPO and θk\theta_k1 for OPD. For GLM, whose learner was relatively short and rollout-bound, speedups were θk\theta_k2 and θk\theta_k3. LoRA preserved the ordering but reduced available learner work, producing Qwen speedups of θk\theta_k4 and θk\theta_k5.

Exact-update replay experiments on B200 and H200 found that streamed and synchronous gradients matched coordinate by coordinate in FP32, with relative errors of θk\theta_k6 for GRPO and θk\theta_k7 for OPD on B200. Across ten updates, the FP32 parameter gap remained below θk\theta_k8.

Limitations

ThunderSyncRL applies when an objective can be decomposed into ready local contributions plus delayed sufficient statistics. Direct application becomes difficult when:

  • a source depends on future trajectories or a global statistic that cannot be represented compactly;
  • rewards or teacher scores can change after learner computation begins;
  • the policy changes before all gradients for the logical batch are finalized;
  • gradients are clipped or normalized independently per source;
  • optimizer steps occur before batch closure;
  • exact bitwise equality requires a particular floating-point reduction order;
  • memory pressure delays readiness work;
  • shared-prefix or recurrent-state dependencies require future information;
  • variable denominators are applied before their final values are known.

Losslessness should be distinguished from bitwise identity. Mathematical equality follows from the sufficient-statistics decomposition, but finite-precision accumulation, distributed reduction order, BF16 arithmetic, and kernel choices can produce small numerical differences. The reported replay experiments found these differences far below ordinary BF16-versus-FP32 variation.

The principal systems trade-off is memory. Early backward execution requires live gradient accumulators, deferred adjoints, and GRPO group statistics. The benefit is largest when rollout and learner workloads are comparable, trajectories are heterogeneous, and objective dependencies resolve early, as in turn-level OPD. If one stage dominates or most work becomes ready only at batch completion, the performance advantage approaches the pipeline ceiling.

ThunderSyncRL therefore does not remove the logical synchronization requirement of policy optimization. It relocates synchronization to the mathematically necessary boundary: local computation begins at readiness, while normalization, reduction, clipping, optimizer state transition, and policy publication remain ordered. This dependency-aware separation provides a middle ground between rigid batch barriers and stale asynchronous RL.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to ThunderSyncRL.