How to create a config.json after saving a model

Was anyone able to resolve this issue ,i.e., converting a custom nn.Module to a huggingface compatible version?