OK, we've completed all of the runs for the uP learning rate stuff. Here's the output of…
- User
OK, we've completed all of the runs for the uP learning rate stuff. Here's the output of the final stage (confirm). How do I set up the default
oplmconfig to use the new LR parameters, just set lr and output multipler directly using the top scoring values (base lr=0.0035, output multiplier=0.5) from the confirm stage?(default) briney@slurm-login-0:~/projects/oplm/mup_lr_sweep$ oplm sweep status sweeps/confirm/phase.json confirm (eval/uniref/loss) ┏━━━━━━━━┳━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━┓ ┃ preset ┃ idx ┃ cell ┃ state ┃ eval/uniref/loss ┃ ┡━━━━━━━━╇━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━┩ │ 800M │ 0 │ 800M-lr0.0035-om0.5-a0.5-s42 │ complete │ 2.0539 │ │ 800M │ 1 │ 800M-lr0.005-om0.5-a0.5-s42 │ complete │ 2.0553 │ └────────┴─────┴──────────────────────────────┴──────────┴──────────────────┘ nothing to resubmit
Assistant
I'll look at how the default config and the sweep configs define these parameters before answering.
Assistant
A few tests assert the current defaults, so I need to check whether they read the YAML defaults or the dataclass fallbacks:
Assistant
The CONFIG.md table documents run defaults from base.yaml, so those need updating too. Checking the Train table's
lrrow:Assistant
The sweep pins only those overrides; the rest comes from the user's sweep base config. Now let me check
configs/scaling.yaml— the production scaling config already anchored at 768:Assistant
Now making the edits. First the two config files:
Assistant
Now the tests:
Assistant
Now the docs. MUP.md first:
Assistant
MUP.md is consistent (
i0 = round_up_to(8·768/3, 256) = 2048✓). Updating the preset-ray coord-check example and then CONFIG.md:Assistant
Now running the CI gates (ruff, ty, pytest) to catch any other tests that depended on the old defaults:
Assistant
Those lint errors are pre-existing in test files I didn't touch — the CI gates run on
src/(per project convention). Rerunning scoped correctly, plus checking my edited test file:Assistant
src/gates pass; the two remaining test-file lint errors are pre-existing quoted annotations unrelated to my edit. Now ty and the test suite:Assistant
mup_depth_lr_exponentnow intentionally diverges from the conservative dataclass fallback, so it joins the production-overrides allowlist:Assistant
Done — but the answer to "just set lr and output multiplier?" turned out to be "not quite": the confirmed winner is only valid together with two other values the sweep pins, so I set all four.
- User
Isn't the depth exponent already covered by the residual scaling (default is set to the sqrt of num_hidden_layers)? Or is the depth exponent in addition to the residual scaling?
Assistant
Good question — let me pull up the exact reasoning in the repo's docs before answering, since this was worked out during the depth-sweep hardening.
Assistant
It's in addition to — and in fact derived from — the residual scaling. The two act on different quantities:
residual_scaling=sqrt_num_layerscontrols the forward pass, whilemup_depth_lr_exponentcontrols the . Neither can do the other's job, and the exponent's value of 0.5 only makes sense the residual scaling is 1/√L.- User
yes, flip residual_gate to channel too
Assistant
OVERVIEW.md's table documents the conservative dataclass fallbacks (stays
none), but I need to check which layer CONFIG.md's architecture table documents:Assistant
CONFIG.md's table is run defaults (with dataclass fallback noted inline), so that row needs updating. Checking OVERVIEW.md's framing at lines 298 and 700 before editing:
Assistant
OVERVIEW.md's table documents dataclass fallbacks (stays as-is), but I'll clarify its "off by default" prose. Making the edits:
Assistant
Also updating CONFIG.md's fallback-enumeration note to include the new divergence, then rerunning the gates:
Assistant
Done — the packaged default is now
residual_gate: channel, completing the alignment with the swept/production architecture. All gates pass:ruff check,ruff format --check, andty checkonsrc/are clean, and the fast test suite is fully green (1806 passed), including the tiny-model training smoke tests which now exercise the channel-gated default end to end.What changed:
src/oplm/configs/model/base.yaml—residual_gate: none → channeltests/training/test_config.py—test_ablation_toggle_defaults_preserve_current_behaviornow expectschanneldocs/CONFIG.md— theresidual_gatetable row default ischannel(with the dataclass fallback noted, matching the convention used for //), and the run-defaults-vs-fallbacks note now lists among the conservative fallbacks
- User
commit and push
Assistant
Committed and pushed. Since you were on
main, I put the work on a new branchconfig/lr-sweep-winner-defaults(single commit5f54b9f, the 6 files: two base.yaml configs, the test file, and the three docs).The branch is up on origin — open a PR here when ready: https://github.com/briney/oplm/pull/new/config/lr-sweep-winner-defaults
- User
one last thing -- how do I disable
save_every_minutesif I just want to checkpoint every XX steps, not every YY minutes? Do I setsave_every_minutesto 0, or None or something? Assistant
Let me check how the trainer interprets that knob.
Assistant
Set it to
null(i.e.None) — that's also the default, so it's only active if something turned it on.0is rejected: the validator insrc/oplm/config.py:232raisesValueError("save_every_minutes must be > 0 when set")for any value ≤ 0.Concretely:
- The packaged default (
TrainConfig.save_every_minutes: int | None = None, and nothing inconfigs/train/base.yamlsets it) is already off — a bare run checkpoints only on thesave_everystep cadence. The timer is opt-in; in this repo onlyconfigs/scaling.yamlenables it (save_every_minutes: 30). - To turn it off where a config has enabled it:
save_every_minutes: nullin YAML, ortrain.save_every_minutes=nullas a CLI dotlist override (the config loader parsesnulltoNone).
Also worth knowing: when it is set, the timer runs in addition to the step cadence, not instead of it — so disabling it never changes your step-based checkpoints, it just removes the extra wall-clock saves (its purpose in
scaling.yamlis bounding preemption loss on long Slurm runs to ~30 minutes).- The packaged default (
- User
Open a PR to main
Assistant
Opened: https://github.com/briney/oplm/pull/21 —
config/lr-sweep-winner-defaults→main, titled "config: adopt LR-sweep confirm winner as run defaults".The PR body covers the five default changes (lr 0.0035, output mult 0.5, depth exponent 0.5, the 768 anchor move and why it's required, residual_gate → channel), what was deliberately left alone (dataclass fallbacks,
scaling.yaml), the doc/test updates, and the verification results (clean lint/type gates, 1806 tests passed).The "5 uncommitted changes" warning from
ghis just the untracked local dirs (.claude/,.cursor/,.entire/, etc.) — nothing from this work is missing from the branch.- User
PR merged and branch deleted. switch back to main and fast-forward. One thing once you're back -- I'd like to update the base configs (data, model, and train) to include all of the options, set to their default. I want the default config YAMLs to be essentially self-documenting in the sense that they contain all available options set to their defaults and (when appropriate, so not necessary for true/false type config options) what the acceptable values are.
Assistant
Back on
mainata86b502with the merged PR, local branch deleted. Now for the self-documenting base configs — let me gather the full field inventories from the three config classes:Assistant
Now I'll check CONFIG.md's descriptions for the classification-head fields so the YAML comments are accurate:
Assistant
Writing the fully self-documenting
model/base.yaml:Assistant
Now the train base.yaml with the eleven missing options:
Assistant
Light annotation pass on
data/base.yaml(already complete), then the test and the stale comment inconfig.py:Assistant
Running the full gates:
Assistant
All tests pass (1828 — up from 1806 because each new YAML key adds a typo-guard case). Verifying the 2 remaining ruff errors are just the pre-existing ones:
Assistant
Done — all three base configs are now self-documenting, and everything is green.
src/oplm/configs/train/base.yamlgained the 11 options that previously fell through silently to the dataclass: the checkpoint-retention group (, , , all -disabled with "must be > 0 when set" noted), the resume group (, , ), (with the constraints summarized), , and the stability diagnostics pair (, ). The one deliberate omission is — it's provenance stamped by , not a knob — and the header comment says so.- User
branch, commit and open a PR