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

SLTrain:一种用于参数与内存高效预训练的稀疏加低秩方法

SLTrain: a sparse plus low-rank approach for parameter and memory efficient pretraining

RIKEN AIP(理化学研究所先进智能项目(RIKEN AIP));University of Minnesota, Twin Cities(明尼苏达大学双城分校);University of Tokyo(东京大学);Microsoft, India(微软印度分公司)

Andi Han, Jiaxiang Li, Wei Huang, Mingyi Hong, Akiko Takeda, Pratik Jawanpuria, Bamdev Mishra

AI总结:

针对低秩结构不适用于大语言模型预训练的问题,提出将权重参数化为低秩加稀疏矩阵的SLTrain方法,仅增少量开销就能达到接近全秩训练的性能,结合量化与逐层更新可大幅降低内存需求。

摘要:

大语言模型(LLMs)已在各类任务中展现出令人瞩目的能力。然而,从头训练LLMs需要海量算力与超大内存容量。近期研究探索了权重上的低秩结构,通过低秩适配或矩阵分解实现参数与内存高效的微调。低秩结构虽在微调中有效,但通常不太适用于预训练,因为它会将参数限制在低维子空间内。本研究中,我们提出将权重参数化为低秩矩阵与稀疏矩阵之和的形式用于预训练,将该方法命名为SLTrain。其中低秩分量通过矩阵分解学习,对于稀疏分量,我们采用一种简单策略:随机均匀选择稀疏支撑集,仅在固定支撑集下学习非零项。这种随机固定支撑稀疏学习策略虽简单,但与低秩学习结合后能显著提升预训练效果。实验结果表明,与采用低秩参数化的预训练相比,SLTrain仅增加极少的额外参数与内存开销,却能实现大幅更优的性能,可与全秩训练的效果相当。值得注意的是,当与量化和逐层更新结合时,在预训练LLaMA 7B模型的场景下,SLTrain最多可降低73%的内存需求。

英文摘要:

Large language models (LLMs) have shown impressive capabilities across various tasks. However, training LLMs from scratch requires significant computational power and extensive memory capacity. Recent studies have explored low-rank structures on weights for efficient fine-tuning in terms of parameters and memory, either through low-rank adaptation or factorization. While effective for fine-tuning, low-rank structures are generally less suitable for pretraining because they restrict parameters to a low-dimensional subspace. In this work, we propose to parameterize the weights as a sum of low-rank and sparse matrices for pretraining, which we call SLTrain. The low-rank component is learned via matrix factorization, while for the sparse component, we employ a simple strategy of uniformly selecting the sparsity support at random and learning only the non-zero entries with the fixed support. While being simple, the random fixed-support sparse learning strategy significantly enhances pretraining when combined with low-rank learning. Our results show that SLTrain adds minimal extra parameters and memory costs compared to pretraining with low-rank parameterization, yet achieves substantially better performance, which is comparable to full-rank training. Remarkably, when combined with quantization and per-layer updates, SLTrain can reduce memory requirements by up to 73% when pretraining the LLaMA 7B model.

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

↑