arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2610.28998cs.LGcs.CL
收藏

FlashNext-RL:针对Qwen3.8-Flash-Next的长 horizon 智能体强化学习的系统优化研究

FlashNext-RL: A System Optimization Study for Long-Horizon Agentic RL of Qwen3.8-Flash-Next

Snowflake AI Research(雪花人工智能研究院)

Zhewei Yao, Yuxiong He

AI总结:

本研究针对Qwen3.8-Flash-Next的长 horizon 智能体 RL 需求,提出基于 prime-rl 的 FlashNext-RL 优化框架,在单 8×B200 节点实现 BF16 训练,大幅提升吞吐量,验证了定制化 RL 训练的重要性。

摘要:

长 horizon 智能体强化学习(RL)既需要高效的 rollout 生成,也需要在长序列上进行训练。然而,Qwen3.8-Flash-Next 的内存需求和模型特定算子使得现有开源实现难以满足需求。为解决这些限制,我们引入 FlashNext-RL,这是一个基于 prime-rl 的模型特定 RL 训练优化框架,采用 vLLM 进行软件工程(SWE)rollout 生成。我们的核心研究是在单个 8×B200 节点上对完整 48 层模型进行 BF16 训练,其中前两层、n-gram 表、稀疏注意力索引器和多 token 预测头被冻结。我们优化了主机卸载、梯度累积以及混合专家、稀疏注意力和门控残差流的内核。在全模型开发研究中,非填充训练吞吐量从初始 32K token 配置下的约 395 token/s/GPU 提升至优化后 131K token 配置下的 4438 token/s/GPU,硬件矩阵乘法吞吐量(即不考虑注意力组件的成本)从约 20 TFLOPs/GPU 提升至 213 TFLOPs/GPU。对 8 层模型的受控累积研究进一步量化了各优化的贡献。结合三个推理节点,该系统支持实时 SWE RL 运行,目标批次为 1024 个可训练 rollout,上下文限制为 131072 token。在第 5-15 步中,每次迭代平均耗时 22.4 分钟,且具有受限熵和训练器-采样器不匹配 KL。这些结果表明,针对模型的架构、内存布局和内核需求定制 RL 训练,而非仅依赖通用 RL 基础设施,具有重要意义。

英文摘要:

Long-horizon agentic reinforcement learning (RL) requires both efficient rollout generation and training on long sequences. However, the memory requirements and model-specific operators of Qwen3.8-Flash-Next make this difficult with existing open-source implementations. To resolve these limitations, we introduce FlashNext-RL, a model-specific RL training optimization framework based on prime-rl, with vLLM for software engineering (SWE) rollout generation. Our main focus is BF16 training of the full 48-layer model on a single 8xB200 node, with the first two layers, the n-gram table, the sparse-attention indexer and the multi-token prediction head frozen. We optimize host offload, gradient accumulation and the kernels for mixture-of-experts, sparse attention and the gated residual stream. In the full-model development study, non-padding training throughput increases from approximately 395 tokens/s/GPU in the initial 32K-token configuration to 4,438 tokens/s/GPU in the optimized 131K-token configuration, with hardware matmul throughput (aka without considering the cost of attention components) increasing from approximately 20 to 213 TFLOPs/GPU. A controlled cumulative study on an 8-layer model further quantifies the contributions of individual optimizations. Together with three inference nodes, the system supports a live SWE RL run with a target batch of 1,024 trainable rollouts and a 131,072-token context limit. Over steps 5-15, an iteration takes 22.4 minutes on average, with bounded entropy and trainer-sampler mismatch KL. These results highlight the importance of tailoring RL training to the model's architecture, memory layout and kernel requirements, rather than relying only on general-purpose RL infrastructure.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑