MaskPro: Linear-Space Probabilistic Learning for Strict (N:M)-Sparsity on LLMs

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Sun, Yan, Zhang, Qixin, Yu, Zhiyuan, Zhang, Xikun, Shen, Li, Tao, Dacheng
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866911677963829248
author Sun, Yan
Zhang, Qixin
Yu, Zhiyuan
Zhang, Xikun
Shen, Li
Tao, Dacheng
author_facet Sun, Yan
Zhang, Qixin
Yu, Zhiyuan
Zhang, Xikun
Shen, Li
Tao, Dacheng
contents The rapid scaling of large language models~(LLMs) has made inference efficiency a primary bottleneck in the practical deployment. To address this, semi-structured sparsity offers a promising solution by strategically retaining $N$ elements out of every $M$ weights, thereby enabling hardware-friendly acceleration and reduced memory. However, existing (N:M)-compatible approaches typically fall into two categories: rule-based layerwise greedy search, which suffers from considerable errors, and gradient-driven combinatorial learning, which incurs prohibitive training costs. To tackle these challenges, we propose a novel linear-space probabilistic framework named MaskPro, which aims to learn a prior categorical distribution for every $M$ consecutive weights and subsequently leverages this distribution to generate the (N:M)-sparsity throughout an $N$-way sampling without replacement. Furthermore, to mitigate the training instability induced by the high variance of policy gradients in the super large combinatorial space, we propose a novel update method by introducing a moving average tracker of loss residuals instead of vanilla loss. Finally, we conduct comprehensive theoretical analysis and extensive experiments to validate the superior performance of MaskPro, as well as its excellent scalability in memory efficiency and exceptional robustness to data samples. Our code is available at \href{https://github.com/woodenchild95/Maskpro.git}{\ttfamily https://github.com/woodenchild95/Maskpro.git}.
format Preprint
id arxiv_https___arxiv_org_abs_2506_12876
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle MaskPro: Linear-Space Probabilistic Learning for Strict (N:M)-Sparsity on LLMs
Sun, Yan
Zhang, Qixin
Yu, Zhiyuan
Zhang, Xikun
Shen, Li
Tao, Dacheng
Machine Learning
The rapid scaling of large language models~(LLMs) has made inference efficiency a primary bottleneck in the practical deployment. To address this, semi-structured sparsity offers a promising solution by strategically retaining $N$ elements out of every $M$ weights, thereby enabling hardware-friendly acceleration and reduced memory. However, existing (N:M)-compatible approaches typically fall into two categories: rule-based layerwise greedy search, which suffers from considerable errors, and gradient-driven combinatorial learning, which incurs prohibitive training costs. To tackle these challenges, we propose a novel linear-space probabilistic framework named MaskPro, which aims to learn a prior categorical distribution for every $M$ consecutive weights and subsequently leverages this distribution to generate the (N:M)-sparsity throughout an $N$-way sampling without replacement. Furthermore, to mitigate the training instability induced by the high variance of policy gradients in the super large combinatorial space, we propose a novel update method by introducing a moving average tracker of loss residuals instead of vanilla loss. Finally, we conduct comprehensive theoretical analysis and extensive experiments to validate the superior performance of MaskPro, as well as its excellent scalability in memory efficiency and exceptional robustness to data samples. Our code is available at \href{https://github.com/woodenchild95/Maskpro.git}{\ttfamily https://github.com/woodenchild95/Maskpro.git}.
title MaskPro: Linear-Space Probabilistic Learning for Strict (N:M)-Sparsity on LLMs
topic Machine Learning
url https://arxiv.org/abs/2506.12876