arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2501.18015cs.LG
收藏

一种用于诱导2:4稀疏性的近端算子

A Proximal Operator for Inducing 2:4-Sparsity

Amazon(亚马逊公司);University of California, San Diego, USA(美国加州大学圣迭戈分校);Max Planck Institute for Informatics, Saarbrücken, Germany(德国马克斯·普朗克信息研究所);Technion–Israel Institute of Technology, Haifa, Israel(以色列技术学院)

Jonas M Kübler, Yu-Xiang Wang, Shoham Sabach, Navid Ansari, Matthäus Kleindessner, Kailash Budhathoki, Volkan Cevher, George Karypis

AI总结:

本文提出一种利用特征局部相关性的近端算子正则化方法,用于优化2:4稀疏掩码,在大语言模型剪枝中超越或匹配现有最优算法。

摘要:

近年来,AI加速器和GPU的硬件进步使得高效计算稀疏矩阵乘法成为可能,尤其是当每4个连续权重中有2个被置为零时。然而,这种所谓的2:4稀疏性通常会导致模型精度下降。我们推导了一个正则化器,利用特征的局部相关性在已训练模型中找到更好的稀疏掩码。通过推导近端算子,我们将该正则化器与局部平方损失联合最小化,并证明在2:4稀疏情况下该算子具有高效解。在优化掩码后,我们使用掩码梯度更新进一步最小化局部平方损失。我们在玩具问题上说明了该方法,并将其应用于剪枝参数量高达70B的整个大语言模型。在参数量高达13B的模型上,我们超越了先前最先进的算法,而在70B模型上,我们达到了与它们相当的性能。

英文摘要:

Recent hardware advancements in AI Accelerators and GPUs allow to efficiently compute sparse matrix multiplications, especially when 2 out of 4 consecutive weights are set to zero. However, this so-called 2:4 sparsity usually comes at a decreased accuracy of the model. We derive a regularizer that exploits the local correlation of features to find better sparsity masks in trained models. We minimize the regularizer jointly with a local squared loss by deriving the proximal operator for which we show that it has an efficient solution in the 2:4-sparse case. After optimizing the mask, we use maskedgradient updates to further minimize the local squared loss. We illustrate our method on toy problems and apply it to pruning entire large language models up to 70B parameters. On models up to 13B we improve over previous state of the art algorithms, whilst on 70B models we match their performance.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑