GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

No menu could be recovered. Follow the blue links in the page.

This view

  • Original page
  • New address

GeezerVison is showing seilk.github.io — ThunderSync: Lossless acceleration of agentic reinforcement learning

ThunderSync

Lossless acceleration of agentic reinforcement learning

GitHub arXiv

Seil Kang1,2,*, Hangoo Kang1,*, Tarun Suresh1, Youngeun Kim3, Shreyas Pimpalgaonkar4, Seong Jae Hwang2,†, Azalia Mirhoseini1,‡

1Stanford UniversityStanford University logo2Yonsei UniversityYonsei University logo3Korea UniversityKorea University logo4Bespoke LabsBespoke Labs logo

* Core contributor · † Co-corresponding author · ‡ Main corresponding author

GRPOOn-policy distillation (OPD)
GRPO

SWE-bench Verified

GRPOLoading figure layers…
GRPO

Training reward

GRPOLoading figure layers…
OPD

SWE-bench Verified

OPDLoading figure layers…
OPD

Training reward

OPDLoading figure layers…

ThunderSync computes gradients while agent rollouts are still running. It keeps the policy fixed and takes one optimizer step after the batch finishes, preserving the synchronous GRPO and OPD updates.

Why the learner waits

Agentic rollouts finish at different times. Some agents return quickly; others keep editing code, calling tools, or waiting for tests. In our synchronous GRPO and OPD runs, learner GPUs spend 49.5% of step time waiting for rollout and verification.

Learner work across consecutive updates

SyncLearner work starts after rollout finishes. Red regions mark idle GPUs.

ThunderSyncBackward passes overlap rollout, reducing idle time and fitting more updates into the same window.

Loading the utilization illustration…

Swipe across the trace to inspect it.

Scheduling at a fixed policy

A batch is needed for the optimizer step, but parts of the backward pass can start sooner. ThunderSync releases GRPO work when a trajectory’s reward arrives, and OPD work when a turn’s teacher scores are ready. All of that work uses the same policy snapshot.

GRPO trajectory scheduling

Sync0 policy lag
ThunderSync0 policy lag
Compare with

OPD turn scheduling

Sync0 policy lag
ThunderSync0 policy lag
Compare with

GRPO at trajectory granularity

For a group G\mathcal GG of m\,mm trajectories, GRPO weights each trajectory’s gradient by how its reward compares with the group. The group mean μ\muμ and standard deviation σ\sigmaσ need every reward:

gG=1m∑i∈Gri−μσ+ϵ Hig_{\mathcal G} = \frac{1}{m}\sum_{i\in\mathcal G} \frac{r_i-\mu}{\sigma+\epsilon}\,H_igG​=m1​i∈G∑​σ+ϵri​−μ​Hi​

HiH_iHi​ is the gradient of trajectory i\,ii’s weighted action-token log probabilities, evaluated at the fixed policy θk\theta_kθk​. It does not depend on the other rewards. Once trajectory i\,ii and its reward are ready, ThunderSync runs that backward pass and adds to two buffers:

G(1)=∑i∈GriHiG(2)=∑i∈GHi\begin{aligned} G^{(1)} &= \sum_{i\in\mathcal G} r_i H_i \\ G^{(2)} &= \sum_{i\in\mathcal G} H_i \end{aligned}G(1)G(2)​=i∈G∑​ri​Hi​=i∈G∑​Hi​​

When the group closes, its mean and standard deviation turn those buffers into the final group gradient:

gG=G(1)−μG(2)m(σ+ϵ)g_{\mathcal G} = \frac{G^{(1)}-\mu G^{(2)}}{m(\sigma+\epsilon)}gG​=m(σ+ϵ)G(1)−μG(2)​

This is the same weighted sum, regrouped so the backward passes happen earlier. The policy stays at θk\theta_kθk​ until the batch’s single optimizer step.

OPD at turn granularity

For each sampled action token, the frozen teacher and current student score the same token in its realized context. Let ℓj,tT\,\ell^{\mathrm T}_{j,t}ℓj,tT​ and ℓj,tS\,\ell^{\mathrm S}_{j,t}ℓj,tS​ be their log probabilities. Their difference gives the token’s weight:

Aj,t=sg⁡ ⁣[ℓj,tT−ℓj,tS]A_{j,t} = \operatorname{sg}\!\left[ \ell^{\mathrm T}_{j,t}-\ell^{\mathrm S}_{j,t} \right]Aj,t​=sg[ℓj,tT​−ℓj,tS​]

Stop-gradient (sg⁡\operatorname{sg}sg) holds this weight constant during differentiation. Once the teacher scores arrive, turn jjj contributes a gradient while its tool call can keep running:

gj=∑t∈MjAj,t∇θlog⁡πθ(aj,t∣hj,t)∣θ=θkg_j = \sum_{t\in\mathcal M_j} A_{j,t} \left.\nabla_\theta \log\pi_\theta(a_{j,t}\mid h_{j,t}) \right|_{\theta=\theta_k}gj​=t∈Mj​∑​Aj,t​∇θ​logπθ​(aj,t​∣hj,t​)∣θ=θk​​

Mj\mathcal M_jMj​ contains the turn’s scored action tokens. ThunderSync accumulates these unnormalized contributions and completes any deferred gradients through earlier context. At batch closure, it divides once by the total scored-token count:

gk=1Nk∑jgjNk=∑j∣Mj∣\begin{aligned} g_k &= \frac{1}{N_k}\sum_j g_j \\ N_k &= \sum_j |\mathcal M_j| \end{aligned}gk​Nk​​=Nk​1​j∑​gj​=j∑​∣Mj​∣​

That normalization happens before clipping and the single optimizer step, giving the same batch-synchronous OPD update.

Results and resource costs

On SWE-bench Verified, ThunderSync reaches the GRPO target of 74.01% pass@3 at 121.3 GPU-hours, versus 233.5 with Sync. At 128 GPU-hours it outperforms Async in all four benchmark–objective settings, with gains up to 2.47 percentage points. Each comparison fixes the model, workload, optimizer, and GPU allocation.

Qwen-3.8-27B. Speedup is time to the Sync target; gain is pass@3 at a fixed 128 GPU-hour budget.
BenchmarkObjectiveSpeedup vs. SyncPass@3 gain vs. Async, pp
SWE-bench VerifiedGRPO1.9×+2.47
OPD1.9×+1.27
Terminal Bench 4.0GRPO1.8×+1.52
OPD1.9×+2.02

Qwen-3.8-27B

SWE-bench Verified

SyncAsyncFully AsyncThunderSync
Pass@1Pass@3Pass@5Training reward
GRPO
Pass@1
Loading figure layers…
Pass@3
Loading figure layers…
Pass@5
Loading figure layers…
Training reward
Loading figure layers…
OPD
Pass@1
Loading figure layers…
Pass@3
Loading figure layers…
Pass@5
Loading figure layers…
Training reward
Loading figure layers…

Terminal Bench 4.0

SyncAsyncFully AsyncThunderSync
Pass@1Pass@3Pass@5Training reward
GRPO
Pass@1
Loading figure layers…
Pass@3
Loading figure layers…
Pass@5
Loading figure layers…
Training reward
Loading figure layers…
OPD
Pass@1
Loading figure layers…
Pass@3
Loading figure layers…
Pass@5
Loading figure layers…
Training reward
Loading figure layers…

GLM-4.7-Flash-31B

SWE-bench Verified

SyncAsyncFully AsyncThunderSync
GRPO
Pass@1
Loading figure layers…
Pass@5
Loading figure layers…
OPD
Pass@1
Loading figure layers…
Pass@5
Loading figure layers…

Terminal Bench 4.0

SyncAsyncFully AsyncThunderSync
GRPO
Pass@1
Loading figure layers…
Pass@5
Loading figure layers…
OPD
Pass@1
Loading figure layers…
Pass@5
Loading figure layers…

Citation

@article{kang2026thundersyncrl,  title = {ThunderSync: Lossless Acceleration of Agentic Reinforcement Learning},  author = {Kang, Seil and Kang, Hangoo and Suresh, Tarun and Kim, Youngeun and Pimpalgaonkar, Shreyas and Hwang, Seong Jae and Mirhoseini, Azalia},  journal = {arXiv preprint arXiv:2610.05935},  year = {2026},  url = {https://arxiv.org/abs/2610.05935}}
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.