Repository navigation
[v5] Keep an explicit zero optimizer step out of the driver budget - #351
Draft
qychen2001 wants to merge 1 commit into
Draft
qychen2001 wants to merge 1 commit into
qychen2001 wants to merge 1 commit into
Conversation
A reported 0 was treated as a missing count, so a batch with no optimizer update consumed one max_steps slot and disaggregated runs stopped early. 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.
PR type
PR information
Draft。今天的后续修改会继续推到这个分支。
问题
分离训练的 driver 用
commit(本次真正更新了几步)决定还要不要继续。commit()和_train_pull()原来都写成int(steps) if steps else 1:没传步数和明确传入的0被当成同一件事,于是「这轮权重一次都没改」被记成 1 步。梯度累积的第一次真正更新比一整批晚一个小批次。第 02 组每轮正好 8 个小批次,连续三轮的真实更新是 0、1、1。driver 记成 1、1、1,
max_steps=3提前结束,优化器只更新了 2 次。共置训练不经过这个 driver,所以不受影响。同步分离和异步走同一条commit路径,这个计数错误两边一样;差别只是样本允许用多旧的权重。修复前实机(ms-swift
1666ec6dd+ Twinkle4e099040,第 02 组):history 只有 step 1 和 2,723 份 Adam 状态的 step 都是 2,cur_step=24。证据目录scripts/phase1/output/20261029T025108Z-1474591/。修改
缺省值仍按 1 步计。明确传入的
0保持为 0,不占用max_steps预算。Experiment results
[0, 1, 1]记成 3 步后停止。29503ffe:history=[1, 2, 3],GA=8,cur_step=25,Adam step=3,426 个权重张量变化,权重和优化器数值有限。scripts/phase1/output/20261029T040143Z-1561058/02_disaggregated_sync/cur_step=25,426 个权重张量变化,数值有限。version_span_mean、off_policy_consumed、partial_ratio都是 0。这不证明采样和训练已经重叠,也不证明 partial resume。scripts/phase1/output/20261029T043047Z-1598498/03_one_step_off/Made with Cursor