deepspeedai / deepspeedai/DeepSpeed
[REQUEST] An option to only save the model state_dict when save_checkpoint(), and how to manually save & load the model state_dict when using ZERO3
Open
@tjruwase is already working on this.
Since Nov 7, 2022.
enhancement
training
- Dominant language
- Python
- Stars
- 43.1k
- Forks
- 5k
- Avg merge
- 4d 15h
- Merged PRs (30d)
- 112
Description
In my training code, I only save & load the model state_dict (no optimizer states). I find this is good enough with a few steps of warmup, and saves lots of space when training a large model (as I have to save very frequently, like once per hour).
However one can't directly save the model state_dict when using ZERO3.
May I know how I can manually request all GPUs to save their partitioned state_dict, And how to manually load these state_dict to each GPU?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.