Skip to content

chore: default weight_decay to 0 in BaseOptimizerConfig#2422

Open
samsja wants to merge 1 commit intomainfrom
chore/default-weight-decay-zero
Open

chore: default weight_decay to 0 in BaseOptimizerConfig#2422
samsja wants to merge 1 commit intomainfrom
chore/default-weight-decay-zero

Conversation

@samsja
Copy link
Copy Markdown
Member

@samsja samsja commented May 5, 2026

Summary

Flip the BaseOptimizerConfig.weight_decay default from 0.010.0.

Most RL runs in this repo either don't want weight decay or override it explicitly. Leaving the default at 0.01 silently penalizes any run whose config omits the field. Configs that genuinely want 0.01 already set it explicitly:

  • examples/Intellect-3.1/rl.toml
  • examples/minimax_m2.5_swe/rl.toml

So 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.01 weight decay.

Overview
Updates BaseOptimizerConfig.weight_decay default in configs/trainer.py from 0.01 to 0.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.

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>
@samsja samsja marked this pull request as ready for review May 5, 2026 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant