py
ds_config_dict = dict(scheduler=scheduler_params, optimizer=optimizer_params)
args = TrainingArguments(, deepspeed=ds_config_dict)
trainer = Trainer(model, args, )

DeepSpeed and Trainer parameters
There are three types of configuration parameters: