At step 2.2 - Fine-Tune the Model with the Preprocessed Dataset
How could I save trainer as checkpoint to use later like the checkpoint zip file I download to use in the lab?
I tried to save checkpoint with: trainer.save_model(output_dir)
but the output files look different compared to truocpham/flan-dialogue-summary-checkpoint at main
When I use my above checkpoint, it didn’t work.
That how you save the model
trainer.save_model(“./final_model”)
as suggested from hugging face and that how you load it according to them:
from transformers import AutoModelForSequenceClassification
model = AutoModelForSequenceClassification.from_pretrained(“./final_model”)
Is it same as: instruct_model = AutoModelForSeq2SeqLM.from_pretrained(“./final_model”, torch_dtype=torch.bfloat16)?
Is the transformers’ version affect kind of output files when saving model with trainer.save_model(output_dir)
You can see the files that we download to use for checkpoint contains multiple files.
My purpose, somehow, I can save files from training process like them to use.
I dont know more than that friend, but maybe you can search on the web or hugging face or maybe a suitable LLM might help you!