I have trained a model and saved it, tokenizer as well. During the training I set the load_best_checkpoint_at_end to True and can see the test results, which are good
Now I have another file where I load the model and observe results on test data set. I want to be able to do this without training over and over again. But the test results in the second file where I load the model are worse than the ones right after training.
Is there a way to load the model with best validation checkpoint ?
This is how I save:
and this is how i load:
tokenizer = T5Tokenizer.from_pretrained(model_directory) model = T5ForConditionalGeneration.from_pretrained(model_directory, return_dict=False)