Skip to content

enable batch_size auto for model eval #2675

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 5, 2025
Merged

enable batch_size auto for model eval #2675

merged 4 commits into from
Aug 5, 2025

Conversation

vkuzo
Copy link
Contributor

@vkuzo vkuzo commented Aug 4, 2025

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:

vkuzo added 2 commits August 4, 2025 11:03
[ghstack-poisoned]
[ghstack-poisoned]
@vkuzo
Copy link
Contributor Author

vkuzo commented Aug 4, 2025

Stack from ghstack (oldest at bottom):

Copy link

pytorch-bot bot commented Aug 4, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/2675

Note: Links to docs will display an error until the docs builds have been completed.

❗ 1 Active SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 4, 2025
vkuzo added a commit that referenced this pull request Aug 4, 2025
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: 9a91dd6
ghstack-comment-id: 3151916665
Pull Request resolved: #2675
@vkuzo vkuzo added the topic: not user facing Use this tag if you don't want this PR to show up in release notes label Aug 4, 2025
[ghstack-poisoned]
vkuzo added a commit that referenced this pull request Aug 4, 2025
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
@vkuzo vkuzo requested review from andrewor14 and jerryzh168 August 4, 2025 18:51
Copy link
Contributor

@jerryzh168 jerryzh168 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

int still works right?

[ghstack-poisoned]
@vkuzo vkuzo changed the base branch from gh/vkuzo/101/head to main August 5, 2025 11:35
vkuzo added a commit that referenced this pull request Aug 5, 2025
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: d4da3ce
ghstack-comment-id: 3151916665
Pull Request resolved: #2675
@vkuzo
Copy link
Contributor Author

vkuzo commented Aug 5, 2025

int still works right?

yes, it does

@vkuzo vkuzo merged commit 18edd01 into main Aug 5, 2025
39 of 49 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. topic: not user facing Use this tag if you don't want this PR to show up in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants