Skip to content

Commit

Permalink
fix model card upload for PEFT models (OpenAccess-AI-Collective#1043)
Browse files Browse the repository at this point in the history
  • Loading branch information
hamelsmu committed Jan 5, 2024
1 parent f243c21 commit 31d2350
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/axolotl/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,9 @@ def terminate_handler(_, __, model):

if not cfg.hub_model_id:
trainer.create_model_card(model_name=cfg.output_dir.lstrip("./"))
elif cfg.hub_model_id:
# defensively push to the hub to ensure the model card is updated
trainer.push_to_hub()

return model, tokenizer

Expand Down

0 comments on commit 31d2350

Please sign in to comment.