diff --git a/src/axolotl/utils/config.py b/src/axolotl/utils/config.py index 93a23f7738..a24eb46efc 100644 --- a/src/axolotl/utils/config.py +++ b/src/axolotl/utils/config.py @@ -217,6 +217,15 @@ def validate_config(cfg): "sample_packing not compatible with xformers_attention. Use flash_attention" ) + if cfg.early_stopping_patience: + if not cfg.save_steps or not cfg.eval_steps: + raise ValueError( + "`early_stopping_patience` requires save_steps and eval_steps to be set. eval_steps should evenly divide save_steps." + ) + if not cfg.save_steps % cfg.eval_steps != 0: + raise ValueError( + "`early_stopping_patience` requires that eval_steps should evenly divide save_steps." + ) # TODO # MPT 7b # https://github.com/facebookresearch/bitsandbytes/issues/25