Repository navigation
feat(fsdp-turbo): add fsdp-turbo backend - #758
Conversation
Squash the main-official changes after c045eb4 onto the current official-fork-1121 baseline, preserving its newer official updates. Include the FSDPTurbo backend, versioned dependency patches, CANN 9.2 container recipe, checkpoint scheduler restoration, CP chunk loss, and RL weight synchronization fixes. Keep only the full-layer Qwen3.8 SFT configuration and 128-NPU launch script; omit reduced-layer experiments and their documentation references. Validation: all repository pre-commit hooks pass. Source-side reduced-layer NPU SFT, RL, CP chunk-loss comparison, and distributed checkpoint resume passed before transfer; full-layer training was not rerun on this branch.
|
Thanks for contributing to Relax, @Li-Yongwen! 感谢你为 Relax 做出贡献! 📚 Contribution guide / 贡献指南Describe the problem, your changes, and how you validated them. Keep each PR focused and run 请说明问题、改动和验证方式,保持 PR 聚焦,并在提交前运行 🛠️ CI commands / CI 指令
Put one command on the first line of a new PR comment. Rerun/cancel require PR authorship or repository write access. 在新 PR 评论的首行写一条指令。PR 作者或有仓库写权限的贡献者可以重跑、取消 CI。 🔎 Merge requirements / 合入条件GitHub:⏳ 合入条件未满足
|
|
please review this again @Aurelius84 @NINGBENZHE |
Preserve Megatron CP and older SGLang weight-update compatibility. Fix global GRPO normalization, zero-token updates, SFT evaluation steps, warmup configuration, PLE shard routing and weight version publication. Restore checkpoint model and Adam state with placement-aware APIs, propagate write failures across ranks and export the trained model config. Update the CANN9.2 build and multinode recipe, replace HyperMultiCore sed edits with a checked patch and remove the obsolete CANN9.0 Turbo Dockerfile. Validated with 166 CPU regressions, four-rank checkpoint roundtrips, two-rank zero-token checks and fixed-base patch application checks. NPU validation remains pending.
feat(fsdp-turbo): add model_utils and performance_config modules
Michael-Salon
left a comment
There was a problem hiding this comment.
复核了 9f3b637。建议在合入前修复以下正确性问题,重点是静态 GRPO 的微批大小、策略损失选项和 SFT 评估超时。微批切分以及 S3 URI 传入 AutoConfig 的行为已在 CPU 上单独复核。分布式等待与 checkpoint 行为依据生产端和消费端的调用链核对,尚未在 128 卡 NPU 上复跑。
509e3f5 to
4cf07a8
Compare
|
/rerun integration/gpu-async |
|
Head:
|
Michael-Salon
left a comment
There was a problem hiding this comment.
复审 8355816。上轮指出的静态微批、未支持的 GRPO loss 选项、检查点轮转和 --no-save-optim 已修复。合并前请优先处理 3 个 P1:DeepSeek-V4 缺失权重仍能启动、S3 流式 rollout 启动失败,以及 GRPO 样本不足时一直等数据。
与上次评审的 9f3b637 对照,首个 SFT 评估分区可能过早超时是这轮修复引入的;其余问题在旧提交中已经存在。故障恢复和重连建组分别标在对应代码行。本轮做了 CPU 定向验证,未运行多卡 NPU 端到端训练。
NINGBENZHE
left a comment
There was a problem hiding this comment.
复核了 c9a2cd2b 的后端接口与恢复路径,留下四条行级意见。本地验证覆盖 CPU/Gloo 数据拓扑、固定版本 TransferQueue sampler、取数异常注入和 DCP 恢复。外部 rollout 使用替身验证了参数和连接逻辑,并对照了镜像固定的 SGLang 源码。多节点 NPU 与实际 SGLang IPC 尚未实跑。
NINGBENZHE
left a comment
There was a problem hiding this comment.
补充两条可以在本 PR 小范围完成的结构建议。两条都可以保持现有训练和恢复行为,建议作为非阻塞改进。
NINGBENZHE
left a comment
There was a problem hiding this comment.
复核 a3f12cfd 后同意合入。此前的 KDA P2P 拓扑、外部 rollout IPC、取数异常以及两条模块职责意见均已处理,RNG 续训语义已补到双语指南。剩余的 TransferQueue 消费状态查询异常标为 P2 非阻塞,可后续修复。
本轮核对了 CPU CI,并用两 rank CPU/Gloo 做了错误注入验证。128 NPU Turbo 训练与续训尚未实跑。
| """Unanimous drain check over the ranks sharing this DP slot.""" | ||
| if partition_id is None: | ||
| partition_id = sft_partition_id(self.args, rollout_id) | ||
| status = run(self.data_system_client.async_check_consumption_status(task_name, partition_id)) |
There was a problem hiding this comment.
P2 · 非阻塞 · 消费状态查询也应同步传播异常
取数路径的错误汇合已验证。这里如果一个 rank 的 async_check_consumption_status() 抛出异常,其他 rank 仍可能进入 all_reduce。两 rank CPU/Gloo 注入复现了 peer 等待通信超时。训练服务的 ray.get() 会先收到失败 rank 的异常并上报,因此建议作为后续可靠性改进。可复用取数路径的错误汇合,让参与查询的 rank 一致退出。
Michael-Salon
left a comment
There was a problem hiding this comment.
复核 a3f12cfd,上轮 6 条意见均已在代码中处理。DeepSeek-V4 加载会检查缺失的必需非专家权重,S3 流式 rollout 使用本地元数据读取配置,GRPO 在启动时校验每轮样本数等于全局 batch。SFT 验证已区分首块发布与分块消费期限。权重同步前会恢复失效引擎,占位 rank 在同布局重连时也会复用已初始化的通信组。同意合入。
本轮核对了最新提交的源码,未重跑多卡 NPU 端到端训练。



What
add fsdp-turbo backend
refactor #506
Why
How
Testing
pre-commit run --all-filespassespytest tests/)Type of Change
Screenshots / Logs