deepspeedai / deepspeedai/DeepSpeed
[BUG] load checkpoint
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 43.1k
- Forks
- 5k
- Avg merge
- 4d 15h
- Merged PRs (30d)
- 112
Description
Describe the bug
When training with DeepSpeed Zero-1, I use model_engine.save_checkpoint(save_dir, tag=tag) to save the model.
The save_dir like
bf16_zero_pp_rank_0_mp_rank_00_optim_states.pt bf16_zero_pp_rank_2_mp_rank_00_optim_states.pt bf16_zero_pp_rank_4_mp_rank_00_optim_states.pt bf16_zero_pp_rank_6_mp_rank_00_optim_states.pt final_scores.json
bf16_zero_pp_rank_1_mp_rank_00_optim_states.pt bf16_zero_pp_rank_3_mp_rank_00_optim_states.pt bf16_zero_pp_rank_5_mp_rank_00_optim_states.pt bf16_zero_pp_rank_7_mp_rank_00_optim_states.pt mp_rank_00_model_states.pt
During inference, I refer to thie tutorial,
ds_infer_config = {
"type": "ds_model",
"version": 0.0,
"checkpoints": "save_dir",
}
model_engine = deepspeed.init_inference(
model,
checkpoint=ds_infer_config,
)
model_engine.eval()
But the checkpoint is not loaded. Because for the same data, the output of all checkpoints I load is consistent. What's the problem here?
To Reproduce
deepspeed 0.14.4
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 with the DeepSpeed inference tutorial and the init_inference call using the ds_model checkpoint configuration, then compare it with the Zero-1 save_checkpoint output shown in the issue. Reproduce the load with DeepSpeed 0.14.4 and verify whether inference uses the saved checkpoint rather than producing identical outputs across checkpoints.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- distributed-systems, machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100