rocm/deepspeed
DeepSpeed is a deep learning optimization library that makes distributed training easy, efficient, and effective.
10x Larger Models
10x Faster Training
Minimal Code Change
DeepSpeed delivers extreme-scale model training for everyone, from data scientists training on massive supercomputers to those training on low-end clusters or even on a single GPU:
Early adopters of DeepSpeed have already produced a language model (LM) with over 17B parameters called Turing-NLG, establishing a new SOTA in the LM category.
DeepSpeed is an important part of Microsoft’s new AI at Scale initiative to enable next-generation AI capabilities at scale, where you can find more information here.
For further documentation, tutorials, and technical deep-dives please see deepspeed.ai!
Section | Description |
---|---|
Why DeepSpeed? | DeepSpeed overview |
Install | Installation details |
Features | Feature list and overview |
Further Reading | Documentation, tutorials, etc. |
Contributing | Instructions for contributing |
Publications | Publications related to DeepSpeed |
Videos | Videos related to DeepSpeed |
Training advanced deep learning models is challenging. Beyond model design, model scientists also need to set up the state-of-the-art training techniques such as distributed training, mixed precision, gradient accumulation, and checkpointing. Yet still, scientists may not achieve the desired system performance and convergence rate. Large model sizes are even more challenging: a large model easily runs out of memory with pure data parallelism and it is difficult to use model parallelism. DeepSpeed addresses these challenges to accelerate model development and training.
The quickest way to get started with DeepSpeed is via pip, this will install the latest release of DeepSpeed which is not tied to specific PyTorch or CUDA versions. DeepSpeed includes several C++/CUDA extensions that we commonly refer to as our 'ops'. By default, all of these extensions/ops will be built just-in-time (JIT) using torch's JIT C++ extension loader that relies on ninja to build and dynamically link them at runtime.
Note:PyTorch must be installed before installing DeepSpeed.
pip install deepspeed
After installation, you can validate your install and see which extensions/ops your machine is compatible with via the DeepSpeed environment report.
ds_report
If you would like to pre-install any of the DeepSpeed extensions/ops (instead of JIT compiling) or install pre-compiled ops via PyPI please see our advanced installation instructions.
On Windows you can build wheel with following steps, currently only inference mode is supported.
python setup.py bdist_wheel
to build wheel in dist
folderBelow we provide a brief feature list, see our detailed feature overview for descriptions and usage.
torch.optim.Optimizer
All DeepSpeed documentation can be found on our website: deepspeed.ai
Article | Description |
---|---|
DeepSpeed Features | DeepSpeed features |
Getting Started | First steps with DeepSpeed |
DeepSpeed JSON Configuration | Configuring DeepSpeed |
API Documentation | Generated DeepSpeed API documentation |
CIFAR-10 Tutorial | Getting started with CIFAR-10 and DeepSpeed |
Megatron-LM Tutorial | Train GPT2 with DeepSpeed and Megatron-LM |
BERT Pre-training Tutorial | Pre-train BERT with DeepSpeed |
Learning Rate Range Test Tutorial | Faster training with large learning rates |
1Cycle Tutorial | SOTA learning schedule in DeepSpeed |
DeepSpeed welcomes your contributions! Please see our contributing guide for more details on formatting, testing, etc.
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
docker pull rocm/deepspeed