How to save an optimizer without using a model?

I typically run a custom training loop and never associate my optimizer with my model(s) via the compile function. I would like to save my optimizer so I can more easily resume training. What is the best way to save an optimizer in its own file, independent of any model.