How to customize "from_pretrained"

Hello!

I want to customize “from_pretrained” function.
→ I want to load model from huggingface hub by “from_pretrained” function, but I want to change some weight name because I modified models.
For example if a weight_name in hub was “model.decoder.layer.0.fc1.weight”, I want to load the weight as “model.layer.0.fc1.weight”.
How can I do it?

Thanks!

Do you ever find a solution to this?