Rollout dominates the training time in large language model (LLM) post-training, where the trained model is used to generate tokens given a batch of prompts. This work, SpecActor, achieves fast rollout with speculative decoding that deploys a fast draft path to accelerate the unparallelizable generation, while the correctness is guaranteed by fast parallel verification of the outputs with the original model. SpecActor addresses two foundational challenges that hinder speculation efficiency: (1) a Decoupled speculation method that overcomes the computation inefficiency issue when executing speculative decoding with relative large per-worker batch size -- a common configuration in training but unfriendly to speculation, and (2) a Fastest-of-N speculation method that selects and combines different draft methods according to the rollout progress to approximate the optimal draft method even when the best one is unknown a priori. Extensive evaluations on production traces show that SpecActor accelerates mean rollout speed by 2.0--2.4x, with up to 2.7x speedup, over common post-training baselines. The results are consistent across both dense and MoE models and across different RL algorithms. Notably, SpecActor is 1.1--2.6x faster compared to vanilla speculative rollout in different traces. The accelerated rollout achieves 1.4--2.3x faster end-to-end training time.


翻译:在大语言模型(LLM)后训练中,展开过程占据了主要的训练时间,其中训练好的模型被用于根据一批提示生成词元。本文提出的SpecActor通过推测解码实现了快速展开,该方法部署了一条快速草稿路径来加速不可并行的生成过程,同时通过使用原始模型对输出进行快速并行验证来保证正确性。SpecActor解决了两个阻碍推测效率的基础性挑战:(1)提出一种解耦推测方法,解决了在使用相对较大的每工作器批次大小(训练中的常见配置但对推测不友好)执行推测解码时的计算效率低下问题;(2)提出一种最快N选一推测方法,该方法根据展开进度选择并组合不同的草稿方法,以近似最优草稿方法,即使最佳方法事先未知。基于生产轨迹的大量评估表明,与常见的后训练基线相比,SpecActor将平均展开速度提升了2.0–2.4倍,最高可达2.7倍加速。该结果在稠密模型和MoE模型以及不同的强化学习算法中均保持一致。值得注意的是,在不同轨迹中,SpecActor比原始的推测展开方法快1.1–2.6倍。加速后的展开实现了端到端训练时间1.4–2.3倍的提升。

0
下载
关闭预览

相关内容

专知会员服务
17+阅读 · 2021年8月24日
【AAAI2021】用于视频描述的语义分组网络
专知会员服务
16+阅读 · 2021年2月3日
【NeurIPS 2020】融入BERT到并行序列模型
专知会员服务
26+阅读 · 2020年10月15日
语义分割中的深度学习方法全解:从FCN、SegNet到DeepLab
炼数成金订阅号
26+阅读 · 2017年7月10日
MNIST入门:贝叶斯方法
Python程序员
23+阅读 · 2017年7月3日
国家自然科学基金
8+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
17+阅读 · 2008年12月31日
VIP会员
相关VIP内容
专知会员服务
17+阅读 · 2021年8月24日
【AAAI2021】用于视频描述的语义分组网络
专知会员服务
16+阅读 · 2021年2月3日
【NeurIPS 2020】融入BERT到并行序列模型
专知会员服务
26+阅读 · 2020年10月15日
相关资讯
相关基金
国家自然科学基金
8+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
17+阅读 · 2008年12月31日
Top
微信扫码咨询专知VIP会员