让语言模型并行生成更准,靠的是重新激活被遗忘的自回归模型。
Reviving Any-Subset Autoregressive Models with Principled Parallel Sampling and Speculative Decoding
- 提出新算法让任意顺序自回归模型并行采样,保证分布正确。
- 实验显示速度提升且生成质量不降,小模型表现接近大50倍的模型。
- 适合追求高效生成、想用小模型跑出大模型效果的研究者。
在任意顺序语言模型中,如何并行采样以获得正确的联合分布仍是一个开放问题。传统离散扩散模型在并行生成更多标记时,其预测分布会偏离原始数据分布,因其依赖于仅在无穷小时间步成立的条件独立假设。我们发现,另一类模型——任意子集自回归模型(AS-ARMs)——可提供解决方案。如其名所示,AS-ARMs 能以任意顺序并行生成标记,并支持并行化的联合概率密度估计。通过提出的任意子集推测解码(ASSD)算法,可纠正自身并行生成的分布偏差。该算法理论上保证生成分布正确,且神经网络调用次数不超过生成标记数。实验验证了 ASSD 在不牺牲质量的前提下显著加速生成。此外,我们提供了训练 AS-ARMs 的数学合理方案,并证明其在补全任务上,参数量小于200M时达到当前最优,代码生成性能接近50倍大的模型。理论与实证结果表明,曾被忽视的 AS-ARMs 是语言建模的有前途方向。
原文摘要 · Abstract (English)
In arbitrary-order language models, it is an open question how to sample tokens in parallel from the correct joint distribution. With discrete diffusion models, the more tokens they generate in parallel, the less their predicted distributions adhere to the originally learned data distribution, as they rely on a conditional independence assumption that only works with infinitesimally small timesteps. We find that a different class of models, any-subset autoregressive models (AS-ARMs), holds the solution. As implied by the name, AS-ARMs can generate tokens in any order, and in parallel. Moreover, AS-ARMs support parallelized joint probability density estimation, allowing them to correct their own parallel-generated token distributions, via our Any-Subset Speculative Decoding (ASSD) algorithm. ASSD provably enables generation of tokens from the correct joint distribution, with the number of neural network calls upper bounded by the number of tokens predicted. We empirically verify that ASSD speeds up language generation, without sacrificing quality. Furthermore, we provide a mathematically justified scheme for training AS-ARMs for generation, and show that AS-ARMs achieve state-of-the-art performance among sub-200M parameter models on infilling benchmark tasks, and nearly match the performance of models 50X larger on code generation. Our theoretical and empirical results indicate that the once-forgotten AS-ARMs are a promising direction of language modeling.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。