Alibaba Qwen Unveils QwenGyre Framework for Long-Horizon Agent Training
Alibaba’s Qwen team introduces QwenGyre, an elastic reinforcement learning system designed to accelerate training for coding agents executing complex, multi-hour tasks.

Key points
- QwenGyre is an online reinforcement learning framework that manages GPU resources dynamically between rollout execution and model training phases.
- The system was tested on Qwen 3.6 122B and Qwen 3.8 2.4T models, achieving speedups of up to 1.85x compared to existing methods.
- QwenGyre addresses inefficiencies in long-horizon tasks by moving idle GPUs and converting branching agent histories into bounded training samples.
Alibaba’s Qwen research team has introduced QwenGyre, a new elastic reinforcement learning framework specifically designed for training agents on extreme-long-horizon tasks. According to a report by MarkTechPost, this online system allows coding agents to be trained through unmodified, black-box harnesses, targeting execution rollouts that can last for hours and process nearly one million tokens.
The framework was applied to Qwen’s flagship Qwen 3.8 2.4T model, as well as the Qwen 3.6 122B variant. It operates on multi-node GPU clusters, utilizing Megatron for training and SGLang for serving rollouts. The 122B model tests used between 24 and 32 nodes, while the larger 2.4T run required 192 nodes organized into four cells of 48. The specific GPU models used were not disclosed in the source material.
Technical Architecture and Performance
QwenGyre relies on two core mechanisms to improve efficiency in reinforcement learning. First, it dynamically shifts idle GPUs between the rollout phase, where agents execute tasks, and the training phase. Second, it converts branching agent histories into bounded training samples, preventing the duplication of shared prefixes that occurs when agents retry or spawn sub-agents.
Performance benchmarks indicate that QwenGyre is 1.38x to 1.78x faster than Async setups and 1.21x to 1.85x faster than Colocate setups at matched scores. The best result was a 1.85x end-to-end speedup over Colocate on the TerminalBench benchmark. However, on the 2.4T model, the speedup was only 1.21x over Colocate, likely because many queries ran near timeout limits. On the NL2RepoBench, scores rose from 52.5% to 58.5% in 48 steps.
Challenges in Long-Horizon Agent Training
The research team defines ‘XLong-horizon’ tasks as agent runs spanning hours with hundreds of model and tool interactions, such as generating full repositories from specifications. Traditional setups face two main issues. In Colocate systems, training waits for the slowest execution while GPUs remain idle. In Async systems, fixed GPU pools cannot share spare capacity with each other.
Additionally, modern harnesses like Claude Code compact context, spawn sub-agents, and retry actions, creating a branching tree of executions rather than a single trajectory. Expanding every path duplicates shared prefixes and inflates training costs. QwenGyre splits GPUs into cells that share a training layout. A core cell holds authoritative weights, while satellite cells join training later. The scheduler tracks rollout demand, switching cells to training once remaining cells can still serve live work. KV-cache blocks migrate over RDMA during rerouting to reduce prefix recomputation.
What should you do?
Security and technology professionals should monitor the release of public code for QwenGyre, as the current paper does not link to a public repository. Organizations using reinforcement learning for agent training should evaluate whether their current GPU allocation strategies suffer from idle capacity during long rollouts. Teams should also assess if their harnesses create significant branching trees that could benefit from bounded sample conversion.
What to do and how to stay safe: Alibaba
- Review current reinforcement learning pipelines to identify idle GPU capacity during long-horizon rollout executions.
- Evaluate whether agent harnesses create excessive branching histories that duplicate shared prefixes and increase training costs.
- Monitor official Qwen channels for the release of public code or documentation for the QwenGyre framework.
- Assess if dynamic GPU scheduling could improve efficiency in existing multi-node training clusters for coding agents.
General security guidance from the Threat Times newsroom. It is not confirmed advice from the organisations named in this story.
Frequently asked questions
What is QwenGyre?
QwenGyre is an elastic reinforcement learning framework from Alibaba’s Qwen team designed for training coding agents on extreme-long-horizon tasks.
How much faster is QwenGyre compared to other methods?
It is 1.38x to 1.78x faster than Async and 1.21x to 1.85x faster than Colocate setups, with a best-case speedup of 1.85x on TerminalBench.
Is the code for QwenGyre publicly available?
No, the research paper linked in the report does not include a public code release for the framework.


