This commit is contained in:
NanoCode012
2023-05-11 20:22:30 +09:00
committed by GitHub
parent 688c73a81e
commit 52aada7174

View File

@@ -236,7 +236,7 @@ def train(
logging.info(f"Training Completed!!! Saving pre-trained model to {cfg.output_dir}")
# TODO do we need this fix? https://huggingface.co/docs/accelerate/usage_guides/fsdp#saving-and-loading
trainer.save_pretrained(cfg.output_dir)
model.save_pretrained(cfg.output_dir)
# trainer.save_model(cfg.output_dir) # TODO this may be needed for deepspeed to work? need to review another time