Adding save-steps to the SFTConfig
This commit is contained in:
parent
f453791916
commit
6e4cde3bf8
1 changed files with 6 additions and 0 deletions
|
|
@ -562,6 +562,12 @@ class UnslothTrainer:
|
|||
config_args["warmup_steps"] = 5
|
||||
print(f"Using default warmup_steps: 5\n")
|
||||
|
||||
# Add save_steps if specified
|
||||
save_steps_val = training_args.get('save_steps', 0)
|
||||
if save_steps_val and save_steps_val > 0:
|
||||
config_args["save_steps"] = save_steps_val
|
||||
config_args["save_strategy"] = "steps"
|
||||
|
||||
# If max_steps is specified, use it instead of epochs
|
||||
max_steps_val = training_args.get('max_steps', 0)
|
||||
if max_steps_val and max_steps_val > 0:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue