Alibaba's QwenGyre Makes Training Long-Running AI Agents Much Faster
A new elastic reinforcement learning system lets AI coding agents run for hours while still training efficiently on expensive GPU hardware.

The Problem With Long AI Agent Runs
AI agents are getting better at complex tasks like writing entire software repositories from a text description. But these tasks can take hours and involve nearly one million tokens 1. When you try to train agents with reinforcement learning on that scale, two big problems show up.
First, GPU clusters waste huge amounts of time waiting for the slowest agent execution to finish 2. Second, when agents branch off into sub-tasks, the same work gets duplicated many times, making training expensive and inefficient 1.
How QwenGyre Solves Both Problems
Alibaba's Qwen team created QwenGyre, an elastic reinforcement learning framework that moves idle GPUs between running agents and training them on completed work — without stopping live executions mid-task 1.
The system splits GPUs into groups called cells. A core cell holds the main training weights while satellite cells help out 1. As agent runs finish, the scheduler switches those GPUs to training, provided there are enough cells left to handle the remaining live work . Model calls get rerouted through a proxy so the agent never notices the switch .
For training data, QwenGyre records every token call and builds a tree of branching paths instead of treating each run as a straight line 2. It scores partial progress on timed-out executions rather than discarding them 1. At most five trajectories per task are kept, and shared prefixes across branches are only trained once instead of being copied .
The Results
On the Qwen 3.8 2.4T model, QwenGyre finished 48 training steps in about 75 hours compared to 134 hours for async training and 91 hours for colocated training 5. The system was up to 1.85 times faster than the best alternatives 1.
Performance gains included raising the pass rate on NL2RepoBench — a benchmark for code generation from natural language — from 52.5 percent to 58.5 percent in just 48 steps 1. On the smaller Qwen 3.6 122B model, speedups ranged from 1.38 to 1.82 times faster than existing setups depending on the benchmark .
All tests used Claude Code as the agent harness 1. Interestingly, QwenGyre can work with unmodified, black-box agents, meaning it doesn't require special access to how the agent is built .
No public code release has been announced yet 1. The full research paper was submitted to arXiv in September 2026 2.
What This Means
Elastic scheduling and trajectory deduplication are two practical tricks that could make future training of long-running AI agents much more affordable. As agents take on longer, more complex tasks, techniques like QwenGyre may become standard tools for anyone training them.
Key facts
- QwenGyre moves idle GPUs between live agent rollouts and training without interrupting the agents
- Trajectory trees cap samples at 5 per execution and train shared prefixes only once
- Up to 1.85x faster than colocated training and 1.78x faster than async on benchmark tests
- NL2RepoBench rose from 52.5% to 58.5% in 48 steps on the Qwen 3.8 2.4T model
- No public code release has been announced
Sources
- Alibaba Qwen Introduces QwenGyre: Elastic Reinforcement Learning RL for XLong-Horizon Agents — marktechpost.com
- QwenGyre: An Elastic Reinforcement Learning Framework for Training ...
- QwenGyre: An Elastic Reinforcement Learning Framework for Training ...
- Alibaba Qwen Launches QwenGyre for Long-Horizon Agent Training — techaimag.com
- Alibaba QwenGyre Solves Million-Token RL With Elastic GPU Scheduling — gate.com


