| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Orthogonalised Optimization with Layer-Wise Trust-Ratio Scaling
OrScale equips Muon's orthogonalised matrix update with LARS/LAMB-style layer-wise magnitude control. The recipe rests on a single design principle: the trust-ratio denominator must measure the Frobenius norm of the parameter-space direction the optimizer is about to subtract from the weights. The principle yields a unified, parameter-light algorithm with two specialisations — OrScale (general / vision) and OrScale-LM (language modelling) — and rules out three superficially natural Muon–LAMB hybrids that fail in practice through degenerate denominators, clip saturation, or weight-norm runaway.
Paper: Lou & You, 2026 — OrScale: Orthogonalised Optimization with Layer-Wise Trust-Ratio Scaling (arXiv:2605.07815).
Code: NUS-HPC-AI-Lab/OrScale.
Both variants share Muon's front end (Nesterov-lookahead momentum followed by $k$ Newton–Schulz iterations to obtain the polar factor $Q_\ell$) and apply a clipped trust-ratio multiplier. With weight $W_\ell \in \mathbb{R}^{m_\ell \times n_\ell}$, weight decay $\lambda$, shape factor $s_\ell$, and per-layer calibration constant $c_{\mathrm{denom},\ell}$:
$$ D_{\ell,t} ;=; \lambda W_{\ell,t} + s_\ell, Q_{\ell,t}, \qquad r_{\ell,t} ;=; \frac{\lVert W_{\ell,t} \rVert_F}{c_{\mathrm{denom},\ell},\lVert D_{\ell,t} \rVert_F + \varepsilon}, $$
$$ W_{\ell,t+1} ;=; W_{\ell,t} ;-; \eta_t,\mathrm{clip}(r_{\ell,t},,r_{\min},,r_{\max}),D_{\ell,t}. $$
The two recommended specialisations:
| Variant | Config name | Intended use | Shape factor $s_\ell$ | Calibration $c_{\mathrm{denom},\ell}$ |
|---|---|---|---|---|
| OrScale | orscale | General matrix layers, vision experiments | $1$ | $1$ |
| OrScale-LM | orscale_lm | Language-model pre-training | $0.2\sqrt{\max(m_\ell, n_\ell)}$ | Set once at the first non-zero step so $r_{\ell,0} = 1$ |
OrScale-LM adopts the Moonlight shape factor and a one-time per-layer calibration that anchors every trust ratio at one, propagating learning-rate transfer from AdamW → Muon + Moonlight → OrScale-LM without an extra sweep.
For the full algorithm, theoretical statements, and design-space analysis (including the failure modes that this principle rules out), see the paper.
OrScale targets PyTorch ≥ 2.0 and Python ≥ 3.10.
python -m pip install -e .Optional extras are split by workflow:
python -m pip install -e ".[dev]"
python -m pip install -e ".[data,vision,eval,analysis,wandb]"For the all-in-one compatibility path:
python -m pip install -r requirements.txtLanguage-model smoke run:
python scripts/train.py --config configs/pilot_25m.yaml \
--set optimizer.name=orscale_lmCIFAR-10 / DavidNet run:
python scripts/train_vision.py --config configs/cifar10_davidnet.yaml \
--set optimizer.name=orscaleThe default configs use relative paths such as data/fineweb10B/, data/cifar10/, and checkpoints/. Override paths with --set data.train_pattern=... data.val_pattern=... training.save_dir=....
W&B logging is opt-in. Set logging.wandb_project in the config or via command-line overrides to enable it.
Best learning rate per optimizer; validation top-1 averaged over the last three of 24 epochs, then over three seeds ($\pm 1\sigma$).
| Rank | Optimizer | LR | Val top-1 (%) |
|---|---|---|---|
| 1 | OrScale (ours) | 0.02 | 94.05 ± 0.08 |
| 2 | Muon + Moonlight | 0.01 | 93.75 ± 0.17 |
| 3 | Muon | 0.04 | 93.70 ± 0.14 |
| 4 | AdamW | 0.01 | 93.12 ± 0.04 |
| 5 | LAMB | 0.01 | 92.40 ± 0.20 |
OrScale improves Muon by +0.35 points and Muon + Moonlight by +0.30 points, while LAMB — the standard trust-ratio baseline — trails by 1.65 points, confirming that a direct LAMB-style port to Muon is not competitive without the design principle above.
Final validation cross-entropy at four model scales spanning a 48× compute range. Lower is better; bold marks the best optimizer at each scale. Compute $C = 6ND$ in PFLOP-days (Kaplan estimate).
| Scale | Compute (PFD) | AdamW | Muon + Moonlight | OrScale-LM (ours) |
|---|---|---|---|---|
| 125M, 5.24B tok | 0.046 | 3.3721 | 3.2319 | 3.2120 |
| 399M, 8.92B tok | 0.247 | 2.9966 | 2.9183 | 2.9247 |
| 545M, 14.04B tok | 0.531 | 2.9235 | 2.8130 | 2.8049 |
| 1.1B, 28.54B tok | 2.18 | 2.7304 | 2.6360 | 2.6251 |
OrScale-LM beats AdamW at every scale from 125M to 1.1B and beats Muon + Moonlight at three of four scales; the 399M cell is a tie within single-seed noise. The fitted Kaplan-style scaling-law exponents are $\alpha = -0.054$ (AdamW), $-0.053$ (Muon + Moonlight), and $-0.052$ (OrScale-LM); the OrScale-LM advantage is approximately preserved across the swept compute range.
FineWeb-Edu token shards:
python scripts/prepare_data.py --version 10BCIFAR-10:
python scripts/prepare_vision_data.py --dataset cifar10ImageNet expects the standard ImageFolder layout. See scripts/prepare_vision_data.py for tarball extraction support.
pytest tests/ -vOn CPU-only machines without an OpenMP-capable compiler:
TORCH_COMPILE_DISABLE=1 pytest tests/ -vorscale/ Core optimizers, models, data loaders, trainers, eval, analysis
configs/ Example LM, vision, and scaling-law configs
scripts/ Training, data preparation, evaluation, and sweep entry points
tests/ Unit and smoke tests
Generated outputs under results/, reports/, checkpoints, datasets, W&B runs, and local logs are intentionally git-ignored.
If you use OrScale in your research, please cite the paper:
@misc{lou2026orscaleorthogonalisedoptimizationlayerwise,
title={OrScale: Orthogonalised Optimization with Layer-Wise Trust-Ratio Scaling},
author={Yuxuan Lou and Yang You},
year={2026},
eprint={2605.07815},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/2605.07815},
}The repository ships a CITATION.cff so GitHub can surface this metadata directly on the project page.
OrScale is released under the MIT License. See LICENSE for details.
OrScale builds on the orthogonalised-update line of work (Muon, Moonlight) and on classical trust-ratio optimizers (LARS, LAMB). We thank the broader optimizer-research community for open implementations and reproducible baselines.
| Back | FazBrowse Home | New Git URL |