🐛 Describe the bug
In the current code, there is a lack of processing for offload when comes to checkpoints.
For example, with offload, the device of optimizer state should be CPU, which leads to an error when comm.
Besides, when loading the checkpoint, the device of the optimizer state should follow the original one rather than the loaded one. However, now it's just the opposite.
Environment
No response
🐛 Describe the bug
In the current code, there is a lack of processing for offload when comes to checkpoints.
For example, with offload, the device of optimizer state should be
CPU, which leads to an error when comm.Besides, when loading the checkpoint, the device of the optimizer state should follow the original one rather than the loaded one. However, now it's just the opposite.
Environment
No response