The generation speed of LLMs are bottlenecked by autoregressive decoding, where tokens are predicted sequentially one by one. Alternatively, diffusion large language models (dLLMs) theoretically allow for parallel token generation, but in practice struggle to achieve the speed of autoregressive models without significantly sacrificing quality. We therefore introduce adaptive parallel decoding (APD), a novel method that dynamically adjusts the number of tokens sampled in parallel. We achieve this by defining a multiplicative mixture between the dLLM marginal probabilities and the joint probability of sequences under a small auxiliary autoregressive model. This inverts the standard setup of speculative decoding, where the goal is to sample from a large autoregressive verifier by drafting from a smaller model. We further optimize APD by enabling KV caching and limiting the size of the masked input. Altogether, our method puts forward three tunable parameters to flexibly tradeoff throughput and quality. We show that APD provides markedly higher throughput with minimal quality degradations on downstream benchmarks.


翻译:大语言模型的生成速度受限于自回归解码,其中令牌被逐个顺序预测。作为替代方案,扩散大语言模型理论上允许并行令牌生成,但在实践中若不显著牺牲质量则难以达到自回归模型的速度。因此,我们引入了自适应并行解码,这是一种动态调整并行采样令牌数量的新方法。我们通过定义扩散大语言模型边际概率与小型辅助自回归模型下序列联合概率之间的乘法混合来实现这一点。这颠倒了推测解码的标准设置,后者的目标是通过从较小模型草拟来从大型自回归验证器采样。我们进一步通过启用KV缓存和限制掩码输入大小来优化自适应并行解码。总体而言,我们的方法提出了三个可调参数,以灵活权衡吞吐量和质量。我们证明,自适应并行解码在下游基准测试中提供了显著更高的吞吐量,且质量下降最小。

0
下载
关闭预览

相关内容

FlowQA: Grasping Flow in History for Conversational Machine Comprehension
专知会员服务
34+阅读 · 2019年10月18日
Stabilizing Transformers for Reinforcement Learning
专知会员服务
60+阅读 · 2019年10月17日
Hierarchically Structured Meta-learning
CreateAMind
27+阅读 · 2019年5月22日
Transferring Knowledge across Learning Processes
CreateAMind
29+阅读 · 2019年5月18日
Unsupervised Learning via Meta-Learning
CreateAMind
43+阅读 · 2019年1月3日
STRCF for Visual Object Tracking
统计学习与视觉计算组
15+阅读 · 2018年5月29日
Focal Loss for Dense Object Detection
统计学习与视觉计算组
12+阅读 · 2018年3月15日
国家自然科学基金
13+阅读 · 2017年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Hierarchical Graph Capsule Network
Arxiv
20+阅读 · 2020年12月16日
Arxiv
14+阅读 · 2020年9月1日
Arxiv
12+阅读 · 2019年2月26日
Arxiv
11+阅读 · 2018年3月23日
VIP会员
相关资讯
Hierarchically Structured Meta-learning
CreateAMind
27+阅读 · 2019年5月22日
Transferring Knowledge across Learning Processes
CreateAMind
29+阅读 · 2019年5月18日
Unsupervised Learning via Meta-Learning
CreateAMind
43+阅读 · 2019年1月3日
STRCF for Visual Object Tracking
统计学习与视觉计算组
15+阅读 · 2018年5月29日
Focal Loss for Dense Object Detection
统计学习与视觉计算组
12+阅读 · 2018年3月15日
相关论文
Hierarchical Graph Capsule Network
Arxiv
20+阅读 · 2020年12月16日
Arxiv
14+阅读 · 2020年9月1日
Arxiv
12+阅读 · 2019年2月26日
Arxiv
11+阅读 · 2018年3月23日
相关基金
国家自然科学基金
13+阅读 · 2017年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员