Large Language Models (LLMs) are distinguished by their massive parameter counts, which typically result in significant redundancy. This work introduces MaskLLM, a learnable pruning method that establishes Semi-structured (or ``N:M'') Sparsity in LLMs, aimed at reducing computational overhead during inference. Instead of developing a new importance criterion, MaskLLM explicitly models N:M patterns as a learnable distribution through Gumbel Softmax sampling. This approach facilitates end-to-end training on large-scale datasets and offers two notable advantages: 1) High-quality Masks - our method effectively scales to large datasets and learns accurate masks; 2) Transferability - the probabilistic modeling of mask distribution enables the transfer learning of sparsity across domains or tasks. We assessed MaskLLM using 2:4 sparsity on various LLMs, including LLaMA-2, Nemotron-4, and GPT-3, with sizes ranging from 843M to 15B parameters, and our empirical results show substantial improvements over state-of-the-art methods. For instance, leading approaches achieve a perplexity (PPL) of 10 or greater on Wikitext compared to the dense model's 5.12 PPL, but MaskLLM achieves a significantly lower 6.72 PPL solely by learning the masks with frozen weights. Furthermore, MaskLLM's learnable nature allows customized masks for lossless application of 2:4 sparsity to downstream tasks or domains. Code is available at https://github.com/NVlabs/MaskLLM.
ConSA: Controllable Sparsity in Hybrid Attention via Learnable Allocation
Institute of Information Engineering, Chinese Academy of Sciences(中国科学院信息工程研究所);School of Cyber Security, University of Chinese Academy of Sciences(中国科学院大学网络空间安全学院);Baidu Inc.(百度公司)
Structure-Learnable Adapter Fine-Tuning for Parameter-Efficient Large Language Models
University of Pennsylvania(宾夕法尼亚大学);Georgia Institute of Technology(佐治亚理工学院);University of California, Berkeley(加利福尼亚大学伯克利分校);Rose-Hulman Institute of Technology(罗斯-霍曼理工学院)
SPP: Sparsity-Preserved Parameter-Efficient Fine-Tuning for Large Language Models
Multimedia Laboratory (MMLab), The Chinese University of Hong Kong(香港中文大学多媒体实验室);Salesforce AI Research(Salesforce 人工智能研究院);Shanghai Artificial Intelligence Laboratory(上海人工智能实验室);CPII under InnoHK(InnoHK 创新香港研发平台旗下产品可靠性及系统安全研发中心)
BTC-LLM: Efficient Sub-1-Bit LLM Quantization via Learnable Transformation and Binary Codebook
The Hong Kong University of Science and Technology(香港科技大学);City University of Hong Kong(香港城市大学);University of Electronic Science and Technology of China(电子科技大学)
SeerAttention: Learning Intrinsic Sparse Attention in Your LLMs
The University of Hong Kong(香港大学);University of Washington(华盛顿大学);Hong Kong University of Science and Technology (Guangzhou)(香港科技大学(广州));Microsoft Research(微软研究院);NVIDIA(英伟达)
SD-Conv: Towards the Parameter-Efficiency of Dynamic Convolution
JD Explore Academy(京东探索研究院);University of Electronic Science and Technology of China(电子科技大学);Nanjing University of Science and Technology Zijin College(南京理工大学紫金学院)