Shivanandroy / simpleT5

simpleT5 is built on top of PyTorch-lightning⚡️ and Transformers🤗 that lets you quickly train your T5 models.
MIT License
382 stars 61 forks source link

No Model.Save method? #33

Open simonhughes22 opened 2 years ago

simonhughes22 commented 2 years ago

I'd like to save the model. It has a load method, but if i save using model.model.save_pretrained and then use model.load I get:

OSError: Can't load tokenizer for 't5.model'. If you were trying to load it from 'https://huggingface.co/models', make sure you don't have a local directory with the same name. Otherwise, make sure 't5.model' is the correct path to a directory containing all relevant tokenizer files.

Presumably i have to save the tokenizer too somewhere.... It would be easier if there was a model.save(), clearly it's doing this during training but often i need to stop the model mid epoch to validate it and then manually do a save. Seems odd to have a load but not a save.

Thanks for building this library though, it's very easy to use