resume checkpoint and continue training using deepspeed integration while changing the number of gpus
### System Info

transformers version: 4.28.1
torch version: 1.13+cu116

Can trainer support resuming checkpoint while using different number of gpus?
I saw optimizer states are saved per rank while saving checkpoints, how can i resuming successfully while changing the numer of gpus ?

### Who can help?

_No response_

### Information

- [ ] The official example scripts
- [X] My own modified scripts

### Tasks

- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [X] My own task or dataset (give details below)

### Reproduction

trainer.train(resume_from_checkpoint=checkpoint) 

### Expected behavior

resuming successfully 