Offload lp_grads and lp_params as well for deepspeed >= 0.16.5#947
Offload lp_grads and lp_params as well for deepspeed >= 0.16.5#947hijkzzz merged 1 commit intoOpenRLHF:mainfrom HollowMan6:deepspeed_offload
Conversation
Those offload types are fixed in deepspeedai/DeepSpeed#7050, and they have already been released in 0.16.5. Signed-off-by: Hollow Man <hollowman@opensuse.org>
|
One issue is that when calling |
That's interesting. I didn't experience any errors with this PR, maybe those offloads are not successful even when specified? I will double-check. |
|
@hijkzzz Took a closer look and we did have an additional GPU memory reduction with Reference from the deepspeed code: |
|
Thank you for your discovery. I just thought of another issue — when enabling reward ref offload together with DeepSpeed sleep, it seems like we should also offload the parameters of ref /reward in this way. |
Just did another investigation and it looks like DeepSpeed hasn't added support for the dynamic offload in pure inference mode (when the optimizer is not specified). When the optimizer is not specified, the optimizer will be type
It looks like parameters offload is disabled ac2f0a2, so I guess this is not needed now. If not, this should be straightforward to implement. |
Those offload types are fixed in deepspeedai/DeepSpeed#7050, and they have already been released in 0.16.5.