fix: preserve Qwen3.5 broadcast weight names#2690
Open
samsja wants to merge 9 commits into
Open
Conversation
3a3a31f to
13ee170
Compare
13ee170 to
099f5a5
Compare
S1ro1
reviewed
Jun 3, 2026
| "science-env", | ||
| "simpleqa-verified", | ||
| "tau2-bench", | ||
| "wordle", |
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.
What changed
Why
Qwen3.5 VLM checkpoints already use
model.language_model...HF hub naming. Callingtransformers.core_model_loading.revert_weight_conversionon those keys rewrites them into the wrong namespace for vLLM live reload. In the failing runs, vLLM logged skipped keys likelanguage_model.language_model..., so inference was not receiving updated LM/linear-attention weights after trainer updates.With the bypass, raw HF keys are sent for
model_type = "qwen3_5"; vLLM maps them to its internallanguage_model.model...keys and the weight updates load.Validation
uv sync --all-extrasuv run ruff check src/prime_rl/trainer/weights.py src/prime_rl/trainer/ckpt.py src/prime_rl/trainer/rl/broadcast/nccl.py src/prime_rl/trainer/rl/broadcast/filesystem.py src/prime_rl/trainer/models/qwen3_5_moe/modeling_qwen3_5_moe.py23166reached trainer step 9 withMismatch KLbetween0.0005and0.0010; old skipped-weight logs were gone.W&B: https://wandb.ai/primeintellect/wordle/runs/6f6cfafdf0274166ad038e7e79375f29
Note
Medium Risk
Transformers version and weight-export/broadcast behavior affect Qwen3.5 inference sync; dependency pin changes the whole training stack’s HF behavior.
Overview
Pins Transformers to
5.6.2on PyPI (replacing the git pin and>=5.1.0.dev0override) so training, checkpoints, and vLLM live reload share a single release aligned with Qwen3.5 fixes.In the diff, broadcast/checkpoint paths still call
revert_weight_conversionfor non–PrimeRL models; only redundant inline comments were removed inckpt.pyandfilesystem.py. Qwen3.5 workaround docstrings inmodel.pynow say they can drop once an official Transformers release includes the fixes (not a specific git commit).The start-run skill adds steps to verify verifier env packages import under
uv runand how to wire missing local envs intopyproject.tomlbeforerllaunches.Reviewed by Cursor Bugbot for commit 1143117. Bugbot is set up for automated code reviews on this repo. Configure here.