Parallel Scaling Law for Language Models
该论文提出了一种名为PARSCALE的并行扩展方法,通过增加模型的并行计算来提高语言模型的能力,同时减少参数数量和计算成本。
更新于 2025-05-16。作者:Mouxiang Chen、Binyuan Hui、Zeyu Cui、Jiaxi Yang、Dayiheng Liu、Jianling Sun、Junyang Lin、Zhongxin Liu。
中文摘要
普遍认为,扩展语言模型需要在空间或时间上付出显著的代价,这通常是通过增加参数(参数扩展)或输出令牌(推理时扩展)来实现的。我们引入了第三种更具推理效率的扩展范式:在训练和推理过程中增加模型的并行计算。我们对输入应用P种多样且可学习的变换,并行执行模型的正向传播,并动态聚合P个输出。这种方法称为并行扩展(ParScale),通过重用现有参数来扩展并行计算,可以应用于任何模型结构、优化过程、数据或任务。我们理论上提出了一个新的扩展法则,并通过大规模预训练进行验证,这表明具有P个并行流的模型类似于通过O(log P)扩展参数,同时展现出更优越的推理效率。例如,与实现相同性能提升的参数扩展相比,ParScale可以将内存增加减少高达22倍,将延迟增加减少6倍。它还可以通过在小量令牌上进行后训练,将现成的预训练模型转化为并行扩展模型,进一步降低训练成本。我们发现的新的扩展法则可能有助于在资源匮乏的场景中部署更强大的模型,并为机器学习中计算的作用提供了另一种视角。
英文摘要
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 22times less memory increase and 6times 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.
解读
一句话总结
该论文提出了一种名为PARSCALE的并行扩展方法,通过增加模型的并行计算来提高语言模型的能力,同时减少参数数量和计算成本。
问题1:这篇论文想要解决什么具体问题?
- 问题背景:现有的语言模型扩展方法,如参数扩展和推理时间扩展,都伴随着较大的空间或时间成本。
- 现有方案不足:参数扩展需要大量的内存,而推理时间扩展则会导致显著的推理时间增加。
- 研究目标:提出一种既高效又节省空间和时间成本的扩展方法。
问题2:论文的核心创新点是什么?
- 技术创新:提出了一种名为PARSCALE的并行扩展方法,通过增加模型的并行计算来提高语言模型的能力。
- 方法改进:通过学习输入转换和输出聚合策略,提高了并行计算的效果。
- 优势:与参数扩展相比,PARSCALE可以显著减少内存占用和推理时间,同时提高模型性能。
问题3:实验结果如何验证了方法的有效性?
- 关键实验:在Stack-V2和Pile语料库上进行了大规模预训练实验,将并行流的数量从1增加到8,并将模型参数从500M增加到4.4B。
- 性能提升:实验结果表明,PARSCALE在保持相同性能的情况下,可以减少高达22倍的内存占用和6倍的延迟增加。
- 对比结果:与参数扩展相比,PARSCALE在推理效率方面具有显著优势。
问题4:这个研究的实际应用价值是什么?
- 应用场景:PARSCALE特别适用于低资源边缘设备,如智能手机、智能汽车和机器人。
- 实施建议:可以通过两阶段训练策略来降低PARSCALE的训练成本。
- 局限与展望:未来可以进一步研究并行扩展在数据受限场景下的效果,以及将其应用于其他机器学习领域。