DeepSpeed is a deep learning optimization library that makes distributed training and inference easy, efficient, and effective.
Перейти к файлу
Reza Yazdani aca7fc549a
Add local attention for GPT-Neo model architecture (#1114)
* fix links for inference tutorial

* Fix automatic injection. Add the local-attention for GPT-Neo

* fix the inference for generation of large sequences (>1K & <32K)

* fix format

Co-authored-by: Jeff Rasley <jerasley@microsoft.com>
2021-06-08 11:44:59 -07:00
.github/workflows Quantization + inference release (#1091) 2021-05-24 01:10:39 -07:00
DeepSpeedExamples@25d73cf73f Quantization + inference release (#1091) 2021-05-24 01:10:39 -07:00
azure Fix urls in tutorial (#436) 2020-09-24 14:10:56 -07:00
bin Add executable permission to `ds_elastic` and `ds_report` in `bin`. (#711) 2021-02-01 14:41:20 -08:00
csrc Add local attention for GPT-Neo model architecture (#1114) 2021-06-08 11:44:59 -07:00
deepspeed Add local attention for GPT-Neo model architecture (#1114) 2021-06-08 11:44:59 -07:00
docker ZeRO 3 Offload (#834) 2021-03-08 12:54:54 -08:00
docs adjust azureml-examples links (#1015) 2021-06-08 09:33:26 -07:00
op_builder [builder] allow minor cuda version differences (#1139) 2021-06-07 13:50:03 -07:00
requirements remove triton version to use the latest stable pypi version (#1128) 2021-06-02 18:43:12 -07:00
tests remove old unit test, should have been removed in rebase (#1097) 2021-06-08 09:34:21 -07:00
.clang-format Sparse attn + ops/runtime refactor + v0.3.0 (#343) 2020-09-01 18:06:15 -07:00
.gitignore DeepSpeed JIT op + PyPI support (#496) 2020-11-12 11:51:38 -08:00
.gitmodules DeepSpeed JIT op + PyPI support (#496) 2020-11-12 11:51:38 -08:00
.pre-commit-config.yaml Transformer kernel release (#242) 2020-05-29 13:15:36 -07:00
.pylintrc submodule and style dot files 2020-01-31 16:58:15 -08:00
.readthedocs.yml readthedocs yaml configuration (#410) 2020-09-16 18:57:43 -07:00
.style.yapf submodule and style dot files 2020-01-31 16:58:15 -08:00
CODEOWNERS Add code owners for DeepSpeed team (#335) 2020-08-27 10:14:22 -07:00
CODE_OF_CONDUCT.md Initial CODE_OF_CONDUCT.md commit 2020-01-23 15:23:15 -08:00
CONTRIBUTING.md Doc edits, typos, etc. (#53) 2020-02-10 04:51:51 -08:00
LICENSE Initial LICENSE commit 2020-01-23 15:23:17 -08:00
MANIFEST.in update manifest 2020-11-25 15:19:14 -08:00
README.md add press release link (#1094) 2021-05-24 10:58:04 -07:00
SECURITY.md Initial SECURITY.md commit 2020-01-23 15:23:21 -08:00
install.sh ZeRO 3 Offload (#834) 2021-03-08 12:54:54 -08:00
setup.cfg Seeded unit tests (#1072) 2021-05-13 15:20:59 -07:00
setup.py Create symlinks on Windows setup (#1099) 2021-05-24 22:53:44 -07:00
version.txt Quantization + inference release (#1091) 2021-05-24 01:10:39 -07:00

README.md

Build Status PyPI version Documentation Status License MIT Downloads

03/2021: DeepSpeed is hiring! Come join us: SDE 2, Sr. SDE, Sr. Researcher

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:

  • Extreme scale: Using current generation of GPU clusters with hundreds of devices, 3D parallelism of DeepSpeed can efficiently train deep learning models with trillions of parameters.
  • Extremely memory efficient: With just a single GPU, ZeRO-Offload of DeepSpeed can train models with over 10B parameters, 10x bigger than the state of arts, democratizing multi-billion-parameter model training such that many deep learning scientists can explore bigger and better models.
  • Extremely long sequence length: Sparse attention of DeepSpeed powers an order-of-magnitude longer input sequence and obtains up to 6x faster execution comparing with dense transformers.
  • Extremely communication efficient: 3D parallelism improves communication efficiency allows users to train multi-billion-parameter models 2–7x faster on clusters with limited network bandwidth. 1-bit Adam/1-bit LAMB reduce communication volume by up to 5x while achieving similar convergence efficiency to Adam/LAMB, allowing for scaling to different types of GPU clusters and networks.

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 Microsofts 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!

News

Table of Contents

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

Why 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.

Installation

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.

Features

Below we provide a brief feature list, see our detailed feature overview for descriptions and usage.

Further Reading

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

Contributing

DeepSpeed welcomes your contributions! Please see our contributing guide for more details on formatting, testing, etc.

Contributor License Agreement

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.

Code of Conduct

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.

Publications

  1. Samyam Rajbhandari, Jeff Rasley, Olatunji Ruwase, Yuxiong He. (2019) ZeRO: memory optimizations toward training trillion parameter models. arXiv:1910.02054 and In Proceedings of the International Conference for High Performance Computing, Networking, Storage and Analysis (SC '20).
  2. Jeff Rasley, Samyam Rajbhandari, Olatunji Ruwase, and Yuxiong He. (2020) DeepSpeed: System Optimizations Enable Training Deep Learning Models with Over 100 Billion Parameters. In Proceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining (KDD '20, Tutorial).
  3. Minjia Zhang, Yuxiong He. (2020) Accelerating Training of Transformer-Based Language Models with Progressive Layer Dropping. arXiv:2010.13369 and NeurIPS 2020.
  4. Jie Ren, Samyam Rajbhandari, Reza Yazdani Aminabadi, Olatunji Ruwase, Shuangyan Yang, Minjia Zhang, Dong Li, Yuxiong He. (2021) ZeRO-Offload: Democratizing Billion-Scale Model Training. arXiv:2101.06840.
  5. Hanlin Tang, Shaoduo Gan, Ammar Ahmad Awan, Samyam Rajbhandari, Conglong Li, Xiangru Lian, Ji Liu, Ce Zhang, Yuxiong He. (2021) 1-bit Adam: Communication Efficient Large-Scale Training with Adam's Convergence Speed. arXiv:2102.02888.
  6. Samyam Rajbhandari, Olatunji Ruwase, Jeff Rasley, Shaden Smith, Yuxiong He. (2021) ZeRO-Infinity: Breaking the GPU Memory Wall for Extreme Scale Deep Learning. arXiv:2104.07857.
  7. Conglong Li, Ammar Ahmad Awan, Hanlin Tang, Samyam Rajbhandari, Yuxiong He. (2021) 1-bit LAMB: Communication Efficient Large-Scale Large-Batch Training with LAMB's Convergence Speed. arXiv:2104.06069.

Videos

  1. DeepSpeed KDD 2020 Tutorial
    1. Overview
    2. ZeRO + large model training
    3. 17B T-NLG demo
    4. Fastest BERT training + RScan tuning
    5. DeepSpeed hands on deep dive: part 1, part 2, part 3
    6. FAQ
  2. Microsoft Research Webinar
  3. DeepSpeed on AzureML
  4. Community Tutorials