From e67245882197c46ce1ac8ce69126567d3717ae3b Mon Sep 17 00:00:00 2001 From: Manan17 Date: Sun, 15 Feb 2026 09:37:54 +0000 Subject: [PATCH] Adding save-steps to the SFTConfig --- studio/backend/core/training/trainer.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/studio/backend/core/training/trainer.py b/studio/backend/core/training/trainer.py index 5a3d8683e2..36067747cd 100644 --- a/studio/backend/core/training/trainer.py +++ b/studio/backend/core/training/trainer.py @@ -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: