deepspeedai / deepspeedai/DeepSpeed
Why not save frozen params unless: `self.zero_optimization_stage() >= ZeroStageEnum.gradients`?
Open
@samadejacobs is already working on this.
Since May 13, 2024.
- Dominant language
- Python
- Stars
- 43.1k
- Forks
- 5k
- Avg merge
- 4d 15h
- Merged PRs (30d)
- 112
Description
I've spent 2 days drilling into why my frozen params aren't getting saved, and it comes down to this line:
save_frozen_param = self.zero_optimization_partition_gradients() and not exclude_frozen_parameters
exclude_frozen_parameters is therefore misleading, since that is not the only determinant of whether frozen params get saved.
To make matters more confusing, I am using deepspeed 2, but if I make a breakpoint in that zero_optimization_partiotion_gradients function, I see:
(Pdb) self.zero_optimization_stage()
1
(Pdb) ZeroStageEnum.gradients
<ZeroStageEnum.gradients: 2>
Why is this, and is there a straightforward non-hacky solution to get frozen params to save?
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.