Skip to content

[Bugfix] Fix DP ViT all-gather dtype mismatch when the first parameter is fp32 - #65808

Open
micah-wil wants to merge 3 commits into
vllm-project:mainfrom
ROCm:fix-dp-vit-embed-dtype
Open

micah-wil wants to merge 3 commits into
vllm-project:mainfrom
ROCm:fix-dp-vit-embed-dtype

Conversation

@micah-wil

Copy link
Copy Markdown
Collaborator

Summary

With --mm-encoder-tp-mode data, ranks that get no images all-gather placeholder embeddings whose dtype comes from next(vision_model.parameters()). Since #64111, MiniMax-M3 keeps its patch embedding in fp32 while the tower outputs bf16. Ranks with images then gather bf16 and ranks without gather fp32, so the all-gather mismatches and startup hangs.

This uses the vision model's dtype attribute when it has one, and falls back to the first parameter's dtype otherwise. Other models are unchanged: their dtype either matches the first parameter or isn't defined.

Test plan

  • amd/MiniMax-M3-MXFP4 with -tp 4 --mm-encoder-tp-mode data now starts and serves image requests. Before the fix, it hung after the encoder profile run.
  • Ongoing coverage comes from the nightly MiniMax-M3 evals, which run with --mm-encoder-tp-mode data.

Signed-off-by: Micah Williamson <micah.williamson@amd.com>
Signed-off-by: Micah Williamson <micah.williamson@amd.com>

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@mergify mergify Bot added the bug Something isn't working label Nov 5, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant