通过2:4稀疏激活,让低秩大模型训练更快更省显存。
ELAS: Efficient Pre-Training of Low-Rank Large Language Models via 2:4 Activation Sparsity

- 在低秩模型中对平方ReLU后的激活应用2:4结构化稀疏
- 训练时显存占用大幅降低,大批次下吞吐提升明显
- 适合追求高效训练的低秩大模型研究者
大语言模型虽能力卓越,但训练时巨大的计算开销仍是广泛部署的瓶颈。低秩训练可显著减少内存占用,而将2:4结构化稀疏应用于权重和激活以利用NVIDIA GPU对2:4稀疏格式的支持,成为有前景的方向。然而,现有低秩方法常保留激活矩阵的全秩,导致内存消耗大且限制大批次训练吞吐。直接对权重施加稀疏性也常带来性能下降。为此,本文提出ELAS:基于2:4激活稀疏的低秩大模型高效预训练框架。该框架在低秩模型的前馈网络中使用平方ReLU激活函数,并在平方ReLU后对激活实施2:4结构化稀疏。我们在60M至1B参数的LLaMA模型上进行了预训练实验,结果表明,采用2:4激活稀疏后,性能几乎无损,同时实现训练与推理加速,尤其在大批次下显著降低激活内存开销。代码已开源。
原文摘要 · Abstract (English)
Large Language Models (LLMs) have achieved remarkable capabilities, but their immense computational demands during training remain a critical bottleneck for widespread adoption. Low-rank training has received attention in recent years due to its ability to significantly reduce training memory usage. Meanwhile, applying 2:4 structured sparsity to weights and activations to leverage NVIDIA GPU support for 2:4 structured sparse format has become a promising direction. However, existing low-rank methods often leave activation matrices in full-rank, which dominates memory consumption and limits throughput during large-batch training. Furthermore, directly applying sparsity to weights often leads to non-negligible performance degradation. To achieve efficient pre-training of LLMs, this paper proposes ELAS: Efficient pre-training of Low-rank LLMs via 2:4 Activation Sparsity, a novel framework for low-rank models via 2:4 activation sparsity. ELAS applies squared ReLU activation functions to the feed-forward networks in low-rank models and implements 2:4 structured sparsity on the activations after the squared ReLU operation. We evaluated ELAS through pre-training experiments on LLaMA models ranging from 60M to 1B parameters. The results demonstrate that ELAS maintains performance with minimal degradation after applying 2:4 activation sparsity, while achieving training and inference acceleration. Moreover, ELAS reduces activation memory overhead, particularly with large batch sizes. Code is available at ELAS Repo.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。