functionality, when [Trainer] is not used.
When using [Trainer] everything is automatically taken care of.
When not using [Trainer], to efficiently deploy DeepSpeed stage 3, you must instantiate the
[~deepspeed.HfDeepSpeedConfig] object before instantiating the model.
For example for a pretrained model:
```python
from transformers.deepspeed import HfDeepSpeedConfig
from transformers import AutoModel, deepspeed
ds_config = {...}  # deepspeed config object or path to the file
must run before instantiating the model
dschf = HfDeepSpeedConfig(ds_config)  # keep this object alive
model = AutoModel.from_pretrained("gpt2")
engine = deepspeed.initialize(model=model, config_params=ds_config, ...)
```
or for non-pretrained model:
```python
from transformers.deepspeed import HfDeepSpeedConfig
from transformers import AutoModel, AutoConfig, deepspeed
