Get gradients of parameters #1074
Unanswered
thomas0809
asked this question in
Q&A
Replies: 2 comments 6 replies
-
@thomas0809, can you give more details for this issue. For example, at what point in the training process are you examining the parameters for gradients? |
Beta Was this translation helpful? Give feedback.
1 reply
-
Got it. Your observation is due to the gradient memory optimization of ZeRO stage 2. This optimization frees up fp16 gradient memory after writing the gradients out of the fp32 gradient copies in the optimizer. So |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am using ZeRO optimization (stage 2) to train a model. I am trying to analyze the gradients, but all the parameters in model_engine.module.parameters() have no
.grad
. Where are the gradients located?Beta Was this translation helpful? Give feedback.
All reactions