Repository navigation
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a trainer-to-rollout weight synchronization check to verify that backend-loaded rollout weights match the source HuggingFace checkpoint, adding configuration options, documentation, unit tests, and early-exit support. A critical issue was identified in verl/checkpoint_engine/base.py where rollout.check_loaded_weights_equal is called without ray.get, which would cause verification failures on the workers to be silently ignored. Wrapping this call in ray.get is recommended to ensure errors are properly propagated.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Luosuu
left a comment
There was a problem hiding this comment.
Left two inline comments on correctness issues in the new debug path.
There was a problem hiding this comment.
I think this PR touches too much for the weight sync debug check and actually this PR can be broken down into two parts:
- a minimal version that check weight sync for vLLM (DP/TP=1)
- Another PR for check_weight_sync_only and fully async clean shutdown
please try to make each PR minimal and easy to review. Thank you!
I reduced #6666 to the minimal vLLM TP=1/DP=1 weight-sync check. |
Thanks. I’ve reduced this PR to the minimal vLLM TP=1/DP=1 check and moved the follow-up scope out. Could you re-review when you have time? The previous change request should be addressed now. |
5298bc9 to
c370a58
Compare
|
Hi @Luosuu, I rebased the branch and the previous inline threads are now resolved/outdated. The PR is still blocked by the old Could you re-review when you have time? If the scope looks OK now, I’ll request CI. |
Rebase the vLLM TP=1/DP=1 loaded-weight check onto current main. Co-authored-by: Grok 4.7 <noreply@x.ai> Co-authored-by: Cursor <cursoragent@cursor.com>
c370a58 to
e903d5b
Compare
|
Rebased onto current @Luosuu the June 12 @HollowMan6 this review was reassigned to you on Sept 21. Please take a look when you have time. I will request CI in the Feishu group. |
|
You can debug rollout weight sync with |

What does this PR do?
Addresses #6414.
Adds a checkpoint engine debug check that verifies whether vLLM loaded the same weights sent by the trainer during the initial trainer-to-rollout sync. This PR is limited to vLLM with tensor and data parallel sizes 1.
The check compares the source Hugging Face checkpoint state dict with the rollout backend's loaded state dict. It handles vLLM fused
qkv_projandgate_up_projweights, tiedlm_head.weight, and reports missing, unexpected, and mismatched keys. Value comparison is strict after casting the source checkpoint tensor to the loaded rollout tensor dtype/device.This PR intentionally does not include
check_weight_sync_onlyor fully async shutdown cleanup. Follow-up stacked draft PR: le-czs#1. It will be rebased and opened againstverl-project/verlafter this PR lands.This is not duplicating an existing PR. I checked these searches before opening the PR:
Related open PRs are about MTP sleep, FP8 transfer, generic remote backends, or fully async transfer queue. I did not find an open PR that adds a vLLM loaded-weight comparison for #6414.
AI assistance was used for implementation and PR preparation. I reviewed the changed lines before submission.
Checklist Before Starting
[vllm, checkpoint] feat: add rollout weight sync debug check.Test
python3 -m pytest tests/checkpoint_engine/test_weight_sync_on_cpu.py -q11 passed, 1 warningscripts/generate_trainer_config.shAll goodgit diff --checkpre-commit run --all-files --show-diff-on-failure --color=alwaysAPI and Usage Example
Example overrides:
check_weight_sync=Trueruns the loaded-weight comparison after the initial trainer-to-rollout sync.Design & Code Changes
check_weight_sync.verl.checkpoint_engine.weight_syncfor strict state dict comparison and vLLM fused-weight mapping.collective_rpcpath only covers one DP shard.docs/advance/checkpoint.rstandverl/checkpoint_engine/README.md.Checklist Before Submitting
pre-commit run --all-files --show-diff-on-failure --color=always.