I can file an issue but I was thinking that if user creates their custom model by inheriting nn.Module, then AutoModel.from_pretrained won’t work directly if the user passes a path. This is because, the model has not been inherited from PreTrained class. However, PreTrained cass also inherits from nn.Module. Then the examples would have to be modified to load the weights using torch.load. I’m not sure if this is something which everyone would want (not sure). For now, I inherit from Trainer and define my custom save method for now.