arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2610.34915cs.LG
收藏

在Blackwell上的端到端MXFP8强化学习:匹配的价值、见效时机与失效情况

End-to-End MXFP8 Reinforcement Learning on Blackwell: What Matching Buys, When It Pays Off, and How It Fails

Wengee Zhang

AI总结:

该研究在verl框架中实现端到端MXFP8强化学习,在B200 GPU上测试Qwen3系列模型,明确其匹配性、速度与正确性特性,为低精度RL的应用提供实测依据。

摘要:

低精度算术可降低大语言模型强化学习(RL)的成本,但RL要求采样器与学习者保持一致。目前已有多个框架在两端均运行FP8。我们在verl(Megatron/Transformer Engine训练、vLLM与SGLang部署、稠密与混合专家MoE模型)中实现端到端MXFP8 RL,并在B200 GPU上以Qwen3-8B和Qwen3-30B-A3B为对象,测量该设计的价值、见效时机与失效情况。(1)匹配性:对于MXFP8学习者,学习者网格上的采样器比更高精度的BF16采样器更一致:在固定权重的单引擎中,采样器一半线性层在网格上时,训练-部署KL散度降低11%;全部线性层在网格上时,该值降低16%,且我们检查的同步权重与学习者的FP8前向权重逐字节相等。对于MoE模型,采样器使用另一网格的FP8流水线,其与共享网格流水线的首步KL散度为两倍。未用量化KV缓存时,端到端BF16仍比MXFP8一致2.5-10倍。(2)速度:MXFP8训练为每个微批次增加固定成本,同时节省每token成本,因此在我们的稠密设置中,仅当微批次token数约高于4500时才见效;相同数据的微批次扫描证实了每微批次成本,且追踪显示GPU在大部分额外时间内等待主机。端到端MXFP8将MoE步时间缩短10.7%,生成时间缩短24%,并使短序列稠密工作负载变慢5%。(3)正确性:我们明确了权重同步必须保留的7个条件,并针对实时引擎设计了测试这些条件的检查机制。我们在硬件上遇到的7种失效均破坏了一个条件,其中5种为静默失效;该检查机制在首次机会捕获了2种其他检查遗漏的失效,且CPU故障注入测试可复现5种失效。所有运行均为单种子,步数最多60步;我们不对最终模型质量做任何断言。

英文摘要:

Low-precision arithmetic can make reinforcement learning (RL) for large language models cheaper, but RL requires the sampler and the learner to agree. Several frameworks now run FP8 on both sides. We implement end-to-end MXFP8 RL in verl (Megatron/Transformer Engine training; vLLM and SGLang rollout; dense and MoE models) and measure on B200 GPUs, with Qwen3-8B and Qwen3-30B-A3B, what this design buys, when it is faster, and how it fails. (1) Matching. For an MXFP8 learner, a sampler on the learner's grid is more consistent than a higher-precision BF16 sampler: in one engine at fixed weights, train-rollout KL is 11% lower with half of the sampler's linear layers on the grid and 16% lower with all of them, and the synchronized weights we checked equal the learner's FP8 forward weights byte for byte. On the MoE model, an FP8 pipeline whose sampler uses another grid has twice the shared-grid pipeline's KL from the first step. Without a quantized KV cache, BF16 end to end remains 2.5-10x more consistent. (2) Speed. MXFP8 training adds a fixed cost per micro-batch and saves a per-token cost, so in our dense setting it pays off only above about 4.5k tokens per micro-batch; a micro-batch sweep on identical data confirms the per-micro-batch cost, and a trace shows the GPU waiting for the host for most of the added time. End to end, MXFP8 cuts MoE step time by 10.7% and generation time by 24%, and slows a short-sequence dense workload by 5%. (3) Correctness. We state seven conditions every weight synchronization must preserve and checks that test them against the live engine. Each of the seven failures we met on hardware broke one condition, five silently; the checks caught two at their first opportunity, each missed by the other checks, and CPU fault-injection tests reproduce five. All runs are single-seed and at most 60 steps long; we make no claim about final model quality.

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

↑