[ROCm][Spec Decode] Fix EAGLE3 layer0 acceptance collapse - #47854
Open
tanpinsiang wants to merge 1 commit into
Open
[ROCm][Spec Decode] Fix EAGLE3 layer0 acceptance collapse#47854tanpinsiang wants to merge 1 commit into
tanpinsiang wants to merge 1 commit into
Conversation
Use a fused EAGLE3 layer0 RMSNorm+concat path on ROCm only. The unfused layer0 path causes draft-target acceptance collapse on MI355X, while NVIDIA does not need this workaround. Keep the existing fallback path on non-ROCm platforms to avoid changing NVIDIA behavior in this bug-fix PR. Signed-off-by: Tan Pin Siang <tanpinsiang@gmail.com>
tanpinsiang
force-pushed
the
rocm-eagle3-layer0-rmsnorm-fix
branch
from
July 7, 2026 10:55
521f501 to
6bc1003
Compare
Contributor
Author
tanpinsiang
marked this pull request as ready for review
July 7, 2026 16:23
Collaborator
|
I added a comment to the other PR you were preparing: #47882 (comment) |
Contributor
Author
|
Update: vllm-project/recipes#615 now pins the MiniMax-M3 ROCm EAGLE3 recipe to With explicit
So this PR is not required for the recipe path. The PR still fixes/improves other ROCm paths:
I’m happy to keep this open as a ROCm robustness fix, but if @tjtanaa prefer the recipes#615 as the supported solution, I can close this PR. |
Contributor
|
This pull request has merge conflicts that must be resolved before it can be |
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.
Summary
This PR fixes a ROCm-specific EAGLE3 speculative decoding correctness/robustness issue in the first draft decoder layer input-prep path.
The issue is backend-sensitive. ROCm EAGLE3 does not always collapse: forcing the draft model to use
ROCM_AITER_UNIFIED_ATTNis a strong workaround.This PR fixes the ROCm layer0 input-prep path so the default path is usable, and it also improves acceptance when
ROCM_AITER_UNIFIED_ATTNis explicitly used.The change is gated to ROCm with
current_platform.is_rocm(). Non-ROCm platforms keep the existing path.Problem
EAGLE3 depends on the draft model staying aligned with the target model. On ROCm, the first EAGLE3 draft layer currently builds its input with separate RMSNorm and concat operations:
In the default ROCm backend route, the drafter can select
ROCM_ATTN. With that path, acceptance can collapse enough that speculative decoding stops helping.ROCM_AITER_UNIFIED_ATTNavoids much of the collapse and is a good operational workaround, but it is not a substitute for fixing the ROCm layer0 path. In same-batch testing, this PR still improves acceptance and throughput even withROCM_AITER_UNIFIED_ATTN.Fix
For ROCm only, this PR uses a fused layer0 RMSNorm + concat path for EAGLE3:
Non-ROCm platforms keep the existing fallback path unchanged.
Validation
MI355X,
vllm/vllm-openai-rocm:nightly,amd/MiniMax-M3-MXFP4, EAGLE3 draft modelInferact/MiniMax-M3-EAGLE3.Benchmark: random 8192 input / 1024 output, 640 prompts, max concurrency 64,
--num-warmups 2.d63c8e9, spec3, default backendROCM_ATTNd63c8e9, spec3,ROCM_AITER_UNIFIED_ATTNROCM_AITER_UNIFIED_ATTNd63c8e9, spec3,TRITON_ATTNTRITON_ATTNTRITON_ATTNTRITON_ATTNNVIDIA Regression Check
NVIDIA validation was also run against PR.
Output throughput changed by -0.66%, which is within normal run noise for this benchmark.