From 0e74b6402ebf5b6dcb09fec3f47f490a66b27dea Mon Sep 17 00:00:00 2001 From: NanoCode012 Date: Sat, 6 May 2023 22:21:24 +0900 Subject: [PATCH] Add eval_batch_size for evaluation --- README.md | 1 + src/axolotl/utils/trainer.py | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index 80b13c203..0a2c64e35 100644 --- a/README.md +++ b/README.md @@ -85,6 +85,7 @@ output_dir: ./completed-model # training hyperparameters batch_size: 8 micro_batch_size: 2 +eval_batch_size: 2 num_epochs: 3 warmup_steps: 100 learning_rate: 0.00003 diff --git a/src/axolotl/utils/trainer.py b/src/axolotl/utils/trainer.py index 8ce05ba12..e94ea48d6 100644 --- a/src/axolotl/utils/trainer.py +++ b/src/axolotl/utils/trainer.py @@ -47,6 +47,7 @@ def setup_trainer(cfg, train_dataset, eval_dataset, model, tokenizer): training_args = transformers.TrainingArguments( per_device_train_batch_size=cfg.micro_batch_size, + per_device_eval_batch_size=cfg.eval_batch_size, gradient_accumulation_steps=cfg.gradient_accumulation_steps, num_train_epochs=cfg.num_epochs, learning_rate=cfg.learning_rate,