ModelsSelected

New NanoGPT Speed Record at 39.9s via Flop-Aware Training

Why we picked it

The record shifts NanoGPT training from kernel-level tuning to selectively skipping flops, meaning total parameters can grow far beyond active ones — up to 65B sparse embeddings on hardware as small as 8xH100. Practitioners reproducing speedrun records or designing sparse training recipes can study the PR and Deven's writeup for concrete techniques like retroactive beta2 and one-float optimizer states per 768 params. It is an open-source result on Keller Jordan's NanoGPT repo, directly comparable with prior speedrun baselines.

Deven Pzak set a new NanoGPT speed record of 39.9s on 8xH100, down 27.

Body

7s from the prior record of 67.6s.

The approach skips low-value flops at the individual operation level: sampled softmax saved about 8s, sparse n-gram embedding updates and sharded communication cut optimizer work further.

The PR scales sparse embedding parameters to 65B while keeping active parameters below 124M.Accuracy additions include EMA over the last 300 steps and a new optimizer, Anvil2, extending muon with a second momentum buffer.

Original · Thomas Wolf

impressive Larry Dial @classiclarryd New historic NanoGPT record at 39.9s (-27.7s) from @DevenPzak , obliterating the prior record of 67.6s! This record introduces a new paradigm of thinking to NanoGPT: instead of optimizing matmuls or adding more expressive operations, optimize at the individual flop level with incredibly clever engineering and ML judgement. If a flop is low value on a particular step, skip it. Specifically: -(~8s) Sampled softmax. If a token doesn’t appear in a batch, skip its lm_head fwd/bwd some fraction of the time. -Sparse values. Only run an optimizer step for ngram embeddings that occurred in the batch. Set beta1 to zero to enable this. Beta2 is applied retroactively when the row is later used. -Sparse updates. Only update ngram and value embeddings once every 4 steps instead of once every 2. -Sparse communication. Shard the n-gram table across GPUs, and only pass the rows receiving updates on each step. -Sparse optimizer states. For the n-gram table, reduce from 2 floats in Adam optimizer per param, to 1 float per 768 params. -Hand-rolled flash attention for 64 dim heads. There are several additions that add accuracy too: -(~4s) EMA during last 300 steps, combined with lifting final_lr to 0.3 instead of 0.15. -(~1s) A new optimizer, Anvil2, which expands muon via a second tracked momentum buffer, improves the ortho coefficients, and modifies the cautious weight decay application. -A couple additional dynamic skip connections in the network. The most striking consequence of the ‘flop aware paradigm’ is you can grow parameters arbitrarily large, only limited by the available memory, since you can selectively choose how to expend flops on those parameters on each step. NanoGPT has kept active parameters below 124M, but total is unbounded, and has grown to 640M through embedding sparsity over the last year. This PR takes that to its logical conclusion on the 8xH100, scaling up to 65B sparse embedding parameters, which accounts for 25% of the PR’s gains. At frontier scale, where one is not bounded by an 8xH100, one could imagine where this paradigm could lead. github.com/KellerJordan/m… As this was a very notable PR, I spoke with Deven for an hour to learn how he did it. Here’s his story on the changes: hyperstition.cc/training-nanog… 🔗 View Quoted Tweet📊 1 ⚡

Industry Coordinates & Source Verification

This report is categorized under AITOP's "Models" desk, focusing on US frontier AI labs and Silicon Valley technology leaders. Within our cross-regional analytical framework, it directly maps to AI developer toolchains, coding agents, and engineering workflows and US-China foundation model benchmarks and commercialization comparison. Key entities and technical topics under continuous tracking include NanoGPT, Anvil2, Muon, training efficiency.

Source attribution: curated from Thomas Wolf (@Thom_Wolf).