Skip to main content
Back

Microsoft's Dion3 Makes the Optimizer Powering Kimi K2 Run 6x Faster

Microsoft Research's Dion3 optimizer slashes Muon's orthogonalization overhead by up to 6x through smarter math, custom kernels, and selective row updates.

Pro

  • Microsoft Research released Dion3, a Muon optimizer replacement with up to 6x faster steps
  • Available as pip install via the microsoft/dion package with FSDP2 and DDP support
  • Gram Newton-Schulz reformulates orthogonalization to iterate on the small symmetric Gram matrix
  • Custom CuteDSL kernels exploit matrix symmetry for roughly 2x speedup over cuBLAS
  • Fractional row selection with error feedback surprisingly improved loss over tuned NorMuon at every scale tested
  • Megabatching cuts communication rounds to O(1) regardless of model depth

Muon has quietly become the optimizer powering some of the largest language models being trained today, from Kimi K2 to GLM-5. It comes with a tax, though: an expensive Newton-Schulz orthogonalization step that gets painful as models grow. A team from Microsoft Research, Princeton, NYU, and NVIDIA just released Dion3, a drop-in Muon replacement that matches or improves on the loss Muon achieves while reducing optimizer step time by up to 6x. It ships today as part of the microsoft/dion package.

Bar chart showing optimization step time reduced from 26x AdamW to 4x AdamW across Dion3's contributions

Why Muon needs a rescue

Muon works by taking the momentum matrix and running it through a polar decomposition, which rebalances the singular values of each update. It reaches a given loss in fewer steps than AdamW, but each step is heavier. The overhead comes from Muon's Newton-Schulz orthogonalization procedure, a cubic-time matrix operation not present in older optimizers. When weights are sharded across GPUs, Muon must gather the shards together to compute polar on the full matrix, piling on communication overhead that AdamW doesn't have.

Kimi's team made Muon scale, but the authors point out that success required a very specific alignment of architecture, parallelism strategy, and framework versions. Dion3 is designed to remove that fragility.

Four ideas that stack

Dion3 attacks the overhead at every layer of the stack. Each of the four contributions is useful alone, and they compound when combined:

  1. Gram Newton-Schulz. A mathematically equivalent reformulation that iterates on the small n by n Gram matrix instead of the full n by m weight matrix.
  2. Custom CuteDSL symmetric GEMM kernels. Exploit the symmetry of intermediate matrices to halve FLOPs on Hopper and Blackwell GPUs.
  3. Fractional update rule. Only orthogonalize a fraction of the momentum matrix's rows each step.
  4. Megabatched communication. Group all matrices of the same shape into a single all-to-all call.

The Gram trick

Standard Newton-Schulz applies a polynomial directly to the weight matrix X, which means multiple expensive rectangular matrix multiplications per iteration. Gram Newton-Schulz uses the identity that polar(X) equals (X X-transpose) to the negative one-half, times X. So the algorithm forms the small n by n Gram matrix once, iterates entirely on that small symmetric matrix to approximate its inverse square root, and does just one rectangular multiplication at the end. For a typical Muon application, it saves 55% of the FLOPs used by standard Newton-Schulz with symmetric GEMMs, or 68% compared to a typical implementation without them.

Naively lifting this to matrices doesn't work in half precision. The leading cause of the instability is spurious negative eigenvalues that appear in the Gram matrix due to large rounding errors in half-precision arithmetic. These negative eigenvalues theoretically should not exist in a Gram matrix, but they blow up under iteration. The fix is a restart: run two iterations, form the Gram matrix fresh, then run three more. That resets the negative eigenvalues to near zero at minimal extra cost.

Kernels that know the answer is symmetric

The intermediate matrices in Newton-Schulz are symmetric by construction, but cuBLAS doesn't know that and computes both triangles. The team's CuteDSL kernels partition only the lower triangle of work and write each result to both its home tile and its transposed location.

Line graph showing symmetric GEMM kernel speedup versus cuBLAS across matrix sizes on Hopper and Blackwell GPUs

The kernels hit roughly a 2x speedup over cuBLAS for large enough matrices on both Hopper and Blackwell, and they synergize with Gram Newton-Schulz because the Gram variant does more symmetric multiplications than the standard version does.

Just skip most of the rows

The most surprising contribution is the update rule itself. Instead of orthogonalizing the entire momentum matrix, Dion3:

  • Selects the top-f fraction of rows by L1 norm (typical values: 1/4 or 1/8)
  • Orthogonalizes only that submatrix
  • Updates only those rows of the weights
  • Applies error feedback: decays only the selected rows of momentum, so unselected gradients accumulate and eventually get their turn

This shrinks the input to Newton-Schulz by a factor of f and cuts communication volume by 1/f. It also increases the aspect ratio of the input matrix, which makes Gram Newton-Schulz even faster. Together with the compressed data parallelism it enables, the fractional rule provides the biggest single speedup in the paper.

What surprised the authors is that this compression improves loss rather than merely preserving it. Training 1B to 14B parameter models on ClimbMix, Dion3 with f=1/4 beat a tuned NorMuon baseline at every scale tested, with the gap widening at 14B (validation loss down 0.027, downstream accuracy up 0.7 points). The team also identified a clean learning rate transfer rule: the optimal learning rate scales as the square root of 1/f.

Megabatching, because launch overhead is real

Under FSDP, each optimizer step involves gathering shards for every matrix, orthogonalizing, and scattering back. A naive implementation issues one all-to-all per group of world_size matrices. Dion3 packs all matrices of the same shape into a single all-to-all instead. Since transformers have only a handful of distinct weight shapes, this cuts the number of communication rounds to O(1) regardless of depth. On a 1B model with 8 shards where the optimizer is communication-bound, this alone cut step time by 35%.

Using it

The dion package installs via pip and requires PyTorch 2.7 or newer with DTensor-based parallelism. It supports FSDP2, DDP, and hybrid sharding. The API requires manually grouping parameters, since orthogonal optimizers only apply to 2D weight matrices and shouldn't touch embeddings or LM heads:

from dion import Dion2, Muon, NorMuon
param_groups = [
    dict(params=matrix_params),  # uses orthogonal algorithm
    dict(params=vector_params, algorithm="adamw"),
    dict(params=embed_params, algorithm="adamw"),
    dict(params=lm_head_params, algorithm="adamw",
         lr=lr / math.sqrt(model_dim))
]
optimizer = Dion2(param_groups, lr=lr, weight_decay=0.1,
                  distributed_mesh=mesh["shard"])

The Gram Newton-Schulz kernels are also available separately as the gram-newton-schulz package, a drop-in replacement for Muon's Newton-Schulz routine that works with any existing Muon implementation. For teams already running Muon at scale, this is the lowest-friction way to grab the 1.5x-2x speedup from the kernel work without changing the optimizer trajectory at all.

Where Dion3 helps least: architectures like Kimi K2 with sophisticated pipeline parallelism already hide most optimizer time behind the backward pass, so the savings there come out around 2% of wall-clock. Where it helps most: supervised finetuning of a 70B dense model on a small cluster, where Newton-Schulz can eat 17% of every step. That's the setting Dion3 was really built for.