Skip to content

Conversation

@alex-jw-brooks
Copy link
Contributor

@alex-jw-brooks alex-jw-brooks commented Mar 31, 2025

Currently, the AutoWeightsLoader crashes if it encounters batch normalization stats in the model's safetensors. This is because the bn stats aren't part of the named_parameters, but they are part of the state dict, likely due to the reasons mentioned on the PyTorch forums here.

This PR adds loading the bn stats for the the torch module _BatchNorm's subclasses, as well as some tests that currently throw ValueErrors.

(This fix is needed for the upcoming granite speech models from our group. Currently, there aren't many models in vLLM that use batchnorm except for phi4mm audio, which disables it by default, which is why it probably hasn't popped up before).

CC @njhill @tlrmchlsmth

Signed-off-by: Alex-Brooks <Alex.Brooks@ibm.com>
Signed-off-by: Alex-Brooks <Alex.Brooks@ibm.com>
@github-actions
Copy link

👋 Hi! Thank you for contributing to the vLLM project.

💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels.

Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run fastcheck CI which starts running only a small and essential subset of CI tests to quickly catch errors. You can run other CI tests on top of those by going to your fastcheck build on Buildkite UI (linked in the PR checks section) and unblock them. If you do not have permission to unblock, ping simon-mo or khluu to add you in our Buildkite org.

Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging.

To run CI, PR reviewers can either: Add ready label to the PR or enable auto-merge.

🚀

Copy link
Member

@DarkLight1337 DarkLight1337 left a comment

Choose a reason for hiding this comment

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

Nice catch, thanks for fixing!

@DarkLight1337 DarkLight1337 enabled auto-merge (squash) March 31, 2025 11:08
@github-actions github-actions bot added the ready ONLY add when PR is ready to merge/full CI is needed label Mar 31, 2025
@DarkLight1337 DarkLight1337 merged commit c2e7507 into vllm-project:main Mar 31, 2025
44 of 46 checks passed
Alex4210987 pushed a commit to LeiWang1999/vllm-bitblas that referenced this pull request Apr 5, 2025
…-project#15813)

Signed-off-by: Alex-Brooks <Alex.Brooks@ibm.com>
Signed-off-by: xinyuxiao <xinyuxiao2024@gmail.com>
lulmer pushed a commit to lulmer/vllm that referenced this pull request Apr 7, 2025
…-project#15813)

Signed-off-by: Alex-Brooks <Alex.Brooks@ibm.com>
Signed-off-by: Louis Ulmer <ulmerlouis@gmail.com>
lk-chen pushed a commit to lk-chen/vllm that referenced this pull request Apr 29, 2025
shreyankg pushed a commit to shreyankg/vllm that referenced this pull request May 3, 2025
RichardoMrMu pushed a commit to RichardoMrMu/vllm that referenced this pull request May 12, 2025
…-project#15813)

Signed-off-by: Alex-Brooks <Alex.Brooks@ibm.com>
Signed-off-by: Mu Huai <tianbowen.tbw@antgroup.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready ONLY add when PR is ready to merge/full CI is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants