Explore the research collection
1 entry · Follow this search
- Paper
QwenGyre: An Elastic Reinforcement Learning Framework for Training xLong-Horizon Agents
QwenGyre (Alibaba Token Hub) is an end-to-end framework for online RL on extreme-long-horizon (xLong) agent executions — single rollouts lasting hours, spanning hundreds of model–environment interactions and ~1M tokens — run through unmodified black-box harnesses (Claude Code in the evals). It attacks two problems. (1) Scheduling: rollout durations are long-tailed, so Colocate training waits on stragglers and Async's fixed rollout/training GPU partitions idle on both sides. QwenGyre's Elastic Scheduler organizes GPUs into independently switchable cells and reallocates them between rollout and training as unfinished work changes, without interrupting live executions — harness state persists across role changes and in-flight model calls keep being served; newly freed nodes join an ongoing training batch, and streaming training feeds cells micro-steps on demand so they finish the batch together (role switches take ~3.5–8.5s). (2) Trajectory redundancy: harnesses branch via compaction, sub-agents, and retries, so expanding every path into samples explodes token volume. The Trajectory Processor records every model call token-in/token-out (exact token IDs, behavior log-probs, provenance), organizes calls into a prefix-shared trajectory tree preserving each output's original conditioning context, scores preserved work after termination — including partial progress after timeout — and admits at most 5 trajectories per execution by role priority (main > main-summary > sub-agent > sub-agent-summary), counting shared prefixes once, training only on policy-generated tokens, and averaging token losses within each execution. The RL algorithm is group-relative (16 rollouts/group) with a GSPO adaptation (token importance weights capped at 5, execution-level clipping [0.995, 1.005]). Against Colocate and Async baselines at equal GPU budgets and matched scheduling staleness, with comparable training scores (all figures first-party): on Qwen3.6 122B, 1.42–1.53× over Async and 1.36–1.47× over Colocate on NL2RepoBench, 1.57×/1.61–1.82× on DeepSWE, 1.38–1.43×/1.81–1.85× on TerminalBench; scaled to the flagship Qwen3.8 2.4T (~700K tokens per rollout, 192 nodes), 48 NL2RepoBench steps take 75.42h vs 134.55h (Async) and 91.47h (Colocate), lifting eval passrate from 52.48% to 58.54%.