Skip to content

Commit

Permalink
Set model to train mode for finetuning (#1525)
Browse files Browse the repository at this point in the history
Signed-off-by: yiliu30 <[email protected]>
  • Loading branch information
yiliu30 authored Jan 11, 2024
1 parent d96e14a commit 061884d
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -892,6 +892,7 @@ def create_and_fill_np_array(start_or_end_logits, dataset, max_len):
teacher_model.eval()
else:
# Prepare everything with our `accelerator`.
model.train()
model, optimizer, train_dataloader, eval_dataloader, lr_scheduler = accelerator.prepare(
model, optimizer, train_dataloader, eval_dataloader, lr_scheduler
)
Expand Down

0 comments on commit 061884d

Please sign in to comment.