chore: default weight_decay to 0 in BaseOptimizerConfig#2422
Open
chore: default weight_decay to 0 in BaseOptimizerConfig#2422
Conversation
Most prime-rl RL runs explicitly disable weight decay anyway (or want to); 0.01 as the default silently penalizes runs whose configs don't override it. Existing configs that want 0.01 (Intellect-3.1, minimax_m2.5_swe) already set it explicitly, so they're unaffected. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
Flip the
BaseOptimizerConfig.weight_decaydefault from0.01→0.0.Most RL runs in this repo either don't want weight decay or override it explicitly. Leaving the default at
0.01silently penalizes any run whose config omits the field. Configs that genuinely want0.01already set it explicitly:examples/Intellect-3.1/rl.tomlexamples/minimax_m2.5_swe/rl.tomlSo no existing run changes behavior unless its author was relying on the implicit default.
🤖 Generated with Claude Code
Note
Low Risk
Low risk: a one-line config default change, but it will alter training behavior for any runs that relied on the previous implicit
0.01weight decay.Overview
Updates
BaseOptimizerConfig.weight_decaydefault inconfigs/trainer.pyfrom0.01to0.0, so optimizer creation (e.g.,AdamW/SGD/SignSGD/Muon) no longer applies weight decay unless explicitly configured.Reviewed by Cursor Bugbot for commit 12359e9. Bugbot is set up for automated code reviews on this repo. Configure here.