Saved in:
Bibliographic Details
Main Authors: Luo, Qijun, Yu, Hengxu, Li, Xiao
Format: Preprint
Published: 2024
Subjects:
Online Access:https://arxiv.org/abs/2404.02827
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866913578386194432
author Luo, Qijun
Yu, Hengxu
Li, Xiao
author_facet Luo, Qijun
Yu, Hengxu
Li, Xiao
contents This work presents BAdam, an optimization method that leverages the block coordinate descent (BCD) framework with Adam's update rule. BAdam offers a memory efficient approach to the full parameter finetuning of large language models. We conduct a theoretical convergence analysis for BAdam in the deterministic case. Experimentally, we apply BAdam to finetune the Llama 3-8B and Llama 3-70B models using a single RTX3090-24GB GPU and 4 A100-80GB GPUs, respectively. The results confirm BAdam's efficiency in terms of memory usage, running time, and optimization capability. Furthermore, the downstream performance evaluation based on MT-bench and math benchmarks shows that BAdam outperforms existing memory efficient baselines such as LoRA. It also demonstrates that BAdam can achieve comparable or even superior performance compared to Adam. Finally, the ablation study using SGD's update rule illustrates the suitability of BCD for finetuning LLMs. Our code can be easily integrated into any PyTorch-based codebase and is available at https://github.com/Ledzy/BAdam.
format Preprint
id arxiv_https___arxiv_org_abs_2404_02827
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle BAdam: A Memory Efficient Full Parameter Optimization Method for Large Language Models
Luo, Qijun
Yu, Hengxu
Li, Xiao
Machine Learning
This work presents BAdam, an optimization method that leverages the block coordinate descent (BCD) framework with Adam's update rule. BAdam offers a memory efficient approach to the full parameter finetuning of large language models. We conduct a theoretical convergence analysis for BAdam in the deterministic case. Experimentally, we apply BAdam to finetune the Llama 3-8B and Llama 3-70B models using a single RTX3090-24GB GPU and 4 A100-80GB GPUs, respectively. The results confirm BAdam's efficiency in terms of memory usage, running time, and optimization capability. Furthermore, the downstream performance evaluation based on MT-bench and math benchmarks shows that BAdam outperforms existing memory efficient baselines such as LoRA. It also demonstrates that BAdam can achieve comparable or even superior performance compared to Adam. Finally, the ablation study using SGD's update rule illustrates the suitability of BCD for finetuning LLMs. Our code can be easily integrated into any PyTorch-based codebase and is available at https://github.com/Ledzy/BAdam.
title BAdam: A Memory Efficient Full Parameter Optimization Method for Large Language Models
topic Machine Learning
url https://arxiv.org/abs/2404.02827