AI agent pre-trains a 5.4B MoE model from scratch in 24 hours and writes its own paper

maksym_andr · x · 2026-12-05

PreTrainBench asks every agent run to write a detailed paper about its work. Gemini 4 Neon (xhigh reasoning) produced ApexLM-5.4B-A1B: a 5.38B-total-param (1.06B active) fine-grained MoE model pre-trained from scratch in 24 hours on 16 H100s (352 GPU-hours, 37B tokens, 0.730 BPB, 36.3 few-shot). The paper details an Iso-Time-validated stack: Muon(NS-5) optimizer (-0.021 BPB vs AdamW), Value Residual Learning (-0.032), ReLU² MLPs over SwiGLU (-0.022, +4–11% throughput), Headwise Gated Attention, 32-expert top-4 MoE with DeepSeek-V3-style aux-loss-free balancing via torch.groupedmm, and a WSD curriculum with Model Souping over 8k-context branches. Evaluated on 5,104 held-out docs; all traces are public.

Related event: PreTrainBench: Agents Given 16 H100s and 24 Hours to Pretrain LLMs from Scratch(9 posts)→

Original post →

More from coding & agent

coding & agent channel →