Mini-batch Coresets for Memory-efficient Language Model Training on Data Mixtures
Not on the map. Why?
Abstract (arXiv)
Training with larger mini-batches improves the convergence rate and can yield superior performance. However, training with large mini-batches becomes prohibitive for Large Language Models (LLMs), due to the large GPU memory requirement. To address this problem, an effective approach is finding small mini-batch coresets that closely match the gradient of larger mini-batches. However, this approach becomes infeasible and ineffective for LLMs, due to the highly imbalanced mixture of sources in language data, use of the Adam optimizer, and the very large gradient dimensionality of LLMs. In this work, we address the above challenges by proposing Coresets for Training LLMs (CoLM). First, we show that mini-batch coresets found by gradient matching do not contain representative examples of the small sources w.h.p., and thus including all examples of the small sources in the mini-batch coresets is crucial for optimal performance. Second, we normalize the gradients by their historical exponential to find mini-batch coresets for training with Adam. Finally, we leverage zeroth-order methods to find smooth gradient of the last V-projection matrix and sparsify it to keep the dimensions with the largest normalized gradient magnitude. We apply CoLM to fine-tuning Phi-2, Phi-3, Zephyr, and Llama-3 models with LoRA on MathInstruct and SuperGLUE benchmark. Remarkably, CoLM reduces the memory requirement of fine-tuning by 2x and even outperforms training with 4x larger mini-batches. Moreover, CoLM seamlessly integrates with existing memory-efficient training methods like LoRA, further reducing the memory requirements of training LLMs. Our code is available at https://github.com/BigML-CS-UCLA/CoLM.
Key facts. Cited by 12 papers in the map (data through 7 Oct 2026). Builds on 37 of its 53 references that are in the map. First posted on arXiv 28 Jul 2024.
Builds on
37 of 53 references.
References · 37
- 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,084
- 2021Training Verifiers to Solve Math Word Problemscited by 9,743
- 2021Measuring Mathematical Problem Solving With the MATH Datasetcited by 5,203
- 2016SQuAD: 100,000+ Questions for Machine Comprehension of Textcited by 4,115
- 2020The Pile: An 800GB Dataset of Diverse Text for Language Modelingcited by 2,346
- 2015Learning both Weights and Connections for Efficient Neural Networkscited by 1,998
- 2019SuperGLUE: A Stickier Benchmark for General-Purpose Language Understanding Systemscited by 1,718
- 2023SparseGPT: Massive Language Models Can Be Accurately Pruned in One-Shotcited by 1,090
- 2023LIMA: Less Is More for Alignmentcited by 1,080
- 2021Are NLP Models really able to Solve Simple Math Word Problems?cited by 861
- 2016Training Deep Nets with Sublinear Memory Costcited by 825
- 2024DoRA: Weight-Decomposed Low-Rank Adaptationcited by 740
25 more
- 2013Stochastic First- and Zeroth-order Methods for Nonconvex Stochastic Programmingcited by 716
- 2023Textbooks Are All You Need II: phi-1.5 technical reportcited by 559
- 2024LESS: Selecting Influential Data for Targeted Instruction Tuningcited by 514
- 2023MAmmoTH: Building Math Generalist Models through Hybrid Instruction Tuningcited by 483
- 2024GaLore: Memory-Efficient LLM Training by Gradient Low-Rank Projectioncited by 447
- 2023TinyStories: How Small Can Language Models Be and Still Speak Coherent English?cited by 425
- 2018WiC: the Word-in-Context Dataset for Evaluating Context-Sensitive Meaning Representationscited by 370
- 2023Fine-Tuning Language Models with Just Forward Passescited by 337
- 2018Not All Samples Are Created Equal: Deep Learning with Importance Samplingcited by 323
- 2023From Quantity to Quality: Boosting LLM Performance with Self-Guided Data Selection for Instruction Tuningcited by 301
- 2023TRAK: Attributing Model Behavior at Scalecited by 273
- 2023D4: Improving LLM Pretraining via Document De-Duplication and Diversificationcited by 146
- 2022NumGLUE: A Suite of Fundamental yet Challenging Mathematical Reasoning Taskscited by 110
- 2023MoDS: Model-oriented Data Selection for Instruction Tuningcited by 107
- 2019Accelerating Deep Learning by Focusing on the Biggest Loserscited by 94
- 2024Long Is More for Alignment: A Simple but Tough-to-Beat Baseline for Instruction Fine-Tuningcited by 85
- 2022Same Pre-training Loss, Better Downstream: Implicit Bias Matters for Language Modelscited by 84
- 2024Chain of LoRA: Efficient Fine-tuning of Language Models via Residual Learningcited by 80
- 2023Data Diversity Matters for Robust Instruction Tuningcited by 76
- 2023Tied-Lora: Enhancing parameter efficiency of LoRA with weight tyingcited by 65
- 2022Adaptive Second Order Coresets for Data-efficient Machine Learningcited by 60
- 2023Towards Sustainable Learning: Coresets for Data-efficient Deep Learningcited by 44
- 2024Zeroth-Order Fine-Tuning of LLMs with Extreme Sparsitycited by 27
- 2024An Experimental Design Framework for Label-Efficient Supervised Finetuning of Large Language Modelscited by 22
- 2018Faster Neural Network Training with Approximate Tensor Operationscited by 14
Built on by
Citing papers per year: 2025: 4; 2026: 8.
12 papers.
- 2025Guiding Data Collection via Factored Scaling Curvescited by 10
- 2026Learning as Reasoning Unfolds: Progressive Rollout Allocation for Efficient Reinforcement Learningcited by 7
- 2025Fine-tuning Quantized Neural Networks with Zeroth-order Optimizationcited by 5
- 2025Understanding the Role of Training Data in Test-Time Scalingcited by 4
- 2026Theoretical Perspectives on Data Quality and Synergistic Effects in Pre- and Post-Training Reasoning Modelscited by 3
- 2026UniPROT: Uniform Prototype Selection via Partial Optimal Transport with Submodular Guaranteescited by 2
- 2025GUARD: Guided Unlearning and Retention via Data Attribution for Large Language Modelscited by 1
- 2026Efficient Content-based Recommendation Model Training via Noise-aware Coreset Selectioncited by 0
- 2026Data Distribution as a Lever for Guiding Optimizers Toward Superior Generalization in LLMscited by 0
- 2026Minibatch Selection for Language Models via Partition Matroid Constrained Gradient Matchingcited by 0
- 2026Unifying Data, Memory, and Compute Efficiency in LLM training: A Surveycited by 0
- 2026Every Batch Is Its Own Validation Set: Leave-One-Out Gradient Matching for Online Data Selection in LLM Fine-Tuningcited by 0
- 2026Every Batch Is Its Own Validation Set: Leave-One-Out Gradient Matching for Online Data Selection in LLM Fine-Tuning30 Sep 2026
- 2026Learning as Reasoning Unfolds: Progressive Rollout Allocation for Efficient Reinforcement Learning24 Jul 2026
- 2026Unifying Data, Memory, and Compute Efficiency in LLM training: A Survey9 Jun 2026
- 2026Minibatch Selection for Language Models via Partition Matroid Constrained Gradient Matching6 Jun 2026
- 2026UniPROT: Uniform Prototype Selection via Partial Optimal Transport with Submodular Guarantees13 Apr 2026
- 2026Theoretical Perspectives on Data Quality and Synergistic Effects in Pre- and Post-Training Reasoning Models1 Mar 2026
- 2026Data Distribution as a Lever for Guiding Optimizers Toward Superior Generalization in LLMs31 Jan 2026
- 2026Efficient Content-based Recommendation Model Training via Noise-aware Coreset Selection15 Jan 2026
- 2025Understanding the Role of Training Data in Test-Time Scaling4 Oct 2025
- 2025GUARD: Guided Unlearning and Retention via Data Attribution for Large Language Models12 Jun 2025
- 2025Fine-tuning Quantized Neural Networks with Zeroth-order Optimization19 May 2025
- 2025Guiding Data Collection via Factored Scaling Curves12 May 2025