Nanobit commited on
Commit
36aaea0
1 Parent(s): 5b6690a

Update trainer.py

Browse files
Files changed (1) hide show
  1. src/axolotl/utils/trainer.py +2 -2
src/axolotl/utils/trainer.py CHANGED
@@ -103,8 +103,8 @@ def setup_trainer(cfg, train_dataset, eval_dataset, model, tokenizer):
103
  group_by_length=cfg.group_by_length,
104
  report_to="wandb" if cfg.use_wandb else None,
105
  run_name=cfg.wandb_run_id if cfg.use_wandb else None,
106
- optim=cfg.optimizer if cfg.optimizer else None,
107
- lr_scheduler_type=cfg.lr_scheduler if cfg.lr_scheduler in ("one_cycle", "log_sweep") else "cosine",
108
  weight_decay=cfg.weight_decay if cfg.weight_decay is not None else 0.0,
109
  **training_arguments_kwargs,
110
  )
 
103
  group_by_length=cfg.group_by_length,
104
  report_to="wandb" if cfg.use_wandb else None,
105
  run_name=cfg.wandb_run_id if cfg.use_wandb else None,
106
+ optim=cfg.optimizer if cfg.optimizer else "adamw_hf",
107
+ lr_scheduler_type=cfg.lr_scheduler if cfg.lr_scheduler and cfg.lr_scheduler not in ("one_cycle", "log_sweep") else "cosine",
108
  weight_decay=cfg.weight_decay if cfg.weight_decay is not None else 0.0,
109
  **training_arguments_kwargs,
110
  )