NgramRL: Accelerating RL Post-Training for Structured Generation via Rollout-Aware N-gram Speculative Decoding
作者: Nilesh Prasad Pandey, Jangseon Park, Jason Kong, Onat Gungor, Tajana Rosing
分类: cs.AI
发布日期: 2026-10-23
💡 一句话要点
提出NgramRL以加速结构化生成中的强化学习后训练
🎯 匹配领域: 支柱二:RL算法与架构 (RL & Architecture) 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 强化学习 后训练 结构化生成 n-gram 预取机制 自然语言处理 模型优化
📋 核心要点
- 现有的强化学习后训练方法在自回归生成中耗时较长,导致训练效率低下。
- NgramRL通过利用最近的回滚历史,构建每个提示的n-gram草稿生成器,避免了对辅助模型的依赖。
- 实验表明,NgramRL在多个模型和任务上显著提高了生成效率,吞吐量提升达1.38倍。
📝 摘要(中文)
强化学习后训练提升了大型语言模型的推理能力,但其成本主要由自回归生成的回滚过程主导,可能超过70%的训练时间。现有的投机解码方法在此场景下效果不佳:基于模型的草稿生成器消耗稀缺的GPU内存,并可能在策略演变过程中失去一致性,而现有的无模型方法未能显式利用训练周期间的重复性。为此,本文提出NgramRL,一种基于最近回滚历史的每个提示的n-gram草稿生成器,避免了辅助模型和草稿训练的需求,同时通过目标模型验证保持回滚分布。我们还引入了一种自适应的预取器,以隐藏CPU缓存查找和调度的延迟,显著提高了回滚吞吐量。
🔬 方法详解
问题定义:本文旨在解决强化学习后训练中自回归生成过程的高时间成本问题。现有方法在效率和资源利用上存在不足,尤其是在GPU内存的消耗和策略演变中的一致性问题。
核心思路:NgramRL的核心思路是利用最近的回滚历史作为高质量的自更新草稿来源,避免了对额外模型的需求,同时通过目标模型验证保持回滚分布的一致性。
技术框架:NgramRL的整体架构包括n-gram草稿生成器和自适应预取器。草稿生成器基于最近的回滚历史生成草稿,而预取器则预测可能的验证结果,以优化CPU缓存的使用。
关键创新:NgramRL的主要创新在于其无辅助模型的设计和自适应预取机制,这与现有的投机解码方法有本质区别,后者通常依赖于额外的模型或训练。
关键设计:NgramRL的设计中,预取器通过预测接受的草稿长度和目标生成的续写标记来优化性能,且在高概率结果上集中预取,未覆盖的结果则回退到顺序查找,确保生成过程的高效性。
🖼️ 关键图片
📊 实验亮点
在多个模型和任务上,NgramRL在温缓存状态下每次目标模型前向传播承诺3.60-7.77个标记,比SuffixDecoding提高了1.99倍,比提示查找解码提高了7.0倍。在Spider任务中,预取器覆盖了96.6%的结果,显著提升了回滚吞吐量,达到1.38倍的提升。
🎯 应用场景
NgramRL的研究成果在自然语言处理、对话系统和文本生成等领域具有广泛的应用潜力。通过提高生成效率,该方法能够支持更复杂的推理任务和实时应用,推动智能助手和自动内容生成系统的发展。
📄 摘要(原文)
Reinforcement learning (RL) post-training improves the reasoning capabilities of large language models, but its cost is dominated by autoregressive rollout generation, which can exceed 70% of training time. Existing speculative-decoding methods are poorly suited to this setting: model-based drafters consume scarce GPU memory and may become misaligned as the policy evolves, while existing model-free methods do not explicitly exploit repetition across training epochs. We observe that recent rollouts of the same prompt provide a high-quality, self-updating draft source. Based on this insight, we propose NgramRL, a per-prompt n-gram drafter constructed from bounded recent rollout history. NgramRL requires no auxiliary model, drafter training, or persistent GPU-resident drafter state, while target-model verification preserves the rollout distribution. To hide CPU cache lookup and scheduling, we further introduce an adaptive fan-out prefetcher that predicts likely verification outcomes (j, b), consisting of the accepted draft length j and target-emitted continuation token b. A causal budget allocator concentrates prefetches on high-probability outcomes, while uncovered outcomes fall back to sequential lookup without changing committed tokens. Across two model families and three reasoning and structured-generation workloads, NgramRL commits 3.60-7.77 tokens per target-model forward in the warm-cache regime, up to 1.99x more than SuffixDecoding and 7.0x more than prompt-lookup decoding. On Spider, the prefetcher covers 96.6% of Qwen3-8B outcomes at a candidate budget of 16 and improves measured rollout throughput by 1.38x over synchronous NgramRL, approaching its 1.40x overlap ceiling.