vllm - 💡(How to fix) Fix [Bug]: Gemma4MultimodalEmbedder normalization order different from Transformers, causing bad audio inference [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
vllm-project/vllm#40095Fetched 2026-04-18 05:52:36
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Author
Timeline (top)
mentioned ×2subscribed ×2commented ×1labeled ×1

Code Example

Your output of `python collect_env.py` here
RAW_BUFFERClick to expand / collapse

Your current environment

<details> <summary>The output of <code>python collect_env.py</code></summary>
Your output of `python collect_env.py` here
</details>

🐛 Describe the bug

Gemma4MultimodalEmbedder in gemma4_mm.py has different normalization order from the implementation in Transformers. In vllm, the order is:

Linear → RMSNorm(text_dim)

In transformers, the order is

RMSNorm(multimodal_dim) → Linear

This caused regression of ASR accuracy in a short audio clip, generating hallucinations.

Before submitting a new issue...

  • Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.

extent analysis

TL;DR

The most likely fix is to update the normalization order in Gemma4MultimodalEmbedder to match the implementation in Transformers.

Guidance

  • Verify the normalization order in the Transformers library to ensure it is RMSNorm(multimodal_dim) → Linear.
  • Update the Gemma4MultimodalEmbedder in gemma4_mm.py to use the correct normalization order.
  • Test the updated embedder with short audio clips to verify that ASR accuracy has improved and hallucinations are reduced.
  • Review the documentation for any other potential discrepancies between the VLLM and Transformers implementations.

Example

No code snippet is provided as the issue does not contain sufficient information to generate a accurate example.

Notes

The fix assumes that the normalization order is the only discrepancy between the VLLM and Transformers implementations. Other differences may exist and should be investigated.

Recommendation

Apply workaround: Update the Gemma4MultimodalEmbedder to match the Transformers implementation, as this is likely to resolve the regression issue with ASR accuracy.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

vllm - 💡(How to fix) Fix [Bug]: Gemma4MultimodalEmbedder normalization order different from Transformers, causing bad audio inference [1 comments, 2 participants]