[Paper Review] DeepSpeed Data Efficiency: Improving Deep Learning Model Quality and Training Efficiency via Efficient Data Sampling and Routing
This paper introduces DeepSpeed Data Efficiency, a framework that enhances deep learning model training by combining scalable curriculum learning for efficient data sampling and a novel random layerwise token dropping (random-LTD) technique for data routing. It achieves up to 12.5x reduction in data, time, and cost—down to $3.7K on Azure—while maintaining 95% of baseline model quality in GPT-3 1.3B pretraining, or improving performance under identical resource constraints.
Recent advances on deep learning models come at the price of formidable training cost. The increasing model size is one of the root causes, but another less-emphasized fact is that data scale is actually increasing at a similar speed as model scale, and the training cost is proportional to both of them. Compared to the rapidly evolving model architecture, how to efficiently use the training data (especially for the expensive foundation model pretraining) is both less explored and difficult to realize due to the lack of a convenient framework that focuses on data efficiency capabilities. To this end, we present DeepSpeed Data Efficiency, a framework that makes better use of data, increases training efficiency, and improves model quality. Specifically, we propose and combine two data efficiency techniques: efficient data sampling via a general curriculum learning library, and efficient data routing via a novel random layerwise token dropping technique. For GPT-3 1.3B language model pretraining, our work achieves 12.5x less data/time/cost (\$3.7K if rent on Azure), while still maintaining 95% of model quality compared to baseline with full data and cost (\$46.3K). For GPT-3 1.3B and BERT-large pretraining, our work can also achieve the same model quality with up to 2x less data/time/cost, or achieve better model quality under same data/time/cost. DeepSpeed Data Efficiency is easy to use and tune, enabling us to easily apply it and verify its benefit on additional tasks including GPT-3 MoE model pretraining and small-scale GPT-2/ViT finetuning.
Motivation & Objective
- Address the growing training cost in large-scale deep learning, driven by both model and data scale growth.
- Overcome limitations in existing data efficiency techniques, such as lack of scalability, customization, and compatibility with training pipelines.
- Develop a unified, extensible framework that improves data sampling and routing for both NLP and vision models during pretraining and fine-tuning.
- Enable significant reductions in data, time, and cost without sacrificing model quality, particularly for foundation model pretraining.
- Provide a user-friendly, PyTorch-compatible toolset that supports easy integration and tuning of data efficiency strategies.
Proposed method
- Introduce a general curriculum learning (CL) library based on map-reduce for scalable, metric-driven data analysis and indexing across massive datasets.
- Implement a customizable CL-based data sampler and loader that supports various difficulty metrics and training strategies.
- Propose random layerwise token dropping (random-LTD), a data routing technique that skips computation for a subset of tokens at each transformer layer, reducing FLOPs.
- Design layerwise token dropping to preserve model stability and performance, especially in autoregressive generative models like GPT.
- Integrate the MSLG (Minimum Sample Loss Gradient) strategy to dynamically adjust token dropping based on model loss, improving training efficiency.
- Ensure compatibility with PyTorch and support for diverse models, including GPT-3, BERT-large, ViT, and MoE architectures.
Experimental results
Research questions
- RQ1Can curriculum learning be scaled and generalized to support diverse data sampling strategies in large-scale pretraining without extensive code refactoring?
- RQ2Can a data routing technique like random-LTD outperform existing methods such as TokenBypass in both training efficiency and model quality during pretraining?
- RQ3To what extent can data efficiency techniques reduce training cost while maintaining or improving model performance across different model architectures?
- RQ4How does combining data sampling and routing techniques impact overall training efficiency and model quality in real-world pretraining scenarios?
- RQ5Can the proposed framework be easily extended and tuned across diverse tasks, including MoE models and small-scale fine-tuning?
Key findings
- For GPT-3 1.3B pretraining, DeepSpeed Data Efficiency reduces training cost from $46.3K to $3.7K (12.5x reduction), maintaining 95% of baseline model quality.
- On GPT-3 1.3B and BERT-large pretraining, the framework achieves the same model quality with up to 2x less data, time, and cost, or better performance under identical constraints.
- Random-LTD outperforms TokenBypass across all tested settings: in GPT-2 fine-tuning and GPT-3 350M pretraining, it achieves better perplexity with the same token saving ratio.
- With MSLG integration, random-LTD achieves 1.3x training speedup on ViT models while slightly improving accuracy, outperforming EViT (1.15x speedup) and Peeling the Onion (1.15x speedup).
- The framework enables consistent improvements across diverse tasks, including MoE model pretraining and small-scale GPT-2/ViT fine-tuning, with minimal tuning effort.
- The general curriculum learning library enables scalable, customizable data sampling with minimal pipeline modifications, supporting rapid experimentation across different difficulty metrics.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.