winglian commited on
Commit
a4329b1
·
1 Parent(s): 550502b

fix #16 load best model setting when using 8bit

Browse files
Files changed (1) hide show
  1. src/axolotl/utils/trainer.py +1 -1
src/axolotl/utils/trainer.py CHANGED
@@ -97,7 +97,7 @@ def setup_trainer(cfg, train_dataset, eval_dataset, model, tokenizer):
97
  output_dir=cfg.output_dir,
98
  save_total_limit=3,
99
  load_best_model_at_end=True
100
- if cfg.val_set_size > 0 and save_steps % eval_steps == 0
101
  else False,
102
  ddp_find_unused_parameters=False if cfg.ddp else None,
103
  group_by_length=cfg.group_by_length,
 
97
  output_dir=cfg.output_dir,
98
  save_total_limit=3,
99
  load_best_model_at_end=True
100
+ if cfg.val_set_size > 0 and save_steps % eval_steps == 0 and cfg.load_in_8bit is not True
101
  else False,
102
  ddp_find_unused_parameters=False if cfg.ddp else None,
103
  group_by_length=cfg.group_by_length,