ThunderSyncRL: Lossless Acceleration of Agentic Reinforcement Learning
Abstract: LLMs 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 ThunderSyncRL, which starts gradient computation as soon as all required inputs are fixed, without policy staleness. For group relative policy optimization (GRPO), ThunderSyncRL 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 faster than synchronous training. With zero policy staleness, ThunderSyncRL also outperforms asynchronous training at a fixed budget by up to $2.47$ percentage points.
Paper Prompts
Sign up for free to create and run prompts on this paper.
Explain it Like I'm 14
1. What is the paper about?
The paper introduces a new way to train AI agents called ThunderSyncRL.
AI agents are computer programs that can do many steps to complete a task. For example, a software agent might:
- Read a programming problem.
- Write some code.
- Run the code in a computer environment.
- Look at the result.
- Fix the code and try again.
Training these agents takes a lot of time because the computer must first let the agent complete its tasks before it can learn from what happened.
The paper’s main idea is simple:
Start learning from each completed part of a task as soon as possible, instead of waiting for every task to finish, while still making sure the AI learns from the correct version of itself.
The method tries to get the speed benefits of asynchronous training without changing the learning results or using outdated information.
2. What questions did the researchers investigate?
The researchers mainly wanted to answer these questions:
- Can training begin while other agent tasks are still running?
- Can this be done without using outdated versions of the AI’s policy?
- Can the method produce exactly the same learning update as ordinary, step-by-step training?
- How much faster is it than normal synchronous training?
- Does it perform better than other faster methods that allow some outdated information?
Here, a policy means the AI’s strategy for choosing actions. Policy staleness happens when an agent acts using an older version of the strategy while the trainer is already using a newer version.
An everyday analogy is a sports team practicing with an old rulebook while the coach is already teaching new rules. The team may still improve, but the training can become less consistent.
3. How did the researchers do it?
Normal training
In ordinary synchronous training, the process works like this:
- Several copies of the AI perform tasks.
- The system waits until all tasks are finished.
- It collects the rewards or feedback.
- The trainer updates the AI.
- The new version is sent out for the next round.
This is reliable, but it wastes time. Some AI copies may finish early while others take much longer, leaving the training computers idle.
The paper reports that learner GPUs were idle for about 49.5% of the training step in their synchronous experiments.
ThunderSyncRL’s approach
ThunderSyncRL uses gradient streaming. A gradient is a signal that tells the AI how its settings should change to perform better. It is similar to receiving advice about which parts of an answer were good or bad.
Instead of waiting for the entire batch of tasks, ThunderSyncRL does the following:
- It starts calculating learning signals whenever the needed information is ready.
- It stores these partial signals while other tasks continue.
- It waits until all required information has arrived before making the final update.
- It makes exactly one update using the same fixed version of the AI.
This means the calculations happen early, but the actual change to the AI happens only after the complete training batch is ready.
A useful analogy is preparing a group project. Each student can work on their section as soon as they finish collecting the needed information. However, the group still submits one final, complete project at the end.
Two training methods tested
The researchers tested ThunderSyncRL with two learning methods:
Group Relative Policy Optimization, or GRPO
The AI completes several attempts at the same type of task. Their rewards are compared with one another. An attempt that performs better than the group average receives a stronger positive learning signal.
ThunderSyncRL begins calculating the contribution from each completed attempt immediately. It uses a mathematical shortcut to combine these partial calculations later so that the final result is exactly the same as if everything had been calculated at once.
On-Policy Distillation, or OPD
In OPD, a stronger teacher model evaluates the actions of a student model. The student learns from the teacher’s behavior.
The researchers start the student’s learning calculation as soon as the teacher has evaluated one turn of the student’s work. This can happen while the agent is still using tools or waiting for the environment to respond.
Experiments and comparisons
The researchers trained LLMs to solve programming and computer-terminal tasks. They tested them on:
- SWE-bench Verified, which measures how well an AI can solve real software-engineering problems.
- Terminal Bench 4.0, which measures performance on computer-terminal tasks.
They compared four training schedules:
| Training method | How it works |
|---|---|
| Sync | Waits for the entire batch before learning |
| Async | Overlaps training and task generation but may use one-step-old information |
| Fully Async | Updates the AI while tasks are still happening, causing variable staleness |
| ThunderSyncRL | Starts calculations early but makes one synchronized update with no staleness |
The experiments used eight powerful GPUs and several LLMs, including Qwen-3.8-27B and GLM-4.7-Flash-31B.
4. What did they find?
It was almost twice as fast as normal synchronous training
ThunderSyncRL reduced the time needed for each training step by overlapping learning with task generation.
For the main Qwen model, it was approximately:
- 1.91 times faster with GRPO
- 1.94 times faster with OPD
The paper explains that the theoretical maximum speedup is close to 2 times when task generation and learning take about the same amount of time.
It reached the same performance using much less training time
On SWE-bench Verified, ThunderSyncRL reached the same pass@3 performance as synchronous training using up to 1.9 times less training cost.
For example, under GRPO:
- ThunderSyncRL reached a score of 74.01% using about 121.3 GPU-hours.
- Synchronous training needed about 233.5 GPU-hours.
A GPU-hour means using one GPU for one hour. Eight GPUs used for one hour equal eight GPU-hours.
It performed better than asynchronous methods at the same budget
With a fixed budget of 128 GPU-hours, ThunderSyncRL performed better than the regular asynchronous method.
Its advantage ranged from about 1.27 to 2.47 percentage points, depending on the task and training method.
This is important because the other asynchronous methods allowed policy staleness, while ThunderSyncRL did not.
It kept the same learning result as synchronous training
The mathematical analysis showed that the streamed calculations produce the same GRPO and OPD updates as batch-synchronous training.
In other words, ThunderSyncRL changes when calculations happen, but not what final update the AI receives.
This is one of the paper’s most important claims.
The cost was slightly more memory
ThunderSyncRL must store partial gradients and other information while waiting for the rest of the batch. As a result, it used somewhat more GPU memory.
For example, the Qwen GRPO setup used about:
- 117.0 GB per learner GPU with Sync
- 122.8 GB with ThunderSyncRL
So, the method saves time but may require extra memory.
5. Why are these results important?
Training AI agents can be extremely expensive. Much of the time, the computers are not doing useful learning work because they are waiting for long or unpredictable agent tasks to finish.
ThunderSyncRL reduces this wasted time by allowing useful calculations to happen earlier. At the same time, it avoids one major problem of fully asynchronous training: learning from actions produced by an outdated version of the AI.
This could allow researchers to:
- Train agentic AI more quickly.
- Test more ideas using the same amount of computing power.
- Reduce the cost of training software and terminal agents.
- Keep training results more stable and easier to compare.
- Improve AI systems without changing the learning objectives.
Conclusion
ThunderSyncRL is a scheduling method for training AI agents more efficiently. It lets the trainer start calculating learning information as soon as each part of an agent’s work is ready, while still waiting to make one careful update using the correct version of the AI.
The experiments showed that it can reach the same performance as ordinary synchronous training in about half the time, with speedups of up to 1.9 times. It also outperformed asynchronous methods that used older, stale versions of the AI.
The main limitation is that the method can need extra memory, and its benefits depend on the type of task and the balance between task generation and learning. Even so, the research suggests that smarter scheduling can make the training of powerful AI agents faster, cheaper, and more reliable.
Practical Applications
Immediate Applications
- Faster post-training of coding agents — software engineering and cloud AI
- Integrate gradient streaming into RL pipelines for repository-level coding agents trained with GRPO or OPD.
- A training system can begin backpropagation for each completed trajectory or agentic turn while other trajectories continue running, rather than waiting for the entire batch.
- This can reduce training time and GPU cost for systems that generate code, execute tests, inspect repositories, and iteratively repair software.
- Potential tools/workflows: a
ThunderSyncRLscheduler for frameworks such as Verl, SkyRL, vLLM-based training stacks, or custom actor–learner systems; per-trajectory reward queues; readiness-aware backward-pass workers; synchronous policy-publication barriers. - Evidence and feasibility: the paper reports up to approximately lower training cost for matched SWE-bench performance and higher pass@3 at a fixed GPU budget.
- Dependencies: the objective must permit exact decomposition into independently releasable gradient contributions; sufficient GPU, CPU, and host-memory capacity is needed to retain partial gradients and group statistics; the deployment environment must support fixed-policy rollouts until the optimizer barrier completes.
- More efficient training of terminal-use and tool-use agents — automation and developer platforms
- Apply turn-level OPD streaming to agents that invoke shells, browsers, APIs, databases, simulators, or external services.
- Once a teacher scores the action tokens of one turn, the student backward pass can proceed while the environment executes the next tool call.
- Potential products: internal tool-use agents, browser automation systems, command-line copilots, data-analysis agents, and enterprise workflow assistants trained with teacher demonstrations.
- Dependencies: teacher scoring must be available before or during subsequent environment interaction; tool calls must be isolated and reproducible enough for the resulting causal context to remain valid; safety-sensitive actions still require sandboxing and authorization.
- Reduced cost for reinforcement-learning infrastructure — cloud computing and AI platform operations
- Use the scheduler to improve utilization of separate rollout and learner GPU pools, particularly where rollout durations have a long tail.
- The method is especially useful when learner GPUs otherwise wait for slow trajectories or reward verification.
- Potential operational workflow: monitor rollout completion events, release eligible backward jobs to a work-conserving queue, accumulate sufficient statistics, and perform one globally synchronized update.
- Dependencies: benefits are largest when rollout and learner times are reasonably balanced and when trajectories have heterogeneous completion times. If one stage dominates, speedup will be lower than the reported near- upper bound.
- Zero-staleness alternatives to asynchronous RL training — reliable agent optimization
- Replace one-update-stale or fully asynchronous schedules in settings where policy consistency is important, while retaining much of their overlap.
- This is relevant to training agents whose rewards are sensitive to the exact policy version, such as code-repair agents, formal task solvers, and verifiable planning systems.
- Potential workflow: attach a policy-version identifier to every trajectory, reject or defer work from mismatched versions, and publish the next policy only after all gradients associated with the current logical batch are complete.
- Dependencies: the system must tolerate waiting at the final optimizer barrier; the extra synchronization and parameter-publication overhead must remain small relative to rollout and learner computation.
- Efficient LoRA or adapter training for specialized agents — enterprise customization
- Deploy the method for parameter-efficient post-training, where organizations customize an agent for internal repositories, terminal procedures, support workflows, or domain tools.
- Since adapter updates require fewer trainable parameters, gradient streaming can make repeated domain-specific training cycles more cost-effective.
- Potential products: organization-specific coding agents, operations copilots, and tool-use assistants trained from execution feedback.
- Dependencies: LoRA does not eliminate the need to propagate gradients through the frozen base model; memory savings and speedups depend on sequence length, model architecture, batch size, and GPU allocation.
- Academic experimentation with larger RL workloads — machine-learning research
- Use gradient streaming to fit more training updates or more trajectories into a fixed laboratory budget.
- Researchers can compare reward designs, prompting strategies, teacher models, tool interfaces, or curricula using the same compute allocation.
- Potential workflow: instrument experiments with wall-clock time, active MFU, policy lag, peak GPU memory, and matched-performance cost rather than reporting only final benchmark accuracy.
- Dependencies: the reported results were obtained on specific agentic software-engineering and terminal workloads, models, and GPU configurations. Independent validation is needed for other objectives, architectures, and environments.
- Scheduling and capacity planning for AI clusters — infrastructure management
- Use the paper’s readiness-time model to estimate whether increasing rollout capacity, learner capacity, batch size, or trajectory horizon will improve throughput.
- The model can guide resource allocation by comparing rollout duration, learner service time, final reduction time, and policy-publication overhead.
- Potential tool: a profiler that replays measured readiness traces and predicts step wall time under different GPU partitions.
- Dependencies: accurate duration distributions and service-time measurements are required; analytical predictions may diverge from wall-clock behavior because of communication, queuing, memory, and runtime overheads.
- Lower-cost training for interactive educational or personal assistants — daily-life-adjacent applications
- The method could reduce the cost of training agents that interact with calendars, files, educational tools, or productivity software through multiple turns.
- It is not itself a user-facing capability; its immediate value is making the training of such systems faster and cheaper.
- Dependencies: user data must be handled under appropriate privacy and consent controls, and tool interactions must be sandboxed to prevent unintended actions. The paper does not evaluate consumer assistants directly.
Long-Term Applications
- General-purpose infrastructure for agentic reinforcement learning
- Extend readiness-based gradient streaming beyond GRPO and OPD to objectives involving critics, reward models, preference optimization, hierarchical RL, multi-agent coordination, or verifier-based learning.
- A general framework could represent each objective as a dependency graph, releasing a gradient unit whenever all mathematically required inputs are fixed.
- Potential product: a compiler or runtime for agent-training objectives that automatically identifies dependency-safe streaming opportunities.
- Dependencies: each new objective requires a proof or rigorous validation that streamed accumulation is mathematically equivalent to the intended batch update, including normalization, clipping, advantage estimation, and shared-context gradients.
- Multi-node and frontier-scale training — distributed AI systems
- Scale the approach from an eight-GPU node to clusters with separate generation, environment, teacher, and learner services.
- Gradient fragments could be streamed across nodes and reduced at a global optimizer barrier while policy versions remain fixed.
- Dependencies: network bandwidth, collective communication latency, fault tolerance, reproducible ordering, checkpoint recovery, and the memory cost of accumulating partial gradients become central challenges. The paper identifies multi-node scaling as future work rather than demonstrating it.
- Adaptive memory-aware streaming schedulers — cluster operating systems
- Develop schedulers that decide whether to release a ready backward pass immediately or delay it based on GPU memory, host-memory pressure, remaining rollout time, and expected learner service time.
- This could trade off additional overlap against the memory increase caused by retaining partial gradients and deferred context state.
- Potential tool: a controller that dynamically changes per-rank admission caps and chooses trajectory- versus turn-level release granularity.
- Dependencies: reliable memory forecasting and preemption mechanisms are needed; overly aggressive admission can cause out-of-memory failures or reduce throughput through contention.
- Streaming training for robotics and embodied agents — robotics
- Apply the principle to robots or simulators that generate long, variable-duration trajectories.
- For example, a robot could begin processing a completed subtask, sensor segment, or teacher-scored action sequence while other simulated or physical rollouts continue.
- Potential applications: household robotics, warehouse manipulation, autonomous navigation, and multi-step industrial control.
- Dependencies: physical environments are less reproducible than software sandboxes; delayed or noisy rewards, safety constraints, real-time control requirements, and hardware-in-the-loop latency may prevent exact equivalence to a batch update.
- Scientific, engineering, and simulation agents — research automation
- Train agents that run experiments, query simulators, execute numerical workflows, or operate laboratory software with long-running tool calls.
- Turn-level streaming could use idle periods during simulation or instrument execution to process already-scored actions.
- Dependencies: simulations and experiments must expose reliable completion and reward events; failed or irreproducible runs require robust attribution and retry logic. Scientific validity cannot be inferred solely from faster training.
- Safety-preserving training of high-impact agents — healthcare, finance, and public-sector systems
- The zero-staleness property could support controlled training of agents where policy-version traceability and reproducibility are important.
- Examples include clinical workflow assistants, financial analysis agents, compliance systems, and public-service automation.
- Potential workflow: maintain immutable policy versions, auditable trajectory–reward associations, synchronized updates, and complete logs of gradient-source readiness.
- Dependencies: the paper establishes computational equivalence, not safety, fairness, reliability, or regulatory compliance. Domain-specific validation, human oversight, privacy protection, and certified evaluation remain necessary.
- Training-time carbon and energy reduction — sustainable AI
- If the same performance can be reached with fewer GPU-hours, gradient streaming could reduce electricity use, cooling demand, and associated operating costs.
- Cluster operators could combine it with carbon-aware scheduling to run agent-training workloads during lower-carbon energy periods.
- Dependencies: real energy savings depend on whether freed capacity is shut down, reassigned, or used for additional experiments. Faster wall-clock training does not automatically imply lower total energy consumption.
- Online or continually adapting agents — personalized systems
- A future extension could use dependency-aware updates for agents learning continuously from user interactions, tool outcomes, or verified task completions.
- The optimizer barrier and fixed-policy rollout rule could provide stronger version control than fully asynchronous continual learning.
- Dependencies: online deployment introduces non-stationary data, privacy risks, reward manipulation, catastrophic forgetting, rollback requirements, and the need to prevent unsafe updates. These issues are outside the paper’s experimental scope.
- Standardized benchmarking of training efficiency — academia and policy
- The paper’s emphasis on matched-performance cost, policy staleness, complete step wall time, peak memory, and active MFU could inform more meaningful reporting standards for agent-training systems.
- Benchmark reports could include both quality and resources required to reach a specified pass rate, rather than only the final score.
- Dependencies: measurements must use comparable hardware, workload sizes, evaluation budgets, warm-up procedures, and definitions of policy lag. Results from SWE-bench Verified and Terminal Bench should not be treated as universal evidence for all agentic tasks.
Glossary
- Activation checkpointing: A memory-saving technique that recomputes intermediate activations during backpropagation instead of storing them all. “Activation-checkpoint recomputation contributes to elapsed time without being credited as additional model FLOPs.”
- Advantage: A reinforcement-learning signal measuring how much better an action’s outcome is than a reference value. “GRPO samples a group of trajectories and normalizes their rewards within the group to obtain relative advantages.”
- Agentic turn: A single interaction cycle in which an agent produces an action and receives an observation. “Each trajectory is a sequence of agentic turns, where a turn contains a policy-generated action and the resulting environment or tool observation.”
- Actor-learner decoupling: Separating policy execution that generates experience from the learner process that updates the policy. “Building on actor-learner decoupling in distributed RL”
- Adapter parameters: Trainable parameters added to a pretrained model, typically through a parameter-efficient fine-tuning method such as LoRA. “publishes the resulting adapter or policy parameters to the rollout replicas.”
- Batch barrier: A synchronization point that prevents a subsequent stage from beginning until an entire batch has completed. “Conventional synchronous training places a batch barrier between these stages”
- Causal context: The preceding tokens and observations available when a LLM evaluates a particular action token. “the frozen teacher can score them using their realized causal context.”
- Chunked prefill: A language-model inference technique that processes long prompts in smaller chunks before token generation. “with the same chunked prefill and prefix caching settings.”
- Clipping: Restricting the magnitude of an optimization signal to improve numerical stability or control updates. “clips this direction and applies exactly one optimizer step”
- Deferred gradient propagation: Postponing part of backpropagation until required shared or contextual information becomes available. “We include deferred gradient propagation at trajectory or group closure as learner work with its own release time.”
- Detached advantage: An advantage value treated as a constant during differentiation so gradients do not flow through its computation. “The policy update weights each trajectory's scored action-token log probabilities by its detached advantage.”
- Disaggregated generation and training: Separating inference-based rollout generation from policy optimization, often across different resources or processes. “LlamaRL, AReaL, AsyncFlow, and StreamRL support disaggregated generation and training”
- Distributed reduction: Combining gradients or other numerical quantities across multiple devices or processes. “Distributed reduction and objective-specific normalization then produce the batch update direction”
- FLOPs: Floating-point operations, used as a measure of computational work. “Trainer active MFU divides learner FLOPs by the complete update wall time”
- Gradient accumulation: Collecting gradient contributions from multiple computations before applying an optimizer update. “gradients accumulate at”
- Gradient streaming: Computing and accumulating gradient contributions as soon as their individual dependencies are ready rather than waiting for a complete batch. “We introduce and gradient streaming, overlapping rollout and learner computation while preserving a synchronous optimizer step and zero policy staleness.”
- Group-normalized advantage: An advantage calculated by normalizing rewards relative to the mean and dispersion of rewards within a trajectory group. “With the group-normalized advantages held constant during differentiation”
- Importance-weighted off-policy correction: Reweighting samples generated by an older policy so they better represent a target policy. “including importance-weighted off-policy correction, filtering, clipping, or explicit staleness control”
- Inference caching: Reusing previously computed inference results to avoid repeating computation. “JigsawRL, Libra, TideRL, and WAR address fine-grained scheduling, elastic resource allocation, long tails, and inference caching.”
- Learner tail: Remaining learner computation that continues after rollout generation has finished. “At balance, only the final wave's learner work remains after rollout ends, forming the learner tail.”
- Long-tailed completion times: A distribution in which a small number of tasks take substantially longer than most tasks. “with long-tailed completion times”
- LoRA: Low-Rank Adaptation, a parameter-efficient fine-tuning method that trains low-rank update matrices while keeping the base model largely frozen. “The model comparison also includes GLM-4.7-Flash-31B”
- Masked policy score: A policy score computed only over selected tokens, such as action tokens. “define its masked policy score and corresponding source gradient”
- MFU: Model FLOPs utilization, the ratio of achieved model computation to the hardware’s theoretical peak capacity over a specified interval. “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.”
- Off-policy staleness: The discrepancy caused when training data was generated by a policy different from the currently optimized policy. “We presented , which overlaps rollout and learning with zero off-policy staleness.”
- On-policy distillation (OPD): A training method in which trajectories are generated by a student policy and token-level supervision is supplied by a fixed teacher policy. “OPD generates trajectories with the student policy and evaluates the student's action tokens under a frozen teacher.”
- Optimizer barrier: A synchronization requirement that delays the parameter update until all required gradient work has completed. “Zero-stale optimizer barrier.”
- Policy lag: The difference between the policy used to generate a rollout and the policy currently used for learning. “Policy updates can occur during in-flight trajectories, yielding variable policy lag.”
- Policy snapshot: A fixed version of the policy used consistently for generating and evaluating one update’s data. “It streams ready gradients at a fixed policy snapshot”
- Prefix caching: Reusing computations for shared prompt prefixes during language-model inference. “with the same chunked prefill and prefix caching settings.”
- Readiness-driven scheduling: Scheduling work according to the time at which its mathematical inputs become available. “Ready sources enter a work-conserving queue in readiness order”
- Reference policy: A policy used as a comparison distribution in reinforcement-learning objectives or distillation losses. “Distributed RLHF systems coordinate generation, reference and reward inference”
- Rollout: The process of generating an agent trajectory by executing a policy in an environment. “Asynchronous execution overlaps rollout and learning across updates”
- Score gradient: The gradient of a policy’s token-level score with respect to its parameters. “group rewards determine how to weight each trajectory's score gradient”
- Stop-gradient: An operation that prevents derivatives from propagating through a particular value during backpropagation. “ denotes stop-gradient.”
- Synchronous optimizer step: A single parameter update performed after all contributions for a logical batch have been collected. “one batch-synchronous optimizer step and zero staleness.”
- Teacher scoring: Evaluation of student-generated actions by a fixed teacher model to produce distillation targets. “teacher scoring, learner work, final reduction, optimizer execution, and publication.”
- Token weighting: Assigning different coefficients to individual tokens when computing a loss or gradient. “ the token weighting”
- Trajectory: A sequence of states, actions, observations, and rewards produced during an agent’s interaction with an environment. “For a group of trajectories”
- Trajectory heterogeneity: Variation in the lengths or computational costs of agent trajectories. “Trajectory heterogeneity.”
- Trajectory-local backward pass: Backpropagation performed for one trajectory independently of other trajectories in the batch. “complete-group schedules still delay trajectory-local backward passes until all group rewards arrive”
- Variable policy lag: A condition in which different in-flight rollouts were generated by policies with differing degrees of age relative to the current policy. “yielding variable policy lag.”
- Work-conserving queue: A scheduling queue that keeps a worker occupied whenever eligible work is available. “Ready sources enter a work-conserving queue in readiness order”
- Zero policy staleness: A guarantee that all rollouts and gradients in an update correspond to the same unchanged policy version. “With zero policy staleness, also outperforms asynchronous training at a fixed budget by up to 2.47 percentage points.”






