Hi. I have fine-tuned a model, then save it to local disk. But when I load my local mode with pipeline, it looks like pipeline is finding model from online repositories. How can i fix it ? Please help.
My code for training and save model to local disk:
sorry but still same error.
I am running notebooks code in colab, so my absoluted path is /content/my_local_disk
But even when I use absoluted path, it still show error:
OSError: /content/my_local_disk does not appear to have a file named config.json. Checkout 'https://huggingface.co//content/my_local_disk/None' for available files.
The “output_dir” on training args is for saving the checkpoints during refinement. You need to call save_model on your Trainer instance to actually save the model.
@adam-zettafi
thank you for your help. And after that, how can I load saved model ?
Do I still need to define Trainer again ? In this case, I think using pipeline will be better, because we don’t need to duplicated code to define Trainer again
Once you save the model, you can provide the path to the saved model just as you would provide the path to any model. Your code sample was the correct way to load it.