mlsanityData to 14 Oct 2026

Addax: Utilizing Zeroth-Order Gradients to Improve Memory Efficiency and Performance of SGD for Fine-Tuning Language Models

arXiv 2410.06441 ↗First posted 9 Oct 2024cs.LG cs.CLcited by 11

Not on the map. Why?

Abstract (arXiv)

Fine-tuning language models (LMs) with the Adam optimizer often demands excessive memory, limiting accessibility. The "in-place" version of Stochastic Gradient Descent (IP-SGD) and Memory-Efficient Zeroth-order Optimizer (MeZO) have been proposed to address this. However, IP-SGD still requires substantial memory, and MeZO suffers from slow convergence and degraded final performance due to its zeroth-order nature. This paper introduces Addax, a novel method that improves both memory efficiency and performance of IP-SGD by integrating it with MeZO. Specifically, Addax computes zeroth- or first-order gradients of data points in the minibatch based on their memory consumption, combining these gradient estimates to update directions. By computing zeroth-order gradients for data points that require more memory and first-order gradients for others, Addax overcomes the slow convergence of MeZO and the excessive memory requirement of IP-SGD. Additionally, the zeroth-order gradient acts as a regularizer for the first-order gradient, further enhancing the model's final performance. Theoretically, we establish the convergence of Addax under mild assumptions, demonstrating faster convergence and less restrictive hyper-parameter choices than MeZO. Our experiments with diverse LMs and tasks show that Addax consistently outperforms MeZO regarding accuracy and convergence speed while having a comparable memory footprint. When fine-tuning OPT-13B with one A100 GPU, on average, Addax outperforms MeZO in accuracy/F1 score by 14% and runs 15x faster while using memory similar to MeZO. In our experiments on the larger OPT-30B model, on average, Addax outperforms MeZO in terms of accuracy/F1 score by >16 and runs 30x faster on a single H100 GPU. Moreover, Addax surpasses the performance of standard fine-tuning approaches, such as IP-SGD and Adam, in most tasks with significantly less memory requirement.

Key facts. Cited by 11 papers in the map (data through 14 Oct 2026). Builds on 44 of its 70 references that are in the map. First posted on arXiv 9 Oct 2024.

Builds on

44 of 70 references.

References · 44

  1. 2017Attention Is All You Needcited by 60,361
  2. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
  3. 2020Language Models are Few-Shot Learnerscited by 32,419
  4. 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,305
  5. 2023GPT-4 Technical Reportcited by 18,396
  6. 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,380
  7. 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,372
  8. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 13,028
  9. 2016SQuAD: 100,000+ Questions for Machine Comprehension of Textcited by 4,148
  10. 2021Prefix-Tuning: Optimizing Continuous Prompts for Generationcited by 3,915
  11. 2021The Power of Scale for Parameter-Efficient Prompt Tuningcited by 3,795
  12. 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,673
32 more
  1. 2022OPT: Open Pre-trained Transformer Language Modelscited by 3,512
  2. 2023QLoRA: Efficient Finetuning of Quantized LLMscited by 3,418
  3. 2017A Broad-Coverage Challenge Corpus for Sentence Understanding through Inferencecited by 2,682
  4. 2019ViLBERT: Pretraining Task-Agnostic Visiolinguistic Representations for Vision-and-Language Taskscited by 2,222
  5. 2019BoolQ: Exploring the Surprising Difficulty of Natural Yes/No Questionscited by 2,183
  6. 2015A large annotated corpus for learning natural language inferencecited by 1,847
  7. 2019SuperGLUE: A Stickier Benchmark for General-Purpose Language Understanding Systemscited by 1,729
  8. 2020Don't Stop Pretraining: Adapt Language Models to Domains and Taskscited by 1,565
  9. 2020Making Pre-trained Language Models Better Few-shot Learnerscited by 1,256
  10. 2022LLM.int8(): 8-bit Matrix Multiplication for Transformers at Scalecited by 906
  11. 2016Training Deep Nets with Sublinear Memory Costcited by 848
  12. 2013Stochastic First- and Zeroth-order Methods for Nonconvex Stochastic Programmingcited by 724
  13. 2020Intrinsic Dimensionality Explains the Effectiveness of Language Model Fine-Tuningcited by 671
  14. 2024GaLore: Memory-Efficient LLM Training by Gradient Low-Rank Projectioncited by 463
  15. 2018WiC: the Word-in-Context Dataset for Evaluating Context-Sensitive Meaning Representationscited by 372
  16. 2018Measuring the Intrinsic Dimension of Objective Landscapescited by 370
  17. 2023Fine-Tuning Language Models with Just Forward Passescited by 345
  18. 2022PromptSource: An Integrated Development Environment and Repository for Natural Language Promptscited by 289
  19. 2017How to Escape Saddle Points Efficientlycited by 285
  20. 2015Escaping From Saddle Points --- Online Stochastic Gradient for Tensor Decompositioncited by 243
  21. 2023Full Parameter Fine-tuning for Large Language Models with Limited Resourcescited by 134
  22. 2024Why Transformers Need Adam: A Hessian Perspectivecited by 124
  23. 2024Revisiting Zeroth-Order Optimization for Memory-Efficient LLM Fine-Tuning: A Benchmarkcited by 114
  24. 2020Traces of Class/Cross-Class Structure Pervade Deep Learning Spectracited by 94
  25. 2023HyperAttention: Long-context Attention in Near-Linear Timecited by 85
  26. 2019Visualizing and Understanding the Effectiveness of BERTcited by 67
  27. 2023KDEformer: Accelerating Transformers via Kernel Density Estimationcited by 58
  28. 2019Inducing brain-relevant bias in natural language processing modelscited by 38
  29. 2024Zeroth-Order Fine-Tuning of LLMs with Extreme Sparsitycited by 28
  30. 2020Zeroth-Order Algorithms for Nonconvex Minimax Problems with Improved Complexitiescited by 21
  31. 2021Noisy Gradient Descent Converges to Flat Minima for Nonconvex Matrix Factorizationcited by 15
  32. 2020Mixing ADAM and SGD: a Combined Optimization Methodcited by 8

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 9; 2026: 2.

11 papers.