本文提出 ParScale 并行缩放范式,通过 P 路可学习输入变换、并行前向与动态聚合复用参数,并建立新的缩放定律,以更低内存和延迟获得近 O(log P) 参数缩放收益。
摘要:
人们普遍认为,缩放语言模型必然会带来显著的空间或时间成本,方式是增加参数(参数缩放)或输出 token(推理时缩放)。我们引入第三种且推理效率更高的缩放范式:在训练和推理期间同时增加模型的并行计算。我们对输入应用 P 个多样且可学习的变换,并行执行模型的前向传播,并动态聚合这 P 个输出。该方法即并行缩放(ParScale),通过复用现有参数来扩展并行计算,并可应用于任何模型结构、优化过程、数据或任务。我们在理论上提出了一条新的缩放定律,并通过大规模预训练对其进行验证;结果表明,具有 P 个并行流的模型类似于将参数缩放 O(log P),同时表现出更优的推理效率。例如,与实现相同性能提升的参数缩放相比,ParScale 的内存增量最多可减少 22 倍,延迟增量最多可减少 6 倍。它还可以通过在少量 token 上进行后训练,将现成的预训练模型回收改造为并行缩放模型,从而进一步降低训练预算。我们发现的新缩放定律有望促进更强大模型在低资源场景中的部署,并为计算在机器学习中的作用提供另一种视角。
英文摘要:
It is commonly believed that scaling language models should commit a significant space or time cost, by increasing the parameters (parameter scaling) or output tokens (inference-time scaling). We introduce the third and more inference-efficient scaling paradigm: increasing the model's parallel computation during both training and inference time. We apply $P$ diverse and learnable transformations to the input, execute forward passes of the model in parallel, and dynamically aggregate the $P$ outputs. This method, namely parallel scaling (ParScale), scales parallel computation by reusing existing parameters and can be applied to any model structure, optimization procedure, data, or task. We theoretically propose a new scaling law and validate it through large-scale pre-training, which shows that a model with $P$ parallel streams is similar to scaling the parameters by $O(\log P)$ while showing superior inference efficiency. For example, ParScale can use up to 22$\times$ less memory increase and 6$\times$ less latency increase compared to parameter scaling that achieves the same performance improvement. It can also recycle an off-the-shelf pre-trained model into a parallelly scaled one by post-training on a small amount of tokens, further reducing the training budget. The new scaling law we discovered potentially facilitates the deployment of more powerful models in low-resource scenarios, and provides an alternative perspective for the role of computation in machine learning.
ELLIS Institute Tübingen(埃利斯研究所蒂宾根分所);OpenEuroLLM;Eindhoven University of Technology(埃因霍温理工大学);University of Freiburg(弗赖堡大学);Zuse School ELIZA(楚塞ELIZA学校);Max Planck Institute for Intelligent Systems(马克斯·普朗克智能系统研究所);Tübingen AI Center(蒂宾根人工智能中心)
Scaling Law Phenomena Across Regression Paradigms: Multiple and Kernel Approaches
The University of Chicago(芝加哥大学);Guilin University of Electronic Technology(桂林电子科技大学);University of New South Wales(新南威尔士大学);The University of Hong Kong(香港大学);University of Wisconsin-Madison(威斯康星大学麦迪逊分校);The Simons Institute for the Theory of Computing at UC Berkeley(加州大学伯克利分校西蒙斯理论计算研究所)