What is your question?
Hi team,
inside the readme.md future plan section, i saw that there is a plan to separate gradient computation (the backward step) and the update step (the optimizer step). currently inside dynamicemb, they are fused together.
i would love to have this separation, because this will make gradient accumulation easier. currently when these two steps are fused at loss.backward, the emb get updates for every mini-batch whereas the nn module weight gradients accumulate for a few mini-batches before update at the optimizer.step().
i have the following question:
i guess the gradient computation would be naturally triggered by loss.backward. however, under the distributed training, regarding emb gradient allreduce, will the team make it in a way that the user would have control over when to trigger emb gradient allreduce and the update step? for example, under megatron DDP mode, user has the autonomy over when to call the megatron.finalize_model_grad, and this is separate from the optimizer.step().
thanks!
By submitting this issue, you agree to follow our code of conduct and our contributing guidelines.
What is your question?
Hi team,
inside the readme.md future plan section, i saw that there is a plan to separate gradient computation (the backward step) and the update step (the optimizer step). currently inside dynamicemb, they are fused together.
i would love to have this separation, because this will make gradient accumulation easier. currently when these two steps are fused at loss.backward, the emb get updates for every mini-batch whereas the nn module weight gradients accumulate for a few mini-batches before update at the optimizer.step().
i have the following question:
i guess the gradient computation would be naturally triggered by loss.backward. however, under the distributed training, regarding emb gradient allreduce, will the team make it in a way that the user would have control over when to trigger emb gradient allreduce and the update step? for example, under megatron DDP mode, user has the autonomy over when to call the megatron.finalize_model_grad, and this is separate from the optimizer.step().
thanks!
By submitting this issue, you agree to follow our code of conduct and our contributing guidelines.