question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

some questions about the source code

See original GitHub issue

I’m pretty interested in the implementation of the ZeRO optimizer because the work is really beyond words. Yet I find some points I cannot understand when reading the source code, so I’m here to ask for some help to understand the DeepSpeed better.

  1. All through the project, I can find the implementation of Gradient Partitioning and Parameter Partitioning here because partitioning param_group['params'] would involve partitioning both the weights(p.data) and gradients(p.grads), but I cannot find where Optimizer State Partitioning is.

  2. shard_list seems to be a temporary variable in the for-loop, which means that it will be discarded for every loop, so what’s the meaning of dist.all_gather here? It seems to have something to do with pipeline. Would you please elaborate it?

  3. What’s the meaning of parameter allgather_size for the FP16_DeepSpeedZeroOptimizer

Would you please also share the presentation slides on the design and implementation of ZeRO ? Thanks a million !

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
sjtusmartboycommented, Mar 31, 2020

@samyam I come to understand the reason of using all_gather in CSRTensor. In the data parallelism, different process will have totally different part of the weight that should be update. So we just all_gather them in the list of indices_device_list and in the list of values_device_list and then make average of these gradients from different devices. csr.to_dense() function will be responsible for calculating the sum of different values if their indices in the indices_device_list happen to be the same.

0reactions
samyamcommented, Apr 3, 2020

Seems like all the questions have been answered here. Closing the issue. @sjtusmartboy , please feel free to reopen if you have any additional questions, comments, or feedback.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Source Coding - Science topic
Is there any open source code oriented to solve differential equations by means of neural networks in Python? Question. 5 answers. Jun 18,...
Read more >
Multiple choice answers easy to find within source code
Hello Team, The multiple choice answers are easy to find within the source code. Is there anything you can advise to avoid or...
Read more >
Frequently Answered Questions - Open Source Initiative
Here are answers to questions we are frequently asked. ... I want to publish some code as Open Source code — can I...
Read more >
What is Source Code in Programming and How Does It Work?
Source code is the fundamental component of a computer program that is created by a programmer. It can be read and easily understood...
Read more >
7 Questions New Developers Ask When Learning How to Code
What programming language should I learn first? · How do we categorize programming languages? · What's the difference between front-end, back-end, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found