Skip to content

feat(ce): add 9B hybrid elastic rollout recipe - #502

Merged
RexFlux merged 5 commits into
redai-studio:mainfrom
RexFlux:feat/9b-hybrid-elastic-ce
Nov 11, 2026
Merged

RexFlux merged 5 commits into
redai-studio:mainfrom
RexFlux:feat/9b-hybrid-elastic-ce

Conversation

@RexFlux

@RexFlux RexFlux commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

What

Add the Qwen3.5-9B hybrid elastic-rollout CE launch recipe.

Why

Hybrid DCS support is now available on main through #554. Add a dedicated 9B hybrid CE entrypoint so the two training recipes remain independent.

How

The standalone hybrid script uses actor8 (TP4/DP2), two initial rollout engines, and the existing autoscaler policy with a maximum of eight engines. Reference/forward/advantages run on the actor GPUs. The ClearML project, experiment prefix, and log filename identify hybrid runs.

Following the launcher organization in #517, the hybrid script resolves its own checkout, dispatches through the standard Ray entrypoint, groups environment and training arguments, and supports trailing argument overrides and a side-effect-free JSON DRY_RUN=1. It preserves the existing CE script path, model/data root fallbacks, runtime setup hooks, and transport settings.

The full-async script is byte-for-byte identical to main. This PR only adds the hybrid script; framework behavior comes from main.

Testing

  • Ad hoc argument-capture validation: full-async matches main byte-for-byte; the hybrid training argv and runtime-env match the prior script, apart from experiment timestamps. The real CE argument-rewrite function preserves HF/ref checkpoint, ClearML project/name, and save-directory overrides.

  • bash -n passes for both scripts.

  • pre-commit run --all-files --show-diff-on-failure: passed.

  • Independent read-only review found no remaining blockers.

  • 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

An earlier run pinned to fa7320ae08d1a85fe432c3f3bf3a6a3e77e0f551 completed 100 consecutive training steps, six scale-outs from 2 to 8 engines, and one automatic scale-in from 8 to 7, followed by a successful DCS update and normal completion. That is historical validation; this rebase onto 64ffb3f0214c815d4bd366215675d5129c4ae264 has not been rerun on GPUs.

This PR is co-authored with @codex (gpt-6)

@rai-studio-bot

rai-studio-bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Thanks for contributing to Relax, @RexFlux! 感谢你为 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 / 状态
审批人数 ✅ 2/1 · 至少 1 位有仓库 write 或更高权限的人 Approve · 已审批:NINGBENZHE, Aurelius84
团队审批(relax-block-reviewers) ✅ 2/1 · 已审批:NINGBENZHE, Aurelius84
CI ✅ 已通过

@RexFlux
RexFlux marked this pull request as ready for review October 30, 2026 08:56
@RexFlux
RexFlux requested a review from a team October 30, 2026 08:56
@RexFlux
RexFlux enabled auto-merge (squash) October 30, 2026 09:00
@rai-studio-bot

rai-studio-bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Nyanpasu 审查看板

审查状态: ✅ 已通过

审查版本: b2d7ce6

目标分支: main

已完成 b2d7ce6 的单文件 Hybrid recipe 审查,未发现可报告问题。训练资源和配置保持既有约定,新增入口重入、尾部覆盖与 dry-run 边界已核对。

审查阶段进度范围与结果
常规审查 ✅ 已完成 已阅读完整脚本、与前版/新 base 的差异及相关启动 helper。actor8(TP4/DP2)、初始 rollout2 到 max8、模型/数据/优化器等设置保持。当前 pre-commit 与 NPU 集成检查通过,CPU/H20 和 GPU async/VL 检查仍排队。
深度审查 ✅ 已完成 执行一次最小真实 shell 探针(Python 3.12.3,两个选定场景):JSON dry-run 无 Ray 调用/输出目录,且与替身 Ray 捕获的提交 argv/runtime-env 一致;带空格路径、尾部覆盖、setup hook/库路径、blocking 默认及地址优先级符合预期。标准 entrypoint 的导出/exec 与状态包装通过源码核对;未执行真实 Ray 初始化、模型或多节点 GPU(无目标训练环境)。

审查发现

待处理
编号 严重性 问题状态规则来源
暂无待处理的记录。
已解决或已取代
编号 严重性 问题状态规则来源
F1 High severity 保留 PLE 的全 TP 分片导出路径 ✅ 已解决 PLE 分片迭代必须由所有 TP rank 按相同顺序消费
提交范围 · 接收 1 · 建议移出 0 · 待确认 0

接收 1 个文件 · 建议移出 0 个文件 · 待确认 0 个文件。移出与待确认部分暂停深审,不代表审查通过。

文件结论仓库维护必要性依据替代去向或方案
scripts/training/text/run-qwen35-9B-elastic-rollout-hybrid.sh
接收 独立的 9B Hybrid 弹性 CE 入口,将既有训练配置接入标准 Ray 启动并提供参数覆盖和 dry-run。 当前 PR 描述的 Hybrid recipe 需求;既有 actor8/TP4/DP2、rollout2 到 max8 约定。 在 scripts/training/text 中复用已有模型配置、autoscaler 和标准 entrypoint,当前位置合适。
Powered by Nyanpasu with gpt-6.1-sol xhigh, please check the suggestions carefully.

@RexFlux
RexFlux disabled auto-merge October 30, 2026 09:22

@rai-studio-bot rai-studio-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

需要修改

已完成 fa7320ae 的审查;确认一项会使既有 Hybrid 模型配置无法完成权重同步的兼容性回归,需修复后再合入。已复用该 head 的 CI,并核对两个最小 CPU Gloo 边界;本轮未做完整模型或多节点 GPU 验证。

审查面板

Powered by Nyanpasu with gpt-6.1-sol xhigh, please check the suggestions carefully.

Comment thread relax/backends/megatron/actor.py Resolved
Reuse the full-async recipe after hybrid DCS landed in main. Keep the CE branch limited to launch scripts and CPU argument regression coverage.

Co-authored-by: Codex <[email protected]>
@RexFlux
RexFlux force-pushed the feat/9b-hybrid-elastic-ce branch from fa7320a to 5ef7e75 Compare November 10, 2026 14:04
@RexFlux RexFlux changed the title feat(hybrid): enable DCS for elastic rollout CE feat(ce): add 9B hybrid elastic rollout recipe Nov 10, 2026

@rai-studio-bot rai-studio-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

审查通过

已完成 5ef7e75e 的 3 个文件审查,当前 recipe 改动未发现可报告问题;原 PLE 阻塞点已在所依赖的 main 实现中修复并于原线程确认。当前 pre-commit 已通过,CPU/GPU CI 仍在排队或运行;本轮未运行本地测试或多节点 GPU 验证。

审查面板

原线程的修复确认已发布;GitHub 因账号权限拒绝关闭线程,需维护者手动处理。

Powered by Nyanpasu with gpt-6.1-sol xhigh, please check the suggestions carefully.

Restore the full-async script to main and provide an independent hybrid entrypoint. Execute each recipe in isolation to guard against sibling-script dependencies.

Co-authored-by: Codex <[email protected]>

@rai-studio-bot rai-studio-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

审查通过

已完成 92cf2778 的增量审查,未发现可报告问题。独立 Hybrid 脚本保留既有训练参数和资源配置,实验及日志命名已区分;CPU 回归在相邻训练脚本缺席时执行真实 shell 入口。当前 pre-commit 已通过,CPU/GPU CI 尚未完成;本轮未运行本地测试或多节点 GPU 验证。

审查面板

Powered by Nyanpasu with gpt-6.1-sol xhigh, please check the suggestions carefully.

RexFlux and others added 3 commits November 11, 2026 11:33
Follow the grouped launcher structure from PR redai-studio#517, with checkout-local
entrypoint dispatch, argument passthrough and a side-effect-free dry run.
Preserve hybrid training settings, CE overrides and EXP_DIR fallbacks.
Keep the full-async recipe independent and unchanged.

Co-authored-by: Codex <[email protected]>
Keep the hybrid CE contribution limited to its launch recipe.

Co-authored-by: Codex <[email protected]>

@NINGBENZHE NINGBENZHE left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@rai-studio-bot rai-studio-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

审查通过

已完成 b2d7ce63 的启动脚本审查,未发现可报告问题。最小真实 shell 检查确认 dry-run 与提交分支的 argv/runtime-env 一致,路径引用、尾部覆盖和环境字段保留正确;Ray CLI 使用替身,标准入口重入仅做源码核对,未运行真实 Ray 或多节点 GPU。当前 pre-commit、NPU 集成检查已通过,其余 CPU/GPU 检查仍在排队。

审查面板

Powered by Nyanpasu with gpt-6.1-sol xhigh, please check the suggestions carefully.

@RexFlux
RexFlux merged commit 027f8fd into redai-studio:main Nov 11, 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.

4 participants