winglian commited on
Commit
1fb0376
·
unverified ·
2 Parent(s): df9c508 915c56c

Merge pull request #23 from NanoCode012/patch-1

Browse files
Files changed (1) hide show
  1. scripts/finetune.py +4 -1
scripts/finetune.py CHANGED
@@ -228,8 +228,11 @@ def train(
228
  logging.info(
229
  f"Training Completed!!! Saving pre-trained model to {cfg.output_dir}"
230
  )
 
 
231
  # TODO do we need this fix? https://huggingface.co/docs/accelerate/usage_guides/fsdp#saving-and-loading
232
- trainer.save_model(cfg.output_dir)
 
233
 
234
 
235
  if __name__ == "__main__":
 
228
  logging.info(
229
  f"Training Completed!!! Saving pre-trained model to {cfg.output_dir}"
230
  )
231
+
232
+
233
  # TODO do we need this fix? https://huggingface.co/docs/accelerate/usage_guides/fsdp#saving-and-loading
234
+ trainer.save_pretrained(cfg.output_dir)
235
+ # trainer.save_model(cfg.output_dir) # TODO this may be needed for deepspeed to work? need to review another time
236
 
237
 
238
  if __name__ == "__main__":