Global patch for t.compile high warmup time on MoE models - #1452
Open
tvoas wants to merge 3 commits into
Open
Conversation
tvoas
requested review from
PatrykWo,
adobrzyn,
afierka-intel,
iboiko-habana,
jbyczkow,
kamil-kaczor,
ksmusz,
mgawarkiewicz-intel,
michalkuligowski and
xuechendi
as code owners
May 17, 2026 14:32
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Introduces a global “zero residual” forward patch intended to avoid Dynamo recompilations for certain MoE models, and removes model-specific residual overrides/registrations in favor of this centralized approach.
Changes:
- Install a global model forward patch from
HpuModelAdapterto initialize residual tensors as zeros for eligible decoder stacks. - Remove Qwen3 MoE and Llama4 per-model “residual=zeros” wrapper classes and associated registration.
- Simplify Qwen3 MoE module to only keep in-place block upgrade logic.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
| vllm_gaudi/v1/worker/hpu_model_runner.py | Adds global patch discovery/installation logic and a patched forward implementation with residual=zeros. |
| vllm_gaudi/models/qwen3_moe.py | Removes HPU wrapper model classes; keeps only MoE block upgrade logic and adjusts imports. |
| vllm_gaudi/models/llama4.py | Removes HpuLlama4Model residual override and updates init patch docs accordingly. |
| vllm_gaudi/models/init.py | Removes Qwen3 MoE HPU model registration. |
Signed-off-by: Tanner Voas <tanner.voas@intel.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Tanner Voas <tanner.voas@intel.com>
tvoas
force-pushed
the
universal_warmup_fix
branch
from
May 26, 2026 07:58
e07d9da to
0f31932
Compare
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Tanner Voas <tanner.voas@intel.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removes model specific override forward() to initialize residual as zeros instead of None which eliminating torch._dynamo type guards. This is now applied Globally for all applicable MoE models.