Might’ve answered my own question, looking at this piece of documentation: transformers.deepspeed — transformers 4.12.0.dev0 documentation 4
If you pass in an optimizer to Trainer and do not include an “optimizer” in the DeepSpeed configuration, it looks like it will use that passed in optimizer.