DeepSpeed | PyTorch Developer Day 2020

PyTorch · Advanced ·🧬 Deep Learning ·5y ago

Key Takeaways

DeepSpeed is an open-source deep learning training optimization library compatible with PyTorch, introducing system and algorithmic innovations such as ZeRO, 3D parallelism, and 1-bit Adam to improve training efficiency and scalability. The library enables users to train large models with up to 13 billion parameters using a single GPU and provides exceptional speed, skill, and usability.

Full Transcript

[Music] hello everyone i'm ishin i'm a research manager at microsoft today i'd like to share with you deep speed our dl training optimization library towards skill speed and democratizing large-scale training for everyone with great usability we may all experience the challenge of their training it's too slow to train high quality models on massive data we constantly encounter problems like off memory low throughput slow conversions furthermore the optimization ideas and techniques often scattered how to use them collectively and conveniently is non-trivial this motivates our work on deep speed directly target on the challenges we observe striving for three years on training efficiency for high throughput and scalability effectiveness for fast conversions and easy to use for improved development productivity what is deep speed deep speed is a dltrini optimization library on the software stack deep speed is optimization layer standing between dl models and training framework among the frameworks we primarily support pytorch users can leverage performance benefit of deep speed with a few lines of code changes on the pi touch model here is the example of bird model it shows the changes required to use deep speed the primary change is to call deep speed initialize to wrap the model and optimizer then you can think of this wrapped model as a deep speed engine and then with similar syntax as original use it for forward backward pass and parameter update and that's it minimum code changes then deep speed will handle the underlying performance challenges and applies efficiency and effectiveness optimizations that leads to speed and skill more specifically deep speed excels in five areas model skill speed democratization comprised training and usability which we will talk into one by one with respect to model skill state-of-art large models such as nvidia megatron lm and google t5 have about 10 billion parameters deep speed introduces a system breakthrough zero standing for zero redundancy optimizer to conquer the memory and the scaling challenges of very large models xero significantly reduces memory footprint while retaining compute and communication efficiency in the first stage we released last february 0 allows deep speed to run 100 billion parameter models efficiently it also part training of tiering lg 17 billion parameter model the largest model by then we continue to push for the frontier of training systems in early may we release zero tool which adds novel memory optimization on top of zero one and unblocks 200 billion parameter model training while planning to upstream zero related optimization to pytorch this september we release the 3d parallelism a flexible combination of zero power data parallelism with model and pipeline parallelism this allows us to run models with trillion parameters obtaining close to perfect memory and throughput scaling besides skill deep speed also excels in speed for very large models such as those over 25 billion parameters we observe up to 10x faster training comparing with using state-of-the-art model parallelism approach all performance boosts come from improved memory compute communication efficiency of zero this 10x faster training directly translates to up to 10x cost savings besides obtaining more efficient distributed executions through xero we also boost a single device performance we develop the fastest transformer kernels that leads to the world's fastest birth training another mission of deep speed is to democratize dr training for everyone in need from deep speed webinar survey we realized that more than half of our users only have one to four gpus but they do hope to explore advanced dl models and benefit from it in our september release we pushed out zero offload for these users zero offload leverages both cpu and gpu memory for training large models using a machine with a single gpu our users can run models of up to 13 billion parameters without running out of memory 10x bigger than existing approaches while obtaining compatib competitive throughput this feature democratized multi-billion parameter model training using a single gpu another innovation is one bit atom it reduces communication volume of original atom by up to 5x while achieving similar convergence efficiency in communication constraint scenarios like using ethernet we observe up to 3.5 x faster training one bit add-in democratizes distributed training and powers our users to skill on different types of gpu clusters and networks next compressed training compressed training allows us to use condensed form to represent store compute and communicate information deep speed leverage compressed training to save resources boosts training capability and efficiency one example is deep speed space attention compared with classic dense transformers our efficient spas kernel supports 10x longer sequence of model inputs and up to 6x faster training furthermore our spas kernels support efficient execution of flexible splash format and empower users to innovate under customs path structure our second example of compressed training is progressive layer dropping comparing with space attention it shows compressed training at very different granularity much called screen at transformer layer level at each training iteration we carefully drop a subset of layers reducing training time cost per iteration what's surprising is that this does not hurt accuracy instead it obtains comparable accuracy for faster conversions and more robust fine-tuning results last but definitely not the least deep speed is easy to use with only a few lines of code changes we can enable patos model to use deep speed as we showed as a previous bird example furthermore deep speed enables our users to train large models with up to 13 billion parameters using their loved data parallelism without worrying about model parallelism in contrast without deep speed models beyond 1.4 billion parameters will run out of memory with data parallelism alone yet another point on usability deep speed is infrastructure agnostic users can leave widget on their favorite environment like rml and pib systems local nodes and so on in summary in deep speed we drive innovations and share system breakthroughs to offer exceptional skill speed efficiency and good usability now in a bigger picture deep speed is an important part of microsoft's ai at skill initiative the initiative aims to enable next generation ai capabilities at scale across full stack from large-scale infrastructure to system software to models and to fuse ai into product now zooming into the system software layer this speed offers cutting edge system innovations with exceptional speed and skill we deliver this innovation largely and timely to pathology users through deep speed library onyx runtime inshot ort provides a high-performance cross-platform engine accelerated for both inference and training it's optimized for pytorch with deep integration underway we're also actually enabling deep speed innovations in it [Music] error ml offers enterprise grid service supporting the food development lifecycle for building training and deploying machine learning models faster at skill together with other pillars in this initiative our mission is to power everyone in need with the capabilities of ai at scale thank you all for your time to accelerate your model training and trial deep speed more features news tech talks deep dives and codes are available at our website deepspeed.ai and at our github thank you

Original Description

In this talk, Yuxiong He, partner research manager at Microsoft, presents DeepSpeed, an open-source deep learning training optimization library compatible with PyTorch. DeepSpeed introduces system and algorithmic innovations, such as ZeRO, 3D parallelism, 1-bit Adam, etc. It vastly advances large model training by improving scale, speed, cost, and usability, while democratizing it for everyone in need.
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from PyTorch · PyTorch · 0 of 60

← Previous Next →
1 What is PyTorch?
What is PyTorch?
PyTorch
2 PyTorch Tutorial: A Quick Preview
PyTorch Tutorial: A Quick Preview
PyTorch
3 PyTorch Summer Hackathon 2019
PyTorch Summer Hackathon 2019
PyTorch
4 Tips and Tricks on Hacking with PyTorch: A Quick Tutorial by Brad Heintz
Tips and Tricks on Hacking with PyTorch: A Quick Tutorial by Brad Heintz
PyTorch
5 PyTorch 1.2 and PyTorch Hub: A Quick Introduction by Soumith Chintala and Ailing Zhang
PyTorch 1.2 and PyTorch Hub: A Quick Introduction by Soumith Chintala and Ailing Zhang
PyTorch
6 Torchtext 0.4 with Supervised Learning Datasets: A Quick Introduction by George Zhang
Torchtext 0.4 with Supervised Learning Datasets: A Quick Introduction by George Zhang
PyTorch
7 Torchaudio 0.3 with Kaldi Compatibility, New Transforms: A Quick Introduction by Jason Lian
Torchaudio 0.3 with Kaldi Compatibility, New Transforms: A Quick Introduction by Jason Lian
PyTorch
8 Torchvision 0.4 with Support for Video: A Quick Introduction by Francisco Massa
Torchvision 0.4 with Support for Video: A Quick Introduction by Francisco Massa
PyTorch
9 Introduction to Machine Learning for Developers at F8 2019
Introduction to Machine Learning for Developers at F8 2019
PyTorch
10 Powered by PyTorch at F8 2019
Powered by PyTorch at F8 2019
PyTorch
11 Developing and Scaling AI Experiences at Facebook with PyTorch at F8 2019
Developing and Scaling AI Experiences at Facebook with PyTorch at F8 2019
PyTorch
12 New Approaches to Image and Video Reconstruction Using Deep Learning at Facebook at F8 2019
New Approaches to Image and Video Reconstruction Using Deep Learning at Facebook at F8 2019
PyTorch
13 PyTorch Developer Conference 2018: Recap
PyTorch Developer Conference 2018: Recap
PyTorch
14 PyTorch Developer Conference 2018: Keynote & Deep Dive
PyTorch Developer Conference 2018: Keynote & Deep Dive
PyTorch
15 PyTorch Developer Conference 2018: Production & Research Sessions
PyTorch Developer Conference 2018: Production & Research Sessions
PyTorch
16 PyTorch Developer Conference 2018: Cloud & Academia Sessions
PyTorch Developer Conference 2018: Cloud & Academia Sessions
PyTorch
17 PyTorch Developer Conference 2018: Enterprise, Education, & Future of AI Panel
PyTorch Developer Conference 2018: Enterprise, Education, & Future of AI Panel
PyTorch
18 PyTorch Developer Conference 2019 | Full Livestream
PyTorch Developer Conference 2019 | Full Livestream
PyTorch
19 PyTorch Developer Conference 2019: Recap
PyTorch Developer Conference 2019: Recap
PyTorch
20 PyTorch Developer Conference Keynote - Mike Schroepfer
PyTorch Developer Conference Keynote - Mike Schroepfer
PyTorch
21 What’s new in PyTorch 1.3 - Lin Qiao
What’s new in PyTorch 1.3 - Lin Qiao
PyTorch
22 PyTorch Front-End Features: Named Tensors and Type Promotion - Gregory Chanan
PyTorch Front-End Features: Named Tensors and Type Promotion - Gregory Chanan
PyTorch
23 Research to Production: PyTorch JIT/TorchScript Updates - Michael Suo
Research to Production: PyTorch JIT/TorchScript Updates - Michael Suo
PyTorch
24 Quantization - Dmytro Dzhulgakov
Quantization - Dmytro Dzhulgakov
PyTorch
25 PyTorch ONNX Export Support - Lara Haidar, Microsoft
PyTorch ONNX Export Support - Lara Haidar, Microsoft
PyTorch
26 Apex -  Michael Carilli, NVIDIA
Apex - Michael Carilli, NVIDIA
PyTorch
27 Dataloader Design for PyTorch - Tongzhou Wang, MIT
Dataloader Design for PyTorch - Tongzhou Wang, MIT
PyTorch
28 Linear Algebra in PyTorch - Vishwak Srinivasan, CMU
Linear Algebra in PyTorch - Vishwak Srinivasan, CMU
PyTorch
29 PyTorch Mobile - David Reiss
PyTorch Mobile - David Reiss
PyTorch
30 Model Interpretability with Captum - Narine Kokhilkyan
Model Interpretability with Captum - Narine Kokhilkyan
PyTorch
31 Detectron2 - Next Gen Object Detection Library - Yuxin Wu
Detectron2 - Next Gen Object Detection Library - Yuxin Wu
PyTorch
32 Speech Extensions to Fairseq - Dmytro Okhonko
Speech Extensions to Fairseq - Dmytro Okhonko
PyTorch
33 PyTorch on Google Cloud TPUs - Google, Salesforce, Facebook
PyTorch on Google Cloud TPUs - Google, Salesforce, Facebook
PyTorch
34 PyTorch Summer Hackathon Winners - Joe Spisak, Sebastien Arnold, Tristan Deleu
PyTorch Summer Hackathon Winners - Joe Spisak, Sebastien Arnold, Tristan Deleu
PyTorch
35 PyTorch in Robotics - Yisong Yue, Caltech
PyTorch in Robotics - Yisong Yue, Caltech
PyTorch
36 StanfordNLP - Yuhao Zhang, Stanford
StanfordNLP - Yuhao Zhang, Stanford
PyTorch
37 Sotabench for Reproducible Research - Robert Stojnic, Papers with Code
Sotabench for Reproducible Research - Robert Stojnic, Papers with Code
PyTorch
38 Collaborative Natural Language Inference - Sasha Rush, Cornell
Collaborative Natural Language Inference - Sasha Rush, Cornell
PyTorch
39 Privacy Preserving AI - Andrew Trask, OpenMined
Privacy Preserving AI - Andrew Trask, OpenMined
PyTorch
40 CrypTen - Laurens van der Maaten
CrypTen - Laurens van der Maaten
PyTorch
41 PyTorch at Uber - Sidney Zhang, Uber
PyTorch at Uber - Sidney Zhang, Uber
PyTorch
42 PyTorch at Tesla - Andrej Karpathy, Tesla
PyTorch at Tesla - Andrej Karpathy, Tesla
PyTorch
43 PyTorch at Microsoft - Saurabh Tiwary, Microsoft
PyTorch at Microsoft - Saurabh Tiwary, Microsoft
PyTorch
44 PyTorch at Dolby Labs - Vivek Kumar, Dolby Labs
PyTorch at Dolby Labs - Vivek Kumar, Dolby Labs
PyTorch
45 PyTorch Developer Conference 2019 - Panel Discussion
PyTorch Developer Conference 2019 - Panel Discussion
PyTorch
46 Using deep learning and PyTorch to power next gen aircraft at Caltech
Using deep learning and PyTorch to power next gen aircraft at Caltech
PyTorch
47 Named Tensors, Model Quantization, and the Latest PyTorch Features - Part 1
Named Tensors, Model Quantization, and the Latest PyTorch Features - Part 1
PyTorch
48 TorchScript and PyTorch JIT | Deep Dive
TorchScript and PyTorch JIT | Deep Dive
PyTorch
49 Announcing the PyTorch Global Summer Hackathon 2020
Announcing the PyTorch Global Summer Hackathon 2020
PyTorch
50 Opening Up the Black Box: Model Understanding with Captum and PyTorch
Opening Up the Black Box: Model Understanding with Captum and PyTorch
PyTorch
51 PyTorch Mobile Runtime for Android
PyTorch Mobile Runtime for Android
PyTorch
52 Torchvision in 5 minutes
Torchvision in 5 minutes
PyTorch
53 3D Deep Learning with PyTorch3D
3D Deep Learning with PyTorch3D
PyTorch
54 What is Torchtext?
What is Torchtext?
PyTorch
55 TorchAudio: A Quick Intro
TorchAudio: A Quick Intro
PyTorch
56 PyTorch Mobile Runtime for iOS
PyTorch Mobile Runtime for iOS
PyTorch
57 PySlowFast: Deep learning with Video
PySlowFast: Deep learning with Video
PyTorch
58 PyTorch Pruning | How it's Made by Michela Paganini
PyTorch Pruning | How it's Made by Michela Paganini
PyTorch
59 Measuring Fairness in Machine Learning Systems
Measuring Fairness in Machine Learning Systems
PyTorch
60 PyTorch for Hackathons
PyTorch for Hackathons
PyTorch

DeepSpeed is an open-source library that optimizes deep learning training by introducing system and algorithmic innovations such as ZeRO, 3D parallelism, and 1-bit Adam. The library enables users to train large models with up to 13 billion parameters using a single GPU and provides exceptional speed, skill, and usability. By using DeepSpeed, users can improve training efficiency and scalability, and implement compressed training and progressive layer dropping.

Key Takeaways
  1. Install DeepSpeed and import the library
  2. Wrap the model and optimizer with DeepSpeed
  3. Use the wrapped model for forward and backward passes
  4. Implement model parallelism and data parallelism
  5. Use compressed training and progressive layer dropping to improve efficiency
  6. Train large models with up to 13 billion parameters using a single GPU
  7. Implement 3D parallelism and pipeline parallelism
  8. Use DeepSpeed to improve training speed and efficiency
💡 DeepSpeed introduces system and algorithmic innovations such as ZeRO, 3D parallelism, and 1-bit Adam to improve training efficiency and scalability, enabling users to train large models with up to 13 billion parameters using a single GPU.

Related Reads

Up next
RNNs Explained in 60 Seconds #ai #coding #machinelearning
Ascent
Watch →