提出高效训练分块稀疏模型的方法,降低计算与内存开销。
An Efficient Training Algorithm for Models with Block-wise Sparsity
- 设计专用算法直接训练分块稀疏模型,避免从全连接模型开始。
- 实验表明计算和内存消耗显著下降,性能不损失。
- 可自动优化稀疏模式的分块大小,适合硬件加速部署。
大规模机器学习模型在教育、信贷、招聘、医疗、刑事司法等领域日益重要,但其训练与部署需大量计算资源。为降低计算与内存成本,稀疏权重矩阵模型被广泛采用。其中,具有特殊稀疏结构(如分块稀疏)的模型更契合硬件加速器,能有效减少推理时的内存与计算开销。然而,现有高效训练方法均未针对分块稀疏模型设计,导致当前训练仍从完整密集模型开始,效率低下。本文聚焦于分块稀疏矩阵模型的训练,提出一种高效训练算法,在训练与推理阶段均显著降低计算与内存成本。此外,我们的方法可高效搜索最优分块大小。广泛的实验与理论分析表明,该算法在性能不下降的前提下,大幅减少计算与内存开销。
原文摘要 · Abstract (English)
Large-scale machine learning (ML) models are increasingly being used in critical domains like education, lending, recruitment, healthcare, criminal justice, etc. However, the training, deployment, and utilization of these models demand substantial computational resources. To decrease computation and memory costs, machine learning models with sparse weight matrices are widely used in the literature. Among sparse models, those with special sparse structures (e.g., models with block-wise sparse weight matrices) fit better with the hardware accelerators and can decrease the memory and computation costs during the inference. Unfortunately, while there are several efficient training methods, none of them are designed to train a block-wise sparse model efficiently. As a result, the current methods for training block-wise sparse models start with full and dense models leading to inefficient training. In this work, we focus on training models with \textit{block-wise sparse matrices} and propose an efficient training algorithm to decrease both computation and memory costs during training and inference. In addition, we will show that our proposed method enables us to efficiently find the right block size for the sparsity pattern during the training process. Our extensive empirical and theoretical analyses show that our algorithms can decrease the computation and memory costs significantly without a performance drop compared to baselines.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。