大规模长上下文强化学习后训练中的在线草稿协同训练用于投机解码
研究论文 · 2026/09/09
投机解码通过加速自回归生成来降低强化学习后训练中 rollout 的成本。在线协同训练可进一步提升草稿模型的准确性,从而获得更大的加速比。然而,将这种方法扩展到大规模、长上下文的模型面临两个挑战:分支注意力在标准因果上下文并行实现中不受支持,以及目标特征跨越流水线并行阶段。本文提出了一个端到端系统来解决这些问题:在上下文并行方面,扩展了打包的、负载均衡的之字形环注意力,将排名局部分支注意力与因果主序列注意力合并;在流水线并行方面,TapChannel 通过独立路径跨阶段传输中间目标特征,不影响流水线调度。实验表明,协同训练的草稿模型紧密跟随策略基线,同时在高达 122B 的模型规模上实现了显著的 rollout 和端到端加速。上下文并行设计在 256K 令牌下实现了强扩展,并相比先前工作节省了大量内存,流水线并行传输开销适中。代码可在 https://github.com/NVIDIA-NeMo/RL/issues/3698 获取。
该论文针对强化学习后训练中投机解码的在线协同训练提出了实用的系统级解决方案,解决了大规模长上下文场景下的关键工程挑战,实验验证了其有效性,对提升 RL 训练效率具有重要价值。
Speculative decoding accelerates rollout generation, which dominates the cost of reinforcement learning (RL) post-training. Online co-training can further increase the draft's accuracy, yielding greater speedups. However, scaling this approach to co-training on large models with long contexts poses two obstacles: (1) branch attention is unsupported by standard causal context-parallel (CP) implementations, and (2) target features span across pipeline-parallel (PP) stages. We address both with an end-to-end system for large-scale online draft co-training. For CP, we extend packed, load-balanced zigzag ring attention by merging rank-local branch attention with causal main-sequence attention. For PP, TapChannel transports intermediate target features across stages via a separate path, leaving the pipeline schedule unaffected. Experiments demonstrate that co-trained drafts closely track the policy baseline while delivering substantial rollout and end-to-end speedups across model scales up to 122B. Our CP design achieves strong scaling at 256K tokens with significant memory savings over prior work, and our PP transport incurs modest overhead. Code can be found at https://github.com/NVIDIA-NeMo/RL/issues/3698.