Restoring master_params so model can be saved
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 9k
- Forks
- 1.5k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 3
Description
Hi,
When training in O2, the model's parameters are cast to fp16 while keeping a copy of the master parameters in the optimizer. I'm wondering how to restore the master parameters so that the model can be saved using the usual model.state_dict() technique, saving fp32 rather than fp16 params.
Thanks!
Contributor guide
No contributing guide indexed for this repository
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.
Research direction
Start by reviewing O2's optimizer handling of the fp16 model parameters and retained fp32 master parameters, then compare that with the usual model.state_dict() save path. Done means the model can restore or expose fp32 parameters so the standard state_dict() technique saves them instead of fp16 values.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- machine-learning
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100