hamel commited on
Commit
31d2350
1 Parent(s): f243c21

fix model card upload for PEFT models (#1043)

Browse files
Files changed (1) hide show
  1. src/axolotl/train.py +3 -0
src/axolotl/train.py CHANGED
@@ -188,6 +188,9 @@ def train(
188
 
189
  if not cfg.hub_model_id:
190
  trainer.create_model_card(model_name=cfg.output_dir.lstrip("./"))
 
 
 
191
 
192
  return model, tokenizer
193
 
 
188
 
189
  if not cfg.hub_model_id:
190
  trainer.create_model_card(model_name=cfg.output_dir.lstrip("./"))
191
+ elif cfg.hub_model_id:
192
+ # defensively push to the hub to ensure the model card is updated
193
+ trainer.push_to_hub()
194
 
195
  return model, tokenizer
196