Skip to content

Commit e6fe10e

Browse files
committed
enable batch_size auto for model eval
Summary: enables passing `--batch_size auto` to model eval script on LLaMa 3.1 8B and wikitext + hellaswag, this reduces the runtime from 13 minutes to 4.5 minutes on my machines (a 2.9x speedup) Test Plan: ``` with-proxy time python benchmarks/_models/eval_hf_models.py --model_id meta-llama/Llama-3.1-8B --tasks wikitext hellaswag --batch_size auto ``` Reviewers: Subscribers: Tasks: Tags: ghstack-source-id: 91c5dd0 ghstack-comment-id: 3151916665 Pull Request resolved: #2675
1 parent f40bd5a commit e6fe10e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

benchmarks/_models/eval_hf_models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def run(
147147
"--device", type=str, default="cuda:0", help="Device to run the model on."
148148
)
149149
parser.add_argument(
150-
"--batch_size", type=int, default=1, help="Batch size for lm_eval."
150+
"--batch_size", type=str, default="auto", help="Batch size for lm_eval."
151151
)
152152
parser.add_argument(
153153
"--prompt",

0 commit comments

Comments
 (0)