Optimizer Design for Mixture-of-Experts Language-Model Pretraining
Research question
Design the optimizer of a language model's pretraining. With the model, its
architecture, the training data, the token budget and the learning-rate
schedule's default fixed, which update rule -- and which treatment of each
kind of parameter -- trains the model to the lowest held-out loss for the
compute spent, consistently across model sizes?
The design space is the optimizer: the update rule and the state it keeps,
orthogonalisation of matrix updates and preconditioning, norm and weight-decay
control, parameter grouping and per-group treatment, the batch-size schedule
(the total number of training tokens is fixed), the learning-rate schedule and
iterate averaging, extra passes over a step's batch, and the hyperparameters of
all of these.
Setting names (names only): d128, d256, d384, d512, d640, d768, d896, d1024.
The settings differ only in scale; as in the reference methods, only values (including values computed from the size) may differ between them, not which components run.
Evaluation
The metric is held-out cross-entropy; lower is better.
Approach
Aim for an algorithmic contribution. Find the real problem in the component you
edit, build a deep understanding of it, whether through theoretical analysis or
experiments, and solve it. Do not rely on hyperparameter tuning or on recombining
existing methods.
What You May Change
You work inside /workspace; the task's code is the source tree
/workspace/moe-lm/. A copy of this instruction is at
/opt/task/INSTRUCTION.md.
Editable regions
Edit only these files, and only inside the listed line ranges: the code in these
regions is your submission. Line numbers are 1-based and inclusive, counted in
the file as it is in /workspace when your session starts (the numbering
cat -n shows). A range marks a region, not a line count: you may add or remove
lines inside it as long as everything outside it stays byte-identical. In the excerpts, > marks lines inside a region.
33 and must not modify the modules it imports.
34 """
35 # ----- BEGIN EDITABLE REGION -----
> 36 from moe_lm import optim as O
> ... (lines 37-44)
> 45 return O.MuonHRecipe(groups, ctx)
46 # ----- END EDITABLE REGION -----
Creating or deleting any file in the task's own source trees
(/workspace/moe-lm/ and anything else present at the start) is not
allowed. Files you write elsewhere (scratch space, caches, checkpoints,
$OUTPUT_DIR, /tmp) are not part of the submission.
Interface
The signatures of the functions and classes in the editable regions stay as they
are; evaluation imports them by name.
Limits
- Training sequence length: 8192 tokens.
- Exact parameter accounting: the trainable element count must equal the reference model's count exactly:
sum(p.numel() for p in model.parameters()) == sum(p.numel() for p in reference_model.parameters()). For the level values, the reference counts are 329,720,064 (hidden_dim 384), 746,605,568 (512), 2,039,268,864 (768), and 4,764,581,888 (1024). The trainer uses this same element count before the first step; the optimizer receives the complete parameter groups so you can count their p.numel() values before training.
- Exact batch schedule: if you provide
batch_sizes(ctx), its positive integer entries must satisfy sum(batch_sizes(ctx)) == ctx.batch_size * ctx.num_steps; every entry must pass the trainer's divisibility check b % ctx.world_size == 0 (equivalently the accepted test b % (ctx.world_size * QB_SHARDS) == 0 or b % ctx.world_size == 0). Check this list before returning it.
- Exact training-token accounting: the recorded tokens must equal
ctx.tokens = ctx.batch_size * ctx.num_steps * ctx.seq_len, with ctx.seq_len = 8192, and the batch schedule above must cover the same ctx.batch_size * ctx.num_steps sequences. You can check this from the context before the first step.
Notes
- If the submission fails at any width for any reason (for example a crash, a timeout, a non-finite result, or a parameter, batch-schedule or recorded-token mismatch), the whole run receives no score; results at the other widths do not offset it.
- The data directories may not be opened, and no process may be started.
Shared rules
The code you edit is checked statically before it runs. It may not hold a
string that could form a result line of the fixed code, nor rebind or redirect
print, sys.stdout or sys.stderr. It may not end the process with
os._exit, os.abort or os.kill (sys.exit is fine). It may not run
dynamically built code (exec, eval, the built-in compile). It may not
reach interpreter frames, tracers, the garbage collector or ctypes. It may
not write into imported modules or into names the fixed code binds (library
settings are fine). It may not read function or autograd-graph internals. An
edited file may not exceed 32 MiB.
/opt/task/selfcheck runs the edit-range check, these checks and this task's own source rules on your
workspace and prints each refusal with its file, line, rule and reason;
/opt/task/selfcheck --rules prints the full rule list, this task's own included.
Read-only context
Other files you may read for context (do not modify):
- moe-lm/moe_lm/optim.py
Reference Methods
Each reference method's code is in the image, read-only:
/opt/task/baselines/<name>/ holds your editable file(s) with that method
applied, at the same paths relative to /workspace/, so
diff /workspace/<path> /opt/task/baselines/<name>/<path> shows what it
changes. /opt/task/baselines/README.md has the full citations. Evaluation does
not read these files.
muonh: MuonH + AdamH (Hyperball), the starter; Wen et al., arXiv preprint 2026 (https://arxiv.org/abs/2606.16899). The starter: your workspace as given.
klsoap_w: KL-SOAP with weight decay; Vyas et al., ICLR 2025 (https://arxiv.org/abs/2409.11321); Wen et al., arXiv preprint 2025 (https://arxiv.org/abs/2509.02046); Dang et al., arXiv preprint 2026 (https://arxiv.org/abs/2610.08975). /opt/task/baselines/klsoap_w/
klsoap_h: KL-SOAP with Hyperball; Vyas et al., ICLR 2025 (https://arxiv.org/abs/2409.11321); Wen et al., arXiv preprint 2025 (https://arxiv.org/abs/2509.02046); Wen et al., arXiv preprint 2026 (https://arxiv.org/abs/2606.16899); Dang et al., arXiv preprint 2026 (https://arxiv.org/abs/2610.08975). /opt/task/baselines/klsoap_h/
soap: SOAP; Vyas et al., ICLR 2025 (https://arxiv.org/abs/2409.11321); Wen et al., arXiv preprint 2025 (https://arxiv.org/abs/2509.02046). /opt/task/baselines/soap/
kron: PSGD-Kron; Xi-Lin Li, IEEE Transactions on Neural Networks and Learning Systems 2018 (https://arxiv.org/abs/1512.04202); Xilin Li, arXiv preprint 2022 (https://arxiv.org/abs/2211.04422); Wen et al., arXiv preprint 2025 (https://arxiv.org/abs/2509.02046). /opt/task/baselines/kron/
scion: Scion; Pethick et al., ICML 2025 (https://arxiv.org/abs/2502.07529); Wen et al., arXiv preprint 2025 (https://arxiv.org/abs/2509.02046). /opt/task/baselines/scion/
muon: Muon; Jordan et al., Blog post 2024 (https://kellerjordan.github.io/posts/muon/). /opt/task/baselines/muon/
muon_polarexpress: Muon with Polar Express; Amsel et al., arXiv preprint 2025 (https://arxiv.org/abs/2505.16932). /opt/task/baselines/muon_polarexpress/
muon_you: Muon with You's tuned polynomials (Polar Express authors' Muon); Amsel et al., arXiv preprint 2025 (https://arxiv.org/abs/2505.16932). /opt/task/baselines/muon_you/
muon_jordan_gptopt: Muon with Jordan's Newton-Schulz polynomial (Polar Express authors' Muon); Amsel et al., arXiv preprint 2025 (https://arxiv.org/abs/2505.16932); Jordan et al., Blog post 2024 (https://kellerjordan.github.io/posts/muon/). /opt/task/baselines/muon_jordan_gptopt/
muonw: MuonW (Muon with weight decay); Wen et al., arXiv preprint 2026 (https://arxiv.org/abs/2606.16899); Jordan et al., Blog post 2024 (https://kellerjordan.github.io/posts/muon/). /opt/task/baselines/muonw/
normuon: NorMuon; Li et al., ICML 2026 (https://arxiv.org/abs/2510.05491). /opt/task/baselines/normuon/
shampoo_w: ShampooW (Distributed Shampoo with decoupled weight decay); Dang et al., arXiv preprint 2026 (https://arxiv.org/abs/2610.08975); Gupta et al., ICML 2018 (https://arxiv.org/abs/1802.09568); Shi et al., arXiv preprint 2023 (https://arxiv.org/abs/2309.06497). /opt/task/baselines/shampoo_w/
adamh: AdamH (Hyperball on Adam); Wen et al., arXiv preprint 2026 (https://arxiv.org/abs/2606.16899). /opt/task/baselines/adamh/
adamw_nesterov: NAdamW (AdamW with Nesterov momentum); Timothy Dozat, ICLR 2016 Workshop (https://openreview.net/forum?id=OM0jvwB8jIp57ZJjtNEZ); Loshchilov & Hutter, ICLR 2019 (https://arxiv.org/abs/1711.05101); Dahl et al., arXiv preprint 2023 (https://arxiv.org/abs/2306.07179); Wen et al., arXiv preprint 2025 (https://arxiv.org/abs/2509.02046). /opt/task/baselines/adamw_nesterov/
adamw: AdamW; Loshchilov & Hutter, ICLR 2019 (https://arxiv.org/abs/1711.05101). /opt/task/baselines/adamw/
mars: MARS-AdamW; Yuan et al., ICML 2025 (https://arxiv.org/abs/2411.10438); Wen et al., arXiv preprint 2025 (https://arxiv.org/abs/2509.02046). /opt/task/baselines/mars/
schedulefree_adamw: Schedule-Free AdamW; Defazio et al., NeurIPS 2024 (https://arxiv.org/abs/2405.15682). /opt/task/baselines/schedulefree_adamw/
lion: Lion; Chen et al., NeurIPS 2023 (https://arxiv.org/abs/2302.06675). /opt/task/baselines/lion/
lion_b128k: LionW at 128K tokens per step; Chen et al., NeurIPS 2023 (https://arxiv.org/abs/2302.06675); Dang et al., arXiv preprint 2026 (https://arxiv.org/abs/2610.08975). /opt/task/baselines/lion_b128k/
muonh_wsd: MuonH with the stable-then-decay schedule; Wen et al., arXiv preprint 2026 (https://arxiv.org/abs/2606.16899); Dang et al., arXiv preprint 2026 (https://arxiv.org/abs/2610.08975). /opt/task/baselines/muonh_wsd/
muonw_b128k: MuonW at 128K tokens per step; Wen et al., arXiv preprint 2026 (https://arxiv.org/abs/2606.16899); Jordan et al., Blog post 2024 (https://kellerjordan.github.io/posts/muon/); Dang et al., arXiv preprint 2026 (https://arxiv.org/abs/2610.08975). /opt/task/baselines/muonw_b128k/
muonw_wsd: MuonW with the stable-then-decay schedule; Wen et al., arXiv preprint 2026 (https://arxiv.org/abs/2606.16899); Jordan et al., Blog post 2024 (https://kellerjordan.github.io/posts/muon/). /opt/task/baselines/muonw_wsd/
muonw_bwarmup: Batch-size warmup; Wen et al., arXiv preprint 2026 (https://arxiv.org/abs/2606.16899); Jordan et al., Blog post 2024 (https://kellerjordan.github.io/posts/muon/); Merrill et al., NeurIPS 2025 (https://arxiv.org/abs/2505.23971). /opt/task/baselines/muonw_bwarmup/
muonw_switch2m: 128K to 2M batch switch, square-root rule; Wen et al., arXiv preprint 2026 (https://arxiv.org/abs/2606.16899); Jordan et al., Blog post 2024 (https://kellerjordan.github.io/posts/muon/); Dang et al., arXiv preprint 2026 (https://arxiv.org/abs/2610.08975). /opt/task/baselines/muonw_switch2m/
muonh_b128k: MuonH at 128K tokens per step; Wen et al., arXiv preprint 2026 (https://arxiv.org/abs/2606.16899); Dang et al., arXiv preprint 2026 (https://arxiv.org/abs/2610.08975). /opt/task/baselines/muonh_b128k/
adamw_b128k: AdamW at 128K tokens per step; Loshchilov & Hutter, ICLR 2019 (https://arxiv.org/abs/1711.05101); Dang et al., arXiv preprint 2026 (https://arxiv.org/abs/2610.08975). /opt/task/baselines/adamw_b128k/
Submission
There is no submit step. When your session ends, the workspace is evaluated as
it stands, by evaluation scripts that are not in your workspace.
- Leave it runnable: complete edits only, and code that runs from the files
on disk. Every process from your session (GPU jobs, servers, workers) is
killed before evaluation starts. During evaluation, every process your code
starts must exit before the step that started it ends; a process left
running makes the submission invalid.
- Evaluation runs in a separate container: only your editable files are
copied into it. Your container does not include the evaluation data; obtain
what you need for development yourself.
- Improve the algorithm, not the measurement. The score must come from what
your component computes. Do not hard-code or reconstruct the evaluation's
data or expected answers in your submission; do not compute, print,
overwrite or influence the score yourself; do not change the clocks the
evaluation measures time with; do not reach the evaluation through any route
other than the component you implement, and do not fetch anything at
evaluation that the interface does not pass in. Do not look up this task,
the benchmark it belongs to, or its code repository online, and do not use
ready-made solutions to this task.
- A general method, not a fit to this evaluation. The evaluation may use
other data, models, conditions or seeds than you can run. Do not infer, probe
or hard-code which conditions are scored, and do not rely on weaknesses of
the fixed evaluation. Use one method for every setting: your own method runs
on each of them. You may configure it per setting as the reference methods do
(for example with different hyperparameter values), using what the interface
passes in (a setting label,
ENV, sizes, context fields). You may not run a
different algorithm, learner, model or objective on some settings, run a
reference method or the starter on some settings, or hand-write a solution
for a particular setting or environment (a controller, stored answers or
constructions, coordinates). Do not special-case other properties of the
inputs you happen to see (the identity or size of a dataset or model, class
counts, the environment).
A submission that breaks either rule is not a valid solution.
Time and Hardware
You have 12 hours of wall-clock time in this session, covering
everything you do here: reading the code, editing it, and any trial runs
you launch.
Evaluation is separate from your session. Your method must not be slower than the
slowest reference method; their implementations are in the image (see Reference
Methods), so you can time yours against them.
Your container has 4 × NVIDIA H200 (141 GB each), 64 CPU cores and 512 GB of RAM.
Evaluation runs on the same hardware. Its settings run side by side there, each on its own
GPU(s), sharing the CPU cores and memory.
This workspace has 200.0 GiB of disk; filling it ends the run, so prune large intermediate files (checkpoints, model copies) and check with df.
Good luck.