arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2601.18150cs.LGcs.CL
收藏

FP8-RL:一种实用且稳定的低精度栈用于大语言模型强化学习

FP8-RL: A Practical and Stable Low-Precision Stack for LLM Reinforcement Learning

NVIDIA(英伟达)

Zhaopeng Qiu, Shuang Yu, Jingqi Zhang, Shuai Zhang, Xue Huang, Jingyi Yang, Junjie Lai

AI总结:

本文提出一种实用的FP8 rollout栈,用于大语言模型强化学习,通过块状FP8量化实现FP8 W8A8线性层rollout,扩展FP8到KV-cache以消除长上下文内存瓶颈,并通过重要性采样基于rollout修正缓解训练-推理不匹配问题,提升了rollout吞吐量达44%。

摘要:

强化学习(RL)用于大语言模型(LLMs)日益受到rollout(生成)的瓶颈限制,其中长输出序列长度使注意力和KV缓存内存成为端到端步骤时间的主要因素。FP8提供了一种加速RL的有吸引力的杠杆,通过在rollout过程中减少计算成本和内存交通来实现,但将FP8应用于RL引入了独特的工程和算法挑战:策略权重每步都变化(需要重复量化和权重同步到推理引擎)以及低精度rollout可能偏离训练器所假设的更高精度策略,导致训练-推理不匹配和潜在的不稳定性。本报告提出了一种实用的FP8 roll out栈,该栈在veRL生态系统中实现,支持常见的训练后端(例如FSDP/Megatron-LM)和推理引擎(例如vLLM/SGLang)。我们(i)通过块状FP8量化实现了FP8 W8A8线性层rollout,(ii)扩展FP8到KV-cache以通过每步的QKV缩放再校准消除长上下文内存瓶颈,(iii)通过基于重要性采样的rollout修正(token级TIS/MIS变体)缓解不匹配问题。在密集和MoE模型中,这些技术在保持与BF16基线相当的学习行为的同时,实现了高达44%的rollout吞吐量提升。

英文摘要:

Reinforcement learning (RL) for large language models (LLMs) is increasingly bottlenecked by rollout (generation), where long output sequence lengths make attention and KV-cache memory dominate end-to-end step time. FP8 offers an attractive lever for accelerating RL by reducing compute cost and memory traffic during rollout, but applying FP8 in RL introduces unique engineering and algorithmic challenges: policy weights change every step (requiring repeated quantization and weight synchronization into the inference engine) and low-precision rollouts can deviate from the higher-precision policy assumed by the trainer, causing train-inference mismatch and potential instability. This report presents a practical FP8 rollout stack for LLM RL, implemented in the veRL ecosystem with support for common training backends (e.g., FSDP/Megatron-LM) and inference engines (e.g., vLLM/SGLang). We (i) enable FP8 W8A8 linear-layer rollout using blockwise FP8 quantization, (ii) extend FP8 to KV-cache to remove long-context memory bottlenecks via per-step QKV scale recalibration, and (iii) mitigate mismatch using importance-sampling-based rollout correction (token-level TIS/MIS variants). Across dense and MoE models, these techniques deliver up to 44% rollout throughput gains while preserving learning behavior comparable to BF16 baselines.

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

↑