Saved in:
Bibliographic Details
Main Authors: Han, Andi, Li, Jiaxiang, Huang, Wei, Hong, Mingyi, Takeda, Akiko, Jawanpuria, Pratik, Mishra, Bamdev
Format: Preprint
Published: 2024
Subjects:
Online Access:https://arxiv.org/abs/2406.02214
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866916465447272448
author Han, Andi
Li, Jiaxiang
Huang, Wei
Hong, Mingyi
Takeda, Akiko
Jawanpuria, Pratik
Mishra, Bamdev
author_facet Han, Andi
Li, Jiaxiang
Huang, Wei
Hong, Mingyi
Takeda, Akiko
Jawanpuria, Pratik
Mishra, Bamdev
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2406_02214
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle SLTrain: a sparse plus low-rank approach for parameter and memory efficient pretraining
Han, Andi
Li, Jiaxiang
Huang, Wei
Hong, Mingyi
Takeda, Akiko
Jawanpuria, Pratik
Mishra, Bamdev
Machine Learning
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.
title SLTrain: a sparse plus low-rank approach for parameter and memory efficient pretraining
topic Machine Learning
url https://arxiv.org/abs/2406.02214