Turn the axes through 45 degrees把坐标轴转过 45°
Imagine an optimizer that knows the exact curvature along every coordinate. On the quadratic from Part 1 it reaches the minimum in one step. Give it the same bowl viewed at a different angle and it can take 116 steps just to cut the loss to one hundredth. The minimum, curvature eigenvalues and starting loss can all stay the same. What has the optimizer lost?假设一个优化器精确知道沿每条坐标轴的曲率。在第 1 期的二次函数上,它一步就能走到谷底。把同一个碗转过一个角度,它却可能要走 116 步,才能把损失降到原来的百分之一。最低点没变,两个主方向的曲率没变,起点也可以跟着旋转以保持相同的初始损失。究竟丢掉了哪条信息?
Here Q rotates vectors counterclockwise, and the gradient is Hz. Give the optimizer only the diagonal D of H and take a unit preconditioned step. The next error relative to the minimum at zero is (I − D⁻¹H)z. When Q is the identity, D equals H and that error is exactly zero.Q 表示逆时针旋转,梯度为 Hz。只把 H 的对角部分 D 交给优化器,让它用 D 的逆缩放梯度,步长取 1。最低点在原点,走完一步后,剩下的误差就是 (I − D⁻¹H)z。坐标轴与主轴重合时,D 就是 H,误差恰好归零。
At 45°, both diagonal entries read 50.5. The update swaps the coordinates and shrinks each by 99/101. Swapping leaves this quadratic unchanged, so after k steps the fraction of loss remaining is exactly (99/101)2k for any nonzero start. The fraction first falls below 0.01 at k = 116. A full Newton step would still solve this positive-definite quadratic in one update. This calculation isolates the information in the off-diagonal terms. Adam estimates gradient moments from samples, so its step count must be measured separately.旋转后,两个对角元都变成 50.5。更新会交换两个坐标,再分别乘以 99/101。这个二次函数在交换坐标后取值不变,因此从任意非零点出发,走 k 步后剩余的损失都恰好是初值的 (99/101)2k。代入 k = 116,损失比例才首次低于 0.01。使用完整 H 的牛顿法仍能一步解出这个正定二次问题。这个算例隔离了非对角项的作用。Adam 从样本梯度估计矩,实际要走几步,需要另行测量。
How many steps pay for a slower update?每步更贵,要少走多少步才划算?
Suppose AdamW reaches a chosen validation loss in 1,000 updates at 100 ms each. A candidate needs only 800 updates, but at 130 ms each it finishes in 104 seconds. If evaluation and startup costs are equal, the break-even point is 100/130 of the baseline step count. The candidate must finish in 769 updates or fewer to beat 100 seconds. These are illustrative timings.假设 AdamW 用 1,000 步达到指定的验证损失,每步 100 毫秒,共 100 秒。另一种方法只用 800 步,每步却要 130 毫秒,最后花了 104 秒。若评估和启动开销相同,新方法的步数就必须降到基线的 100/130 以下。换成整数,最多能走 769 步。这些时间是为了算清门槛而设的示例值。
Muon and AdamW on one A100单张 A100 上的 Muon 与 AdamW
Akhtar and colleagues tested reference Muon against AdamW on a single A100-SXM4 GPU with 40 GB of memory, using BF16 and five paired random seeds. The two workloads shown here are a 17.66M-parameter language model on FineWeb-Edu and a 2.70M-parameter vision transformer on balanced CIFAR-100. The Muon run used AdamW for embeddings, biases and other parameters outside the hidden weight matrices.Akhtar 等人在一张 40 GB 的 A100-SXM4 上,用 BF16 和五组配对随机种子比较了 Muon 参考实现与 AdamW。下表摘录两项任务的结果。语言模型有 1766 万个参数,在 FineWeb-Edu 上训练。视觉 Transformer 有 270 万个参数,在类别均衡的 CIFAR-100 上训练。Muon 组只对隐藏层权重矩阵使用 Muon,嵌入、偏置等其余参数仍用 AdamW。
For each pair, the authors plotted validation loss against either data consumed or seconds spent training. They divided the area under each curve (AUC) by the shared budget to obtain the average loss over that interval. The table reports the reduction relative to AdamW. A positive value favors Muon. A negative value favors AdamW.两种算法从同一起点出发。沿横轴分别记下已用的数据量或训练秒数,纵轴记录验证损失。把损失曲线下面积(AUC)除以共同走过的横轴长度,就得到这一段的平均损失。表中的降幅以 AdamW 为基准,正值表示 Muon 的平均损失更低,负值表示 AdamW 更低。
| Metric指标 | Language语言模型 | Vision视觉模型 |
|---|---|---|
| AdamW throughputAdamW 吞吐量 | 116,300 token/s | 4,215 images/s 张/秒 |
| Muon throughputMuon 吞吐量 | 43,879 token/s | 1,430 images/s 张/秒 |
| Loss reduction at equal data等数据量的损失降幅 | +3.25% | +16.98% |
| Loss reduction at equal time等训练时间的损失降幅 | −6.96% | +19.68% |
Muon processed fewer tokens and fewer images per second. In the language run its advantage per token disappeared on the clock. In vision, even at that lower throughput it delivered a lower average loss in the same training time. The clock includes the forward pass, backward pass and optimizer update, and pauses for validation, logging and checkpoint writes. These timings apply to the reference implementation on this GPU. Akhtar et al., Tables 4 and 6. Part 5 compares final losses at fixed token budgets.在这两项任务里,Muon 每秒处理的 token 和图片都更少。语言模型按 token 数比较时占优,按训练时间比较时优势就消失了。视觉模型虽然每秒看的图片更少,同样长的训练时间里,平均损失依然更低。这里的计时包括前向、反向和优化器更新,验证、记录日志和保存检查点时停表。换硬件或优化器内核后,吞吐量需要重测。Akhtar 等,表 4、表 6。第 5 期按固定 token 预算比较了最终损失。
Which weights go into the validation run?拿哪一组权重做验证?
A comparison can also go wrong before the timer starts. In Defazio and colleagues’ Schedule-Free method, the point used to evaluate a gradient differs from the weights used for validation. The simplest constant-step version below starts with z₁ = x₁. The latest iterate z takes a gradient step, x averages the iterates, and y is the point between them at which the gradient is sampled.有时秒表还没按下,比较的口径就已经错了。Defazio 等人提出的 Schedule-Free 方法用一组权重求梯度,用另一组做验证。下面是最简单的恒定步长版本,取初值 z₁ = x₁。z 保存最新的迭代点,x 保存历次迭代点的平均值,求梯度的位置 y 则在两者之间。
If zₜ = 2, xₜ = 1 and β = 0.9, then yₜ = 1.1. For f(u) = u²/2, that gives a gradient of 1.1, while the validation value at xₜ is 0.5. Reading the training weights at yₜ would give 0.605. The constant base step keeps z responsive to new gradients. Each new point changes the average x less as the history grows. This is how the basic construction can dispense with a predeclared decay horizon. The AdamW variant also scales its base update adaptively. Defazio et al., 2024. Authors’ train/eval implementation.若 zₜ = 2、xₜ = 1、β = 0.9,求梯度的位置就是 yₜ = 1.1。对函数 f(u) = u²/2,算得的梯度为 1.1,拿 xₜ 验证时函数值为 0.5。如果误用训练位置 yₜ,就会记成 0.605。恒定的基础步长让 z 能及时响应新梯度,而历史越长,新点对平均值 x 的影响越小。这解释了基本方法为何可以省去预先指定终点的学习率衰减。Schedule-Free AdamW 还会自适应地缩放基础更新。2024 年原论文。作者实现中的训练与验证切换。
In the 2026 AlgoPerf V1 self-tuning report, one configuration had to serve nine workloads on fixed hardware. Schedule-Free AdamW ranked first among 13 submissions under that rule. If your team can afford a separate search for every task, the benchmark answers a different question from yours. AlgoPerf V1 report.2026 年 AlgoPerf V1 的自调参组要求一套配置用于九种工作负载,并固定硬件。按这套规则,Schedule-Free AdamW 在 13 份提交中排第一。如果团队有预算为每个任务单独搜索参数,就要重新检验这个排名是否适用。AlgoPerf V1 报告。
Ten optimizer groups at a glance十组优化器对照表
One buffer here has the same shape as the weights it serves. In FP32 that costs four bytes per parameter before sharding. The table counts state carried between steps. Model weights, master copies, gradients, activations and temporary workspace are separate. Eight-bit storage changes the precision of a buffer and can be applied to an existing optimizer.下表把与权重形状相同的一个数组算作“一份”。用 FP32 存储时,分片前每份占每个参数 4 字节。这里只数优化器要带到下一步的数据。模型权重、高精度权重副本、梯度、激活值和临时工作区都另计。8 位存储是压缩这些状态的方式,可以用在已有优化器上。
| Method方法 | State, benefit and cost保存什么,换来什么,又付出什么 |
|---|---|
| GD / SGD | 0 buffers. Full-batch GD reads all the data for each step. Plain SGD can update after a minibatch, at the cost of a noisier direction.0 份。GD 每步读取全量数据。普通 SGD 读完一个小批量就能更新,代价是方向更容易受抽样波动影响。 |
| Heavy ball / Nesterov重球法 / Nesterov | 1 momentum buffer. Persistent gradients build speed along a valley. Excess momentum can carry the weights past the minimum. Nesterov samples the gradient at the lookahead point.1 份动量。梯度方向持续一致时,动量能加快沿谷底前进的速度。动量太大也会冲过谷底。Nesterov 在向前试探的位置求梯度。 |
| AdaGrad / RMSProp | 1 squared-gradient buffer in the basic versions. AdaGrad accumulates all past squares, giving rare features relatively larger steps. Steps can shrink late in training. RMSProp gradually forgets old observations, so it can follow a changing scale.基本形式均存 1 份梯度平方统计量。AdaGrad 累加历次梯度的平方,让低频特征保有相对较大的步长,但后期步长可能过小。RMSProp 逐渐淡忘旧观测,能跟上近期梯度尺度的变化。 |
| Adam / AdamW | 2 buffers for first and second moments. Coordinate-wise scaling makes AdamW a useful Transformer baseline. It applies weight decay separately. At FP32 these two buffers cost 8 bytes per parameter.2 份,分别跟踪梯度的一阶矩和二阶原点矩。逐坐标调整步长,适合作为 Transformer 的对照基线。AdamW 单独施加权重衰减。按 FP32 存储,两份状态合计每个参数 8 字节。 |
| Lion | 1 momentum buffer. Before weight decay, the sign update takes a step of the same magnitude in each nonzero direction within a parameter group. It saves one buffer versus AdamW. Tune the learning rate for these sign steps.1 份动量。单看符号更新,同组中方向为正或负的坐标每步移动相同的距离,权重衰减另计。比 AdamW 少存一份状态,学习率需要针对这种步子重新调。 |
| Sophia-H / G | 2 buffers for momentum and diagonal curvature. Curvature scales the step and clipping limits its size. Include the periodic Hessian–vector products (H) or sampled-label gradient computations (G) in the timing.2 份,分别保存动量和对角曲率估计。按曲率缩放更新,再限制步长。计时时要包括周期性的额外计算,H 版要算 Hessian 与向量的乘积,G 版要用采样标签求梯度。 |
| Shampoo | Row and column statistics. For an unblocked m × n weight matrix, they take m² + n² entries and capture correlations within each axis. Matrix roots cost time, and caching them takes extra memory.存行、列两组统计矩阵。对未分块的 m × n 权重,统计矩阵共有 m² + n² 个元素,分别记录行、列内部的相关性。求矩阵的逆分数次幂要花时间,缓存结果还要占显存。 |
| SOAP | 2 moment buffers plus axis statistics and bases. Adam adapts coordinates in a basis learned from the gradients. Moving into and out of that basis costs matrix multiplications, and periodically refreshing it adds work.2 份矩状态,另存各轴统计矩阵和基底。先用梯度估计一组新坐标轴,再在其中运行 Adam。每次转换坐标都要做矩阵乘法,还要定期更新基底。 |
| Muon | 1 momentum buffer per eligible matrix. Orthogonalizing the update changes how it acts along the matrix’s singular directions. Time the extra matrix multiplies and count the optimizer states for embeddings and biases separately.每个适用的权重矩阵存 1 份动量。正交化会重新分配更新在各个奇异方向上的强度。要计入额外矩阵乘法的耗时,也要单算嵌入和偏置所用优化器的状态。 |
| Schedule-Free AdamW | 2 buffers in the authors’ default implementation. A separate iterate and a squared-gradient average let you train without choosing a decay end date. Switch the optimizer to evaluation mode before reading validation loss.作者默认实现额外存 2 份状态。额外保存一个迭代点和梯度平方的均值,可以省去预设学习率衰减终点。读取验证损失前,要把优化器切换到评估模式。 |
What changed in 2026?2026 年的三项研究,分别改了哪一步?
Three preprints available by December 3, 2026 change different parts of a language-model training run. Each result below comes from its authors’ experiment. The model, baseline and unit of comparison matter in each case.截至 2026 年 12 月 3 日,下面三篇预印本分别考察了语言模型预训练中的三个选择。读作者报告的数字时,可以先问一句:这次固定了什么,又测量了什么?
MuonIO · Which layers should use AdamW?MuonIO · 输入和输出层也能省显存吗?
A token selects one vector from the embedding table. At the output, each token also has a vector that scores the hidden state. MuonIO normalizes each token vector’s update separately in these two layers. In the authors’ 1B LLaMA run on C4, replacing AdamW in the input and output layers halved those layers’ optimizer state and cut their update FLOPs by about 46%. Estimating whole-model savings requires knowing what share those layers accounted for. Ma et al., October 2026.输入一个词元(token),嵌入表就取出对应的向量。在输出端,每个词元也有一个向量,用来给当前隐藏状态打分。MuonIO 利用这一点,把这两层中每个词元向量的更新分别归一化。作者在 C4 上训练 10 亿参数的 LLaMA,用它替换常规 Muon 配方中负责输入和输出层的 AdamW。这两层的优化器状态减半,更新所需的浮点运算量减少约 46%。要估算整机能省多少显存,还得知道这两层原本占多少。MuonIO 原论文,2026 年 10 月。
Hyperball · How far does one step turn a weight matrix?Hyperball · 同样长的一步,能让权重转过多大角度?
Imagine flattening a weight matrix into a vector. For a small sideways step, the longer the vector, the less its direction turns. Hyperball lets an optimizer such as Muon supply the direction. It normalizes that update, takes a step proportional to the matrix’s initial length, then rescales the new weights to that initial length. On Qwen3-style models up to 1.2B parameters, the authors reported a 20–30% token-equivalent speedup for Muon Hyperball, estimated from validation loss using a scaling curve. To budget GPU hours, you still need the time per token. Hyperball, October 2026 revision.把权重矩阵展平成一根向量。沿侧面迈一小步,向量越长,方向偏转的角度就越小。Hyperball 先从 Muon 等基础优化器取得更新方向,将其归一化,按矩阵初始长度的一定比例迈步,再把新权重缩放回初始长度。作者在最大 12 亿参数的 Qwen3 风格模型上,用验证损失和缩放曲线折算,报告 Muon Hyperball 相对采用权重衰减的基线获得 20%–30% 的 token 等效加速。要换算成 GPU 小时,还需要每个 token 的实际耗时。Hyperball 原论文,2026 年 10 月修订。
AIMuon · Is a second matrix iteration worth its cost?AIMuon · 每步多做一次矩阵迭代,划得来吗?
Momentum smooths the gradient. Their difference captures what the latest batch adds to that history. AIMuon orthogonalizes this residual and the momentum separately with Newton–Schulz iterations, then combines the directions and rescales the update to match Muon’s magnitude. On Qwen3-0.6B it reached Muon’s final validation loss in 6.49% fewer steps. Finishing the same token budget on eight H100s took 14.96 hours with AIMuon and 14.36 with Muon. These times exclude validation and this model used one seed. If you stop at a target quality, time that checkpoint. If you rent GPUs for a fixed corpus, budget for the full run. Ren et al., November 2026, training costs.动量平滑了历次梯度,当前梯度与动量的差值保留了这一批数据带来的变化。AIMuon 用 Newton–Schulz 迭代分别正交化这个差值和动量,将两个方向加权合并,再把更新幅度调到与 Muon 一致。在 Qwen3-0.6B 上,它达到 Muon 最终验证损失所需的步数少了 6.49%。如果跑完相同数量的 token,8 张 H100 上,AIMuon 用了 14.96 小时,Muon 用了 14.36 小时。这组实验只用了一个随机种子,计时扣除了验证。按目标质量交付,就测首次达标的用时。按固定语料租卡,就看跑完全程的账单。AIMuon 原论文,2026 年 11 月,计算成本。
Choose the experiment that would change your decision怎样设计一次足以改变选型的实验?
Start with the constraint. For a new Transformer run, use a tuned AdamW baseline and record which tensors receive weight decay. If memory is tight, check what occupies it. Two FP32 moment tensors use eight bytes per parameter before sharding. A billion parameters therefore need 8 GB just for those moments. Lion keeps one moment. Another option is to keep AdamW and quantize its states blockwise. Two 8-bit entries use two bytes per parameter before scales and exceptions. Measure peak device memory including weights, gradients and activations. Dettmers et al., ICLR 2022.先确认瓶颈。训练一个新 Transformer,可以先调好 AdamW,记下哪些张量参与权重衰减。如果卡在显存,先弄清谁占得最多。分片前,两个 FP32 矩状态每个参数占八字节,十亿个参数光这两项就要 8 GB。Lion 只保留一个动量状态。另一条路是保留 AdamW,将状态分块量化。两个 8 位数每个参数共占两字节,还须另计缩放系数和保留高精度的部分。最终要实测包含权重、梯度和激活值的显存峰值。Dettmers 等,ICLR 2022。
Pay for information only when it helps. If dense hidden-layer matrices dominate the run, test Muon or SOAP on the applicable tensors and record the optimizer for embeddings and biases. If trying Sophia, charge curvature-estimation passes to its time and data budget. On a sparse-feature problem, AdaGrad is a useful comparison because repeated observations shrink the steps for frequent features. Decide in advance which failure of the baseline each candidate is meant to address.让额外计算对应一个具体问题。若训练主要花在稠密隐藏层,可在适用的权重矩阵上试 Muon 或 SOAP,并交代嵌入和偏置各用什么方法。试 Sophia 时,把估计曲率所用的计算和样本也记入预算。若任务由大量稀疏特征组成,可以加入 AdaGrad 作对照,看高频特征的步长随观测次数缩小后,低频特征能否学得更好。每引入一个候选方法,都先写下它要解决基线的哪个问题。
Make the decision reproducible. Fix the model, data order, precision, hardware and evaluation cadence. Give each method the same tuning budget but allow its own learning rate, decay and schedule. Select on validation data, then compare fresh matched seeds. Report time and tokens to the prespecified target, peak memory, the spread across seeds and runs that missed the target. Also inspect final checkpoints at the same budget. Wen and colleagues found that rankings during language-model pretraining could change by the end of the schedule. Wen et al., pretraining comparison.让别人能够复核决定。固定模型、数据顺序、精度、硬件和验证频率。各方法享有相同的调参预算,但分别寻找适合自己的学习率、权重衰减和调度方式。用验证集选配置,再换几组配对种子复测。记录达到预定目标的用时和 token 数、显存峰值、各组种子间的差异,也记录到预算耗尽仍未达标的运行。最后比较相同预算下的最终检查点。Wen 等人的语言模型实验发现,学习率衰减走完之后,优化器的先后次序可能改变。Wen 等人的预训练对照研究。