Conversation
Contributor
🏷️ CI GuideRuns automatically on every eligible PR before approval:
Heavy model tests:
|
Restore the original AITER MoE max_num_tokens sizing in moe.py while leaving the rest of 59fe613 intact. Co-authored-by: Cursor <cursoragent@cursor.com>
Sort imports and combine nested runtime contexts so the PR code style check can pass. Co-authored-by: Cursor <cursoragent@cursor.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.
Summary
Add Qwen3.5 SGLang plugin support for DP-attention layouts, including DP+TP and DP+EP execution.
This change makes the Qwen3.5-specific language-model adapter use the same
SGLangPluginRuntimelifecycle as the generic ATOM SGLang wrapper, and fixes the nested GDN context handling that previously caused rank-divergent collectives.Problem
Qwen3.5 uses a dedicated SGLang language-model adapter instead of the generic ATOM causal-LM wrapper. As a result:
M=0);positionsandinput_ids;[3, num_tokens]were interpreted as three tokens;ForwardContext/DPMetadataand issued a second CPU all-reduce only on ranks with valid GDN metadata, while idle ranks skipped it and later waited in a different collective.The last issue produced a deterministic distributed deadlock: active ranks waited in GDN DP metadata synchronization while idle ranks progressed to the logits all-gather.
Implementation
Qwen3.5 SGLang adapter
plugin_runtime_scopeandSGLangPluginRuntime.input_ids,positions, andinput_embedsto the ATOM decoder.SGLang forward-context bridge
positions,input_ids, orinput_embeds).DPMetadata.[3, num_tokens]positions.dp_uniform_decodeso mixed EXTEND/IDLE steps use the variable-length DP path.GDN context handling
ForwardContextandDPMetadataalready created bySGLangPluginRuntime.This prevents GDN from creating a second, rank-local DP synchronization point.
Parallel layouts covered
For the full-DP SGLang configurations used here:
TPN: attention/dense TP=N, expert TP=N.DPNTPN: attention DP=N with physical attention TP=1; experts use logical TP=N over the DP ranks.DPNEPN: attention DP=N with physical attention TP=1; experts use EP=N and TP=1. When MORI is available, expert tokens use MORI dispatch/combine.