Repository navigation
[v5] 修复自适应初始化把规则奖励当成奖励模型 - #10495
Open
qychen2001 wants to merge 1 commit into
Open
[v5] 修复自适应初始化把规则奖励当成奖励模型#10495qychen2001 wants to merge 1 commit into
qychen2001 wants to merge 1 commit into
Conversation
Rule rewards arrive as sync wrappers and have no Ray model handle. Reading .model on them aborts cluster setup before training starts. Co-authored-by: Cursor <cursoragent@cursor.com>
1 of 4 tasks
hjh0119
approved these changes
Nov 2, 2026
This branch has not been deployed
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 类型
PR 信息
场景。
resource_mode=adaptive的 GRPO。集群初始化末尾会把可扩缩的打分模型登记给ClusterAdapter。这次作业只有 accuracy 规则奖励,没有奖励模型。现象。 登记循环对每个 ORM/PRM 打分器都先读
scorer.model。accuracy 由get_reward_funcs包成_AwaitableToSync,这个包装只有调用接口,没有.model。初始化在assembly.py报AttributeError: '_AwaitableToSync' object has no attribute 'model'。当时 vLLM 已经建好并进入 sleep,训练一步都没开始。上面的注释写了规则奖励保持静态,但读.model发生在placement_key判断之前,规则奖励也会走进去。修复。 先判断是不是
RewardModel。只有它带有 Ray 上的模型代理和placement_key。规则奖励和 judge 直接跳过。通过类型判断之后,再要求placement_key和_worker_factory都存在,才放进elastic_models。这次没有奖励模型,登记结果是空字典,适配器不会去扩缩打分侧。采样侧的三处修复(Qwen3.5 显存估算、自适应采样留在持有准入表的进程、扩容改为统计正在进行的
sample())在 modelscope/twinkle#363 。实验结果
同一套 Qwen3.5-4B GRPO,8 张 GPU,
resource_mode=adaptive,只有 accuracy。AttributeError。vLLM 已经 sleep。elastic_models为空,训练进入 optimizer step。采样若仍被放到远端进程,接着会碰到 twinkle 那个准入报错,那部分由 twinkle#363 修。