Skip to content

Commit

Permalink
add save_only_model option (axolotl-ai-cloud#1634)
Browse files Browse the repository at this point in the history
  • Loading branch information
jquesnelle authored May 17, 2024
1 parent 891ae8a commit 702a669
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/axolotl/core/trainer_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -1123,6 +1123,8 @@ def build(self, total_num_steps):
# default to saving each epoch if not defined
training_arguments_kwargs["save_strategy"] = "epoch"

training_arguments_kwargs["save_only_model"] = self.cfg.save_only_model

if self.cfg.do_bench_eval:
training_arguments_kwargs["do_bench_eval"] = self.cfg.do_bench_eval
if self.cfg.bench_dataset:
Expand Down
1 change: 1 addition & 0 deletions src/axolotl/utils/config/models/input/v0_4_1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,7 @@ class Config:
logging_steps: Optional[int] = None
early_stopping_patience: Optional[int] = None
load_best_model_at_end: Optional[bool] = False
save_only_model: Optional[bool] = False

neftune_noise_alpha: Optional[float] = None

Expand Down

0 comments on commit 702a669

Please sign in to comment.