Training LLMs presents significant memory challenges due to growing size of data, weights, and optimizer states. Techniques such as data and model parallelism, gradient checkpointing, and offloading strategies address this issue but are often infeasible due to hardware constraints. To mitigate memory usage, alternative methods like Parameter-Efficient-Fine-Tuning (PEFT) and GaLore approximate weights or optimizer states. PEFT methods, such as LoRA, have gained popularity for fine-tuning LLMs, though they require a full-rank warm start. In contrast, GaLore allows full-parameter learning while being more memory-efficient. This work introduces Natural GaLore, a simple drop in replacement for AdamW, which efficiently applies the inverse Empirical Fisher Information Matrix to low-rank gradients using Woodbury's Identity. We demonstrate that incorporating second-order information speeds up optimization significantly, especially when the iteration budget is limited. Empirical pretraining on 60M, 130M, 350M, and 1.1B parameter Llama models on C4 data demonstrate significantly lower perplexity over GaLore without additional memory overhead. By fine-tuning RoBERTa on the GLUE benchmark using Natural GaLore, we demonstrate significant reduction in gap 86.05% vs 86.28% for full-finetuning. Furthermore, fine-tuning the TinyLlama 1.1B model for function calling using the TinyAgent framework shows that Natural GaLore achieving 83.09% accuracy on the TinyAgent dataset, significantly outperforms 16-bit LoRA at 80.06% and even surpasses GPT4-Turbo by 4%, all while using 30% less memory.
All code to reproduce the results are available at: https://github.com/selfsupervised-ai/Natural-GaLore.git
FRUGAL: Memory-Efficient Optimization by Reducing State Overhead for Scalable Training
Moscow Institute of Physics and Technology, Russia(莫斯科物理技术学院);Ivannikov Institute for System Programming RAS, Russia(伊万诺夫系统编程研究所);Skolkovo Institute of Science and Technology, Russia(斯克尔罗沃科学与技术研究所);Mohamed bin Zayed University of Artificial Intelligence, UAE(穆罕默德·本·扎耶德人工智能大学)
本文提出 FRUGAL 框架,通过梯度拆分实现全秩更新,在低维方向使用 Adam 等高内存优化器、其余方向使用 SGD 等无状态方法,从而在固定内存预算下提升预训练和微调性能。
Fira: Can We Achieve Full-rank Training of LLMs Under Low-rank Constraint?
Beijing Institute of Technology(北京理工大学);School of Intelligence Science and Technology, Peking University(北京大学智能科学与技术学院);MMLab, The Chinese University of Hong Kong(香港中文大学MMLab);Hebei Province Key Laboratory of Big Data Science and Intelligent Technology(河北省大数据科学与智能技术重点实验室)
HyperAdaLoRA: Accelerating LoRA Rank Allocation During Training via Hypernetworks without Sacrificing Performance
Harvard University(哈佛大学);University of Chinese Academy of Sciences(中国科学院大学);Fudan University(复旦大学);University of Chicago(芝加哥大学);University of Alabama at Birmingham(阿拉巴马大学伯明翰分校);South China Normal University(华南师范大学);Shanghai Artificial Intelligence Laboratory(上海人工智能实验室);Shanghai University of Engineering Science(上海工程技术大学)
Accelerating Multi-Model Inference by Merging DNNs of Different Weights
Seoul National University(首尔国立大学);Qualcomm AI Research(高通人工智能研究院)
已被证明在机器学习任务上表现良好的标准化DNN模型被广泛使用,并经常被原样采用以解决下游任务,形成了迁移学习范式。然而,当从GPU服务器的集群服务这种DNN模型的多个实例时,用于提高GPU利用率的现有技术(诸如GPU)是不适用的,因为模型通常由于微调而不共享权重。我们提出了一种融合多个DNN模型的技术,这些模型共享相同的架构,但具有不同的权重和不同的输入。通过将操作替换为更一般的对应操作,可以使Networds成为可能,这些操作允许一组权重仅与某组输入相关联。在ResNet-50、ResNeXt-50、BERT和XLNet上进行的实验表明,NetCore在合并32个模型实例时,可以将DNN推理时间在NVIDIA V100 GPU上加快3.6倍,在TITAN Xp GPU上加快3.0倍,同时仅使用少量额外的GPU内存。
A Memory Efficient Randomized Subspace Optimization Method for Training Large Language Models
Beijing International Center for Mathematical Research, Peking University(北京大学北京数学科学中心);Center for Data Science, Peking University(北京大学数据科学中心);Center for Machine Learning Research, Peking University(北京大学机器学习研究中心)
Rethinking LoRA for Data Heterogeneous Federated Learning: Subspace and State Alignment
College of Computing and Data Science, Nanyang Technological University, Singapore.(南洋理工大学计算机与数据科学学院);Department of Electrical and Computer Engineering, The University of British Columbia, Vancouver, BC, Canada.(不列颠哥伦比亚大学电子与计算机工程系);Vector Institute, Canada(加拿大向量研究所);The Hong Kong Polytechnic University(香港理工大学)
MLorc: Momentum Low-rank Compression for Memory Efficient Large Language Model Adaptation
University of Virginia(弗吉尼亚大学);National University of Singapore(新加坡国立大学);Meta;University of Massachusetts Amherst(马萨诸塞大学阿姆赫斯特分校);University of Wisconsin-Madison(威斯康星大学麦迪逊分校)
Accelerating Neural Network Training: An Analysis of the AlgoPerf Competition
Google DeepMind(谷歌DeepMind);University of Tübingen(蒂宾根大学);University of Cambridge(剑桥大学);Vector Institute(向量研究所);University of Toronto(多伦多大学);Dalhousie University(达尔豪斯大学);Meta
Accelerating Stroke MRI with Diffusion Probabilistic Models through Large-Scale Pre-training and Target-Specific Fine-Tuning
Chandra Family Department of Electrical and Computer Engineering(查克拉家族电气与计算机工程系);Department of Imaging Physics(成像物理系);Dell Medical School Department of Neurology(德莱尔医学院神经学系);Dell Medical School Department of Neurosurgery(德莱尔医学院神经外科系);Dell Medical School Department of Diagnostic Medicine(德莱尔医学院诊断医学系);Oden Institute for Computational Engineering and Sciences(奥登计算工程与科学研究院)
Lotus: Efficient LLM Training by Randomized Low-Rank Gradient Projection with Adaptive Subspace Switching
Hong Kong Baptist University, School of Science, Hong Kong, China(香港 Baptist 大学,科学学院,香港,中国);Fudan University, School of Data Science, Shanghai, China(复旦大学,数据科学学院,上海,中国);New York University, Tandon School of Engineering, New York, USA(纽约大学,Tandon 工程学院,纽约,美国)
Trainable Weight Averaging: Accelerating Training and Improving Generalization
Shanghai Jiao Tong University(上海交通大学);KU Leuven(鲁汶大学);National Taiwan University(台湾大学);Mohamed bin Zayed University of Artificial Intelligence(穆罕默德·本·扎耶德人工智能大学)
Scalable Parameter and Memory Efficient Pretraining for LLM: Recent Algorithmic Advances and Benchmarking
Department of Electrical and Computer Engineering, University of Minnesota(明尼苏达大学电气与计算机工程系);Peking University(北京大学);School of Mathematics and Statistics, University of Sydney(悉尼大学数学与统计学学院)
Accelerating Generalized Linear Models with MLWeaving: A One-Size-Fits-All System for Any-precision Learning (Technical Report)
Systems Group, Department of Computer Science ETH Zurich(苏黎世联邦理工学院计算机科学系系统组);ETH Zurich(苏黎世联邦理工学院);Department of Computer Science ETH Zurich(苏黎世联邦理工学院计算机科学系);Computer Science ETH Zurich(苏黎世联邦理工学院计算机科学)