Puzzle: Distillation-Based NAS for Inference-Optimized LLMs
这篇论文提出了Puzzle框架,通过创新的神经网络架构搜索和硬件约束下的模型优化,实现了对大型语言模型进行高效推理,同时保持了其能力。
更新于 2024-12-02。作者:Akhiad Bercovich、Tomer Ronen、Talor Abramovich、Nir Ailon、Nave Assaf、Mohammad Dabbah、Ido Galil、Amnon Geifman、Yonatan Geifman、Izhak Golan、Netanel Haber、Ehud Karpas、Itay Levy、Shahar Mor、Zach Moshe、Najeeb Nabwani、Omri Puny、Ran Rubin、Itamar Schen、Ido Shahaf、Oren Tropp、Omer Ullman Argov、Ran Zilberstein、Ran El-Yaniv。
中文摘要
大型语言模型(LLMs)展示了惊人的能力,但它们的采用受到推理过程中高昂的计算成本的限制。虽然增加参数数量可以提升准确性,但也拉大了最先进能力与实际部署能力之间的差距。我们提出了Puzzle框架,它能够在特定硬件上加速LLMs的推理,同时保持其能力。通过前所未有的规模创新应用神经架构搜索(NAS),Puzzle在硬件约束下系统地优化了具有数十亿参数的模型。我们的方法利用块状局部知识蒸馏(BLD)进行并行架构探索,并采用混合整数规划进行精确的约束优化。我们通过Llama-3.1-Nemotron-51B-Instruct(Nemotron-51B)这一公开模型展示了我们框架的实战影响,该模型源自Llama-3.1-70B-Instruct。Nemotron-51B实现了2.17倍的推理吞吐量提升,能够在单个NVIDIA H100 GPU上运行,同时保留了原始模型98.4%的能力。Nemotron-51B目前是能够在单个GPU上进行大批次推理的最准确的语言模型。值得注意的是,这次转换只需要45B训练令牌,而它所派生的70B模型使用了超过15T令牌。这确立了一个新范式,即强大的模型可以被优化以实现高效的部署,同时对它们的能力影响极小,证明了推理性能,而不仅仅是参数数量,应该指导模型的选择。随着Nemotron-51B的发布和Puzzle框架的展示,我们为从业者提供了立即访问最先进语言建模能力的方式,同时大幅降低了计算成本。
英文摘要
Large language models (LLMs) have demonstrated remarkable capabilities, but their adoption is limited by high computational costs during inference. While increasing parameter counts enhances accuracy, it also widens the gap between state-of-the-art capabilities and practical deployability. We present Puzzle, a framework to accelerate LLM inference on specific hardware while preserving their capabilities. Through an innovative application of neural architecture search (NAS) at an unprecedented scale, Puzzle systematically optimizes models with tens of billions of parameters under hardware constraints. Our approach utilizes blockwise local knowledge distillation (BLD) for parallel architecture exploration and employs mixed-integer programming for precise constraint optimization. We demonstrate the real-world impact of our framework through Llama-3.1-Nemotron-51B-Instruct (Nemotron-51B), a publicly available model derived from Llama-3.1-70B-Instruct. Nemotron-51B achieves a 2.17x inference throughput speedup, fitting on a single NVIDIA H100 GPU while preserving 98.4% of the original model's capabilities. Nemotron-51B currently stands as the most accurate language model capable of inference on a single GPU with large batch sizes. Remarkably, this transformation required just 45B training tokens, compared to over 15T tokens used for the 70B model it was derived from. This establishes a new paradigm where powerful models can be optimized for efficient deployment with only negligible compromise of their capabilities, demonstrating that inference performance, not parameter count alone, should guide model selection. With the release of Nemotron-51B and the presentation of the Puzzle framework, we provide practitioners immediate access to state-of-the-art language modeling capabilities at significantly reduced computational costs.
解读
一句话总结
这篇论文提出了Puzzle框架,通过创新的神经网络架构搜索和硬件约束下的模型优化,实现了对大型语言模型进行高效推理,同时保持了其能力。
问题1:这篇论文想要解决什么具体问题?
• 问题背景:大型语言模型在推理阶段的高计算成本限制了其应用和扩展。 • 现有方案不足:从头开始训练模型成本高且耗时,知识蒸馏虽然快速但成本高昂。 • 研究目标:通过Puzzle框架,在保持模型能力的同时,加速LLM推理并降低计算成本。
问题2:论文的核心创新点是什么?
• 技术创新:利用块状局部知识蒸馏(BLD)进行并行架构探索,并采用混合整数规划(MIP)进行精确约束优化。 • 方法改进:通过BLD和MIP技术,对数十亿参数的模型进行系统优化,实现硬件约束下的高效推理。 • 优势:相对于现有方法,Puzzle框架具有更高的效率、更低成本和更好的性能。
问题3:实验结果如何验证了方法的有效性?
• 关键实验:使用Llama-3.1-70B-Instruct模型作为基础,通过Puzzle框架生成Nemotron-51B模型。 • 性能提升:Nemotron-51B在单个NVIDIA H100 GPU上实现了2.17倍的推理吞吐量提升,同时保持了98.4%的原模型能力。 • 对比结果:与基线方法相比,Nemotron-51B在保持相同精度的前提下,实现了更高的吞吐量。
问题4:这个研究的实际应用价值是什么?
• 应用场景:适用于需要高效推理的大型语言模型应用,如虚拟助手、企业解决方案等。 • 实施建议:利用Puzzle框架,可以针对不同硬件和任务需求,快速生成优化的语言模型。 • 局限与展望:Puzzle框架在处理长上下文时可能存在性能下降,未来可以探索更有效的长上下文处理方法。
来源
机器可读索引:llms.txt