Skip to content

Commit

Permalink
Added max_steps parameter to set the maximum number of steps to train
Browse files Browse the repository at this point in the history
  • Loading branch information
jshuadvd committed Jul 9, 2024
1 parent f2715ae commit 6b32640
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions train.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ def train(
epochs=10,
gradient_accumulation_steps=4,
resume_from_checkpoint=None,
max_steps=None,
):
"""
Train the LongRoPE model.
Expand All @@ -155,6 +156,7 @@ def train(
epochs (int): Number of training epochs.
gradient_accumulation_steps (int): Number of steps to accumulate gradients.
resume_from_checkpoint (str): Path to a checkpoint to resume training from.
max_steps (int): Maximum number of steps to train. If None, train for full epochs.
Returns:
None
Expand Down

0 comments on commit 6b32640

Please sign in to comment.