Saving custom and/or finetuned models without the HUB
Is there a way to save a custom and/or finetuned model without using the Huggingface Hub? I am unable to use the service at this time for security reasons. When I try to use the Keras or MLFlow native methods to save the model I run into errors associated with custom layers associated with the Huggingface implementation.Thanks
2022-03-02T10:17:55Z
Hey!if you are using the huggingface trainer you can simply save a model with the commandtrainer.save_model(<Path>)where <Path> is the path as a string where you want to save your model.Maybe you should do the huggingface course to get more information (Transformer models - Hugging Face Course)
2022-03-02T15:08:35Z
Hello, I am currently trying to use the mode.save_pretrained() method using TensorFlow although it doesn’t seem to be working - is this equivalent to the save_model() method with the trainer?
2022-03-02T16:59:02Z
if you have loaded the model via the transformer library and trained the model with the Trainer API then yes it is the equivalent