How to save custom model to get config.json file

It is most reliable if save_pretrained() can be used.