Repository navigation
fix: zero router aux loss in Qwen3.5 automodel recipes - #3169
Merged
yuki-97 merged 1 commit intoJul 13, 2026
Merged
Conversation
The Automodel backend silently reads router_aux_loss_coef from the HF config (Qwen3.5 default: 0.001) and injects MoE load-balancing gradients into the router via MoEAuxLossAutoScaler during GRPO training. The load-balancing objective conflicts with the policy objective and severely degrades accuracy: on grpo-qwen3.5-35ba3b-dapo-4n8g-automodel, DAPOMathAIME2024 validation accuracy stalls at ~0.27-0.35 and decays after step 30, vs 0.60 at step 30 and 0.68 at step 70 for an otherwise identical run with the aux loss zeroed (also ~10x larger grad norm at step 1). The 30-step nightly thresholds (reward > -0.7, accuracy > 0.2) are too loose to catch this. All other MoE automodel recipes (nanov3, minimax-m27, gpt-oss) already zero this coefficient; the Qwen3.5 recipes were the only ones missing it. Qwen3.5 nests it under text_config. Signed-off-by: Zhaopeng Qiu <[email protected]>
zpqiu
force-pushed
the
alexq/qwen35-automodel-router-aux-loss-0
branch
from
July 13, 2026 08:36
cfe43e0 to
35c1c3b
Compare
Contributor
|
/ok to test 35c1c3b |
yuki-97
enabled auto-merge (squash)
July 13, 2026 15:03
yuki-97
approved these changes
Jul 13, 2026
sharonyu-115
added a commit
to sharonyu-115/RL
that referenced
this pull request
Jul 15, 2026
…cipes by NVIDIA-NeMo#3169) Signed-off-by: Shuang Yu <[email protected]>
sharonyu-115
added a commit
to sharonyu-115/RL
that referenced
this pull request
Jul 28, 2026
…cipes by NVIDIA-NeMo#3169) Signed-off-by: Shuang Yu <[email protected]>
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 does this PR do?
Adds
hf_config_overrides.text_config.router_aux_loss_coef: 0.0to the three Qwen3.5 Automodel recipes:examples/configs/recipes/llm/grpo-qwen3.5-35ba3b-dapo-4n8g-automodel.yamlexamples/configs/recipes/llm/grpo-qwen3.5-35ba3b-2n8g-automodel-ep16.yamlexamples/configs/recipes/vlm/vlm_grpo-qwen3.5-35ba3b-geo3k-2n8g-automodel-ep16.yamlReran the above release test: https://wandb.ai/nvidia/nemorl-pr3196/runs/almaogtl
Why
The Automodel backend reads
router_aux_loss_coeffrom the HF config (Qwen3.5 default: 0.001) and silently injects the MoE load-balancing aux-loss gradient into the router viaMoEAuxLossAutoScalerduring RL training. The load-balancing objective conflicts with the policy objective and severely degrades accuracy.Verified on
grpo-qwen3.5-35ba3b-dapo-4n8g-automodelwith dynamic filtering=True (DAPOMathAIME2024 validation, otherwise identical runs):router_aux_loss_coef=0.0Wandb Link: https://wandb.ai/nvidia/nemorl-pr3196
The run with aux loss active also shows ~10x larger grad norm at step 1 (1.88 vs ~0.1) and
token_mult_prob_errorspikes up to ~2.0.All other MoE Automodel recipes (nanov3, minimax-m27, gpt-oss) already zero this coefficient; the Qwen3.5 recipes were the only ones missing it. Qwen3.5 nests the field under
text_config, and the value must be0.0(float) because Hugging Face strict config validation rejects YAML's integer0.Issues
N/A
🤖 Generated with Claude Code