Skip to content

[release/0.2.0] fix(sglang): preserve DeepStack in v0.5.17 - #793

Merged
SigureMo merged 1 commit into
redai-studio:release/0.2.0from
rai-studio-bot:cherry-pick/788/release/0.2.0
Nov 25, 2026
Merged

SigureMo merged 1 commit into
redai-studio:release/0.2.0from
rai-studio-bot:cherry-pick/788/release/0.2.0

Conversation

@rai-studio-bot

Copy link
Copy Markdown
Contributor

What

Backport the DeepStack residual fix to the retained SGLang v0.5.17 patch.

Why

The deferred MoE reduction in SGLang v0.5.17 can silently drop the Qwen3-VL MoE DeepStack addend. Both the fused normalization call and its explicit-reduction fallback omit post_residual_addition.

How

  • Require an empty post_residual_addition before choosing fused all-reduce and RMSNorm.
  • Run the existing MoE all-reduce fallback and forward the addend to the input layernorm. This follows the equivalent guard in SGLang #41552.

Testing

  • Applied the v0.5.17 patch to the pinned SGLang source with git apply --3way. The resulting communicator matched the GPU-tested file byte for byte and passed Python compilation.

  • Validated the patched runtime with 10 DeepEyes optimizer steps on 16 H20 GPUs. FlashInfer all-reduce fusion was active on all eight TP2 rollout engines, and the rollout probability and log-probability gaps returned to baseline levels.

  • The GPU validation covered the v0.5.17 runtime patch. The full distributed test suite and a fresh Docker image build were outside the validation run.

  • pre-commit run --all-files passes

  • Tests pass (pytest tests/)

  • New tests added (if applicable)

  • Documentation updated (if applicable)

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactoring (no functional changes)
  • Performance improvement
  • CI/CD or build changes

Screenshots / Logs

The targeted validation compared the patched runtime with the original training run and a fusion-disabled reference.


Cherry-pick of #788 (authored by @xiaoliang0601) to release/0.2.0.

## What

Backport the DeepStack residual fix to the retained SGLang v0.5.17
patch.

## Why

The deferred MoE reduction in SGLang v0.5.17 can silently drop the
Qwen3-VL MoE DeepStack addend. Both the fused normalization call and its
explicit-reduction fallback omit `post_residual_addition`.

## How

- Require an empty `post_residual_addition` before choosing fused
all-reduce and RMSNorm.
- Run the existing MoE all-reduce fallback and forward the addend to the
input layernorm. This follows the equivalent guard in [SGLang
#41552](sgl-project/sglang#41552).

## Testing

- Applied the v0.5.17 patch to the pinned SGLang source with `git apply
--3way`. The resulting communicator matched the GPU-tested file byte for
byte and passed Python compilation.
- Validated the patched runtime with 10 DeepEyes optimizer steps on 16
H20 GPUs. FlashInfer all-reduce fusion was active on all eight TP2
rollout engines, and the rollout probability and log-probability gaps
returned to baseline levels.
- The GPU validation covered the v0.5.17 runtime patch. The full
distributed test suite and a fresh Docker image build were outside the
validation run.

- [x] `pre-commit run --all-files` passes
- [ ] Tests pass (`pytest tests/`)
- [ ] New tests added (if applicable)
- [ ] Documentation updated (if applicable)

## Type of Change

- [x] Bug fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update
- [ ] Refactoring (no functional changes)
- [ ] Performance improvement
- [ ] CI/CD or build changes

## Screenshots / Logs

The targeted validation compared the patched runtime with the original
training run and a fusion-disabled reference.
@rai-studio-bot

rai-studio-bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor Author

Thanks for contributing to Relax, @rai-studio-bot! 感谢你为 Relax 做出贡献!

📚 Contribution guide / 贡献指南

Describe the problem, your changes, and how you validated them. Keep each PR focused and run pre-commit run --all-files before submitting.

请说明问题、改动和验证方式,保持 PR 聚焦,并在提交前运行 pre-commit run --all-files。

English contribution guide · 中文贡献指南

🛠️ CI commands / CI 指令
Command / 指令 Usage / 用途
/rerun Retry failed CI / 重跑失败的 CI
/rerun <target> Rerun a workflow or check / 重跑指定 workflow 或检查
/cancel <workflow> Cancel an entire workflow / 取消整个 workflow
/help Show commands and targets / 查看指令和 target
/review Request a code review / 请求代码 review

Put one command on the first line of a new PR comment. Rerun/cancel require PR authorship or repository write access.

在新 PR 评论的首行写一条指令。PR 作者或有仓库写权限的贡献者可以重跑、取消 CI。

CI usage and targets · CI 用法与 target

🔎 Merge requirements / 合入条件

GitHub:⏳ 合入条件未满足

Requirement / 条件 Status / 状态
审批人数 ✅ 1/1 · 至少 1 位有仓库 write 或更高权限的人 Approve · 已审批:SigureMo
团队审批(relax-block-reviewers) ✅ 1/1 · 已审批:SigureMo
CI ⏳ 等待通过

@SigureMo
SigureMo enabled auto-merge (squash) November 25, 2026 08:29
@SigureMo
SigureMo merged commit 95a0d52 into redai-studio:release/0.2.0 Nov 25, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants