Create a new model from scratch

I’m trying to create a new model based on RoBERTa. I created a new folder in transformers/src/transformers/model, modified the files from RoBERTa and put them inside the folder. However, it’s showing OSError: <model> does not appear to have a file named config.json. Checkout '<model>/main' for available files. How to resolve this issue?

I’m also wondering there are any practical guide to add a new model into transformers. How to add a model to 🤗 Transformers? makes it too complex and Create a custom architecture doesn’t provide good insights.

Looking forward to your help!