Add Qwen3.5 model support (27B dense and 35B-A3B MoE)#1641
Merged
Conversation
- New model plugin: slime_plugins/models/qwen3_5.py
- Qwen3_5GatedDeltaNet with separate QKV/Z projections, conv1d, and flat QKV split
- get_qwen3_5_spec replacing standard attention with linear attention per layer_types
- New weight bridge: slime_plugins/mbridge/qwen3_5.py
- Handles VLM weight prefix (model.language_model.layers)
- Fused expert weight format for MoE (3D tensors -> per-expert slices)
- MTP layer support with individual expert format
- New HF converter: slime/backends/megatron_utils/megatron_to_hf/qwen3_5.py
- TEGroupedMLP per-expert weight{i} -> HF fused expert format
- Proper gate/up split for swiglu experts
- Fix sglang_rollout.py: skip processor for text-only VLM models
- Model configs and run scripts for both 27B and 35B-A3B
Tested: Both models verified end-to-end with training.
- 27B: TP=1 SGLang (8 engines), TP=2/PP=2/CP=2 Megatron, logprob_diff=0.017
- 35B-A3B: TP=2 SGLang (4 engines), EP=8 Megatron, logprob_diff=0.012
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
rohin-garg
pushed a commit
to aimosprite/slime
that referenced
this pull request
Feb 28, 2026
Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
dongyuanjushi
pushed a commit
to dongyuanjushi/slime
that referenced
this pull request
Mar 18, 2026
Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.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.
New model plugin: slime_plugins/models/qwen3_5.py
New weight bridge: slime_plugins/mbridge/qwen3_5.py
New HF converter: slime/backends/megatron_utils/megatron_to_hf/qwen3_5.py
Fix sglang_rollout.py: skip processor for text-only VLM models
Model configs and run scripts for both 27B and 35B-A3B
Tested: Both models verified end-to-end with training.