Skip to content

fix(grpo): preserve remote adapter snapshots during async rollout - #10608

Open
werwrewe wants to merge 6 commits into
modelscope:dev-swift-v5from
werwrewe:fix/cs-grpo-async-snapshots
Open

werwrewe wants to merge 6 commits into
modelscope:dev-swift-v5from
werwrewe:fix/cs-grpo-async-snapshots

Conversation

@werwrewe

@werwrewe werwrewe commented Nov 20, 2026 •

Copy link
Copy Markdown

PR type

  • Bug Fix
  • New Feature
  • Document Updates
  • More Models or Datasets Support

PR information

远程 GRPO 原来每次都用同一个名称保存 LoRA 权重。单步异步和全异步允许采样与训练重叠。新版发布时,旧请求可能仍在读取旧权重,同名保存会提前删除旧文件,导致采样找不到 adapter_config.json。

改动

  • 每次发布使用独立的 LoRA 快照路径。采样发出时持有选中的版本,后续发布只切换新请求使用的版本。
  • RemoteWeightSync 接入 fix(rollout): hold remote LoRA snapshots during sampling twinkle#414 的任务追踪。首个响应丢失时,记录任务 ID 并继续保留快照。确认后端退出,且没有其他请求持有该版本时,再删除旧快照。
  • 训练退出时重查未确认任务。等待窗口结束后,仍无法确认的快照会保留。

Checklist

  • I have linked the related issue above, if there is one.
  • I have reviewed and understand every changed line, and I can explain how the change works and why it is correct.
  • I have run the relevant tests or reproductions locally, and included the commands and results above (if applicable).
  • I am responsible for the content of this PR, regardless of how it was produced.

Keep the adapter while the server task is unresolved, reconcile outstanding tasks at shutdown, and use tracked saves when the client supports them.
@werwrewe
werwrewe force-pushed the fix/cs-grpo-async-snapshots branch from a7f1ac5 to 158f329 Compare December 1, 2026 01:27
Require tracked checkpoint saves for asynchronous rollouts and retain unresolved snapshots until they can be reclaimed. Bound shutdown waits and report in-flight deletes.
@werwrewe
werwrewe force-pushed the fix/cs-grpo-async-snapshots branch from 158f329 to c967b47 Compare December 1, 2026 01:34

This branch has not been deployed

No deployments
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.

2 participants