Loading local model checkpoint default behavior

I have been trying to find out how the AutoModelForCausalLM.from_pretrained method decides which checkpoint to load when only the directory of the trained model is specified.

More specifically, I trained a model and have three checkpoint saved locally (one for each training epoch). When I only specify the the parent directory in the from_pretrained method, some model is loaded but I do not know which one.

I think this was just my mistake. I had a call to trainer.model.save_pretrained(f"{OUTPUT_DIR}/{save_path}") at the very end of my script. So i guess the final model was saved in the base directory and should be equal to the last epoch.