Most reinforcement learning systems for agents were built on an assumption that is quietly becoming obsolete: that one rollout takes minutes. Alibaba's Qwen team, collaborating with the University of Science and Technology of China and Tsinghua University, has published a paper describing QwenGyre, a framework designed for what the researchers call xLong-horizon tasks — agent executions that stretch for hours, span hundreds of model and tool interactions and consume roughly 700,000 to one million tokens per rollout. The work was posted to arXiv this week.
The team frames two structural problems. First, execution variance: in a colocated setup where training and inference share the same GPUs, training stalls completely while waiting for the slowest rollout to finish, idling expensive hardware. Fixed asynchronous pools have the mirror-image failure — spare capacity in the generation pool cannot help the training pool. Second, trajectory branching: production harnesses compact context, retry failed commands and spawn sub-agents, so a single execution becomes a tree of diverging paths. Flattening every path into an independent training sample duplicates shared prefixes and inflates cost.
QwenGyre attacks the first problem with an Elastic Scheduler. The cluster is divided into cells, the smallest GPU groups that can hold the model's training-parallel layout. A core cell holds the authoritative weights and optimizer state; satellite cells switch between serving rollouts and joining training as demand shifts, without terminating live executions. A proxy reroutes in-flight model calls to another inference engine, cached attention state migrates over RDMA so completed prefixes are not recomputed, and satellite cells pull fresh weights through Mooncake's Transfer Engine. Role switches averaged 8.52 seconds from rollout to training and 3.46 seconds in the other direction — negligible next to rollouts that run for hours.
The second problem goes to a Trajectory Processor. Each execution is recorded as a tree whose branches share stored prefixes, so every generated token stays attached to the exact context that produced it. Shared targets are counted once, and token losses are averaged within each execution before aggregation so that heavily branched runs do not dominate the gradient. Timed-out tasks are not discarded either: a repository-generation run that hits its time limit may still leave a working partial repository with passing tests, and the processor scores that preserved workspace as partial credit. Capping sampling at five trajectories per execution matched uncapped quality while cutting forward-backward time by about 25%.
The reported gains are material. Across tested configurations, QwenGyre delivered end-to-end speedups of 1.21x to 1.85x over colocated deployments and 1.38x to 1.78x over asynchronous setups, at matched training quality. On the flagship Qwen 3.8 2.4T model — running on 192 nodes split into four cells of 48, with Megatron handling training and SGLang serving rollouts — 48 training steps finished in 75.42 hours, against 91.47 hours for Colocate and 134.55 hours for Async. On NL2RepoBench, which asks a model to generate an entire repository from a natural-language specification, the pass rate rose from 52.48% to 58.54% within those 48 steps, with rollouts averaging about 700,000 tokens each. The framework was also validated on the smaller Qwen 3.6 122B across DeepSWE and TerminalBench.
A design choice worth noting for practitioners: QwenGyre works through unmodified, black-box harnesses. Teams do not have to rewrite agent scaffolding to fit the training loop — the scheduler reroutes model calls underneath a running harness, which matters for anyone training on tools they cannot instrument. That is a deliberate contrast with frameworks that require the training loop to be embedded in the agent itself.
The catch is availability. The paper discloses no public code release and no license, while competing agentic RL frameworks — veRL, AReaL and Agent Lightning — are already open source under Apache-2.0 or MIT. All efficiency and benchmark figures are the researchers' own and have not been independently reproduced. If Qwen follows the pattern of its model releases and open-sources the framework, it would be a meaningful addition to a tooling niche where almost every serious lab is currently training agents on harnesses that were never designed to be trained against.
The bigger signal is about where the bottleneck sits. As coding agents take on repository-wide refactors and multi-hour migrations, the constraint on improving them is shifting from model size to training infrastructure — scheduling, memory movement and the shape of trajectories. QwenGyre is one of the first published systems to treat that plumbing as the primary research problem rather than an engineering afterthought.
Comments (0)
Log in to join the discussion
Log InNo comments yet