MISA: Memory-Efficient LLMs Optimization with Module-wise Importance Sampling

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Liu, Yuxi, Deng, Renjia, He, Yutong, Wang, Xue, Yao, Tao, Yuan, Kun
Natura: Preprint
Pubblicazione: 2025
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866908764624388096
author Liu, Yuxi
Deng, Renjia
He, Yutong
Wang, Xue
Yao, Tao
Yuan, Kun
author_facet Liu, Yuxi
Deng, Renjia
He, Yutong
Wang, Xue
Yao, Tao
Yuan, Kun
contents The substantial memory demands of pre-training and fine-tuning large language models (LLMs) require memory-efficient optimization algorithms. One promising approach is layer-wise optimization, which treats each transformer block as a single layer and optimizes it sequentially, while freezing the other layers to save optimizer states and activations. Although effective, these methods ignore the varying importance of the modules within each layer, leading to suboptimal performance. Moreover, layer-wise sampling provides only limited memory savings, as at least one full layer must remain active during optimization. To overcome these limitations, we propose Module-wise Importance SAmpling (MISA), a novel method that divides each layer into smaller modules and assigns importance scores to each module. MISA uses a weighted random sampling mechanism to activate modules, provably reducing gradient variance compared to layer-wise sampling. Additionally, we establish an \(\mathcal{O}(1/\sqrt{K})\) convergence rate under non-convex and stochastic conditions, where $K$ is the total number of block updates, and provide a detailed memory analysis showcasing MISA's superiority over existing baseline methods. Experiments on diverse learning tasks validate the effectiveness of MISA. Source code is available at https://github.com/pkumelon/MISA.
format Preprint
id arxiv_https___arxiv_org_abs_2511_00056
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle MISA: Memory-Efficient LLMs Optimization with Module-wise Importance Sampling
Liu, Yuxi
Deng, Renjia
He, Yutong
Wang, Xue
Yao, Tao
Yuan, Kun
Machine Learning
Artificial Intelligence
The substantial memory demands of pre-training and fine-tuning large language models (LLMs) require memory-efficient optimization algorithms. One promising approach is layer-wise optimization, which treats each transformer block as a single layer and optimizes it sequentially, while freezing the other layers to save optimizer states and activations. Although effective, these methods ignore the varying importance of the modules within each layer, leading to suboptimal performance. Moreover, layer-wise sampling provides only limited memory savings, as at least one full layer must remain active during optimization. To overcome these limitations, we propose Module-wise Importance SAmpling (MISA), a novel method that divides each layer into smaller modules and assigns importance scores to each module. MISA uses a weighted random sampling mechanism to activate modules, provably reducing gradient variance compared to layer-wise sampling. Additionally, we establish an \(\mathcal{O}(1/\sqrt{K})\) convergence rate under non-convex and stochastic conditions, where $K$ is the total number of block updates, and provide a detailed memory analysis showcasing MISA's superiority over existing baseline methods. Experiments on diverse learning tasks validate the effectiveness of MISA. Source code is available at https://github.com/pkumelon/MISA.
title MISA: Memory-Efficient LLMs Optimization with Module-wise Importance Sampling
topic Machine Learning
Artificial Intelligence
url https://arxiv.org/abs/2511.00056