Skip to content

Commit

Permalink
fix: append first_epoch
Browse files Browse the repository at this point in the history
  • Loading branch information
zanussbaum committed Mar 27, 2023
1 parent 8e22a72 commit b24ca03
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions train.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ def train(accelerator, config):

with accelerator.main_process_first():
train_dataloader, val_dataloader = load_data(config, tokenizer)



checkpoint = config["gradient_checkpointing"]
model = AutoModelForCausalLM.from_pretrained(config["model_name"],
use_cache=False if checkpoint else True,
Expand Down Expand Up @@ -164,7 +164,7 @@ def train(accelerator, config):
accelerator.wait_for_everyone()
unwrapped_model = accelerator.unwrap_model(model)
if accelerator.is_main_process:
unwrapped_model.push_to_hub(config["save_name"], private=True)
unwrapped_model.push_to_hub(config["save_name"] + "_first_epoch", private=True)


accelerator.wait_for_everyone()
Expand Down

0 comments on commit b24ca03

Please sign in to comment.