deepspeedai / deepspeedai/DeepSpeed
[REQUEST] being able to initialize stages 1, 2 engine w/ `optimizer=None`
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 43.1k
- Forks
- 5k
- Avg merge
- 4d 15h
- Merged PRs (30d)
- 112
Description
Similar to how this was done for stage3, would it be possible to have a way to initialize stage 1/2 engine w/o optim+lr_scheduler?
We need it for integrating lm-eval harness into Megatron-Deepspeed which runs in an inference mode. We don't have a choice since the setup is for deepspeed so the easiest is to just load it as is but we don't want to load the optimizer files for inference.
I know unlike stage 3 this feature won't be useful to most users, but in an occasional special cases it will be very handy.
update: to clarify - this is not about not loading optim states from the checkpoint. It's about not allocating the optimizer and being able to pass to initialize optimizer=None, lr_scheduler=None. This has been implemented in Z3.
Thank you.
@jeffra
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.
Research direction
Start at the stage 1/2 engine initialize path and compare it with the stage 3 behavior referenced in the issue. Trace how the optimizer and lr_scheduler are allocated for inference. Done means stage 1/2 accepts optimizer=None, lr_scheduler=None without allocating optimizer state while preserving existing training behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- distributed-systems, machine-learning
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100