SparseOptimizer:通过Moreau-Yosida正则化稀疏化语言模型并借助编译器协同设计实现加速
SparseOptimizer: Sparsify Language Models through Moreau-Yosida Regularization and Accelerate via Compiler Co-design
AI总结:
本研究提出即插即用的SparseOptimizer优化器,通过带解析解的嵌入式收缩算子结合Moreau-Yosida正则化诱导大语言模型稀疏性,还提出优化器-编译器协同设计策略,在参数量显著减少的同时保持性能并实现最高7.15倍推理加速。
摘要:
本文提出了SparseOptimizer,这是一种新型深度学习优化器,利用Moreau-Yosida正则化在BERT、ALBERT和GPT等大语言模型中自然诱导稀疏性。SparseOptimizer的设计核心是一个嵌入式收缩算子,它直接在优化过程中赋予模型稀疏性。该算子依托完善的理论框架,包含解析解,从而增强了优化器的鲁棒性与有效性。至关重要的是,SparseOptimizer具备即插即用特性,无需修改代码,是一款可广泛适配各类大语言模型的通用工具。在GLUE、RACE、SQuAD1和SQuAD2等基准数据集上的实证评估证实,经SparseOptimizer稀疏化后的SparseBERT和SparseALBERT,性能与对应的稠密模型BERT、ALBERT相当,同时参数量显著减少。此外,本研究提出了一种创新的优化器-编译器协同设计策略,证明了SparseBERT搭配适配设计的编译器后具备推理加速潜力(与Pytorch、TensorFlow和LLVM通用编译相比,加速比分别达到3.37倍、6.30倍和7.15倍)。本研究是高效、可扩展且高性能大语言模型发展进程中的重要一步,为该领域未来的探索与优化树立了先例。SparseOptimizer代码和SparseALBERT模型将在论文录用后公开。
英文摘要:
This paper introduces SparseOptimizer, a novel deep learning optimizer that exploits Moreau-Yosida regularization to naturally induce sparsity in large language models such as BERT, ALBERT and GPT. Key to the design of SparseOptimizer is an embedded shrinkage operator, which imparts sparsity directly within the optimization process. This operator, backed by a sound theoretical framework, includes an analytical solution, thereby reinforcing the optimizer's robustness and efficacy. Crucially, SparseOptimizer's plug-and-play functionality eradicates the need for code modifications, making it a universally adaptable tool for a wide array of large language models. Empirical evaluations on benchmark datasets such as GLUE, RACE, SQuAD1, and SQuAD2 confirm that SparseBERT and SparseALBERT, when sparsified using SparseOptimizer, achieve performance comparable to their dense counterparts, BERT and ALBERT, while significantly reducing their parameter count. Further, this work proposes an innovative optimizer-compiler co-design strategy, demonstrating the potential of inference acceleration (\textbf{3.37x}, \textbf{6.30x}, and \textbf{7.15x} in comparison with Pytorch, TensorFlow, and LLVM generic compile, respectively) in SparseBERT when paired with an appropriately designed compiler. This study represents a significant step forward in the evolution of efficient, scalable, and high-performing large language models, setting a precedent for future exploration and optimization in this domain. The SparseOptimizer code and SparseALBERT model will be publicly available upon paper acceptance.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。