Experiments›Generating Distributions
Nov 1, 2026

Generating Distributions

By Wenhao Chai作者 Wenhao Chai

Setup设置

We train the official baseline of GPIC, the PixelGen recipe in the GPIC repository: a transformer of about 1.1B parameters that denoises 256×256 images directly in pixel space, conditioned on a frozen Qwen3-1.7B text encoder. We name a model dN by its number of image blocks; each size also has 2 to 4 text blocks: the official model is d16 (16 + 4), and our ladder runs d9 (9 + 2, width 640), d10, d11, d12, d14, d16 and d18 (18 + 4, width 1792). The data is GPIC Lite, training shards 0 to 800 of the Giant Permissive Image Corpus, which hold about 10M image–caption pairs in 1.28 TB of WebDataset tar files. We evaluate with the official gpic_eval kit, which generates 50K images from the test captions and reports FD-DINOv2, the Fréchet distance between DINOv2 features of the generated and the test images (lower is better). The page compares the wall-clock time of each stage of the loop, from data loading through training and sampling to evaluation, while the training math stays the same.

我们训练 GPIC 的官方基线,即 GPIC 仓库里的 PixelGen 配方:一个约 1.1B 参数的 transformer,直接在像素空间给 256×256 的图像去噪,条件来自冻结的 Qwen3-1.7B 文本编码器。我们按图像块数把模型叫作 dN,每个大小另有 2 到 4 个文本块:官方模型是 d16(16 + 4),我们的 ladder 有 d9(9 + 2,宽度 640)、d10、d11、d12、d14、d16 和 d18(18 + 4,宽度 1792)。数据是 GPIC Lite,即 Giant Permissive Image Corpus 的第 0 到 800 个训练分片,约 1000 万对图文,存成 1.28 TB 的 WebDataset tar 文件。评测用官方的 gpic_eval 工具:按测试集的 5 万条描述生成 5 万张图,报告 FD-DINOv2,即生成图和测试图在 DINOv2 特征上的 Fréchet 距离,越低越好。本页比较整个流程每个环节的实际耗时,从读数据、训练、采样一直到评测,训练的数学始终不变。

Details详细说明

The model is the JiT-T2I transformer of PixelGen, trained with flow matching to predict the clean image (x-prediction). It has a hidden width of 1536, 24 attention heads, 16 image blocks and 4 blocks that refine the text features, and cuts the image into 16-pixel patches, so a 256×256 image becomes 256 tokens. Captions are padded to 300 tokens before the text encoder. Each image has one caption: a list of tags, or a short, medium or long description, in proportions of 1%, 45%, 45% and 9%. The official run uses AdamW with learning rate 1e-4 and betas (0.9, 0.95), a global batch of 256 on 8 GPUs, bf16 and an EMA decay of 0.9999. It trains for 400K steps, about one epoch of GPIC Full, and reaches an FD-DINOv2 of about 76. The evaluation samples with 50 Euler steps and classifier-free guidance, extracts DINOv2 ViT-L/14 features at 224 pixels, compares them with the statistics of the test set that the kit ships, and also reports precision, recall, density, coverage and MMD. Our evaluations add the official Inception metrics (FD, PRDC, MMD) and the held-out loss to every checkpoint. Since 2026-11-09 they run on faster code (gpic-28): FD moves by 0.03% to 0.07% (dynamic-shape kernels, a padded last batch), and the Inception PRDC draws its 10K-sample subsample with a fixed seed, so its values differ from the earlier, unseeded ones.

模型是 PixelGen 的 JiT-T2I transformer,用 flow matching 训练,直接预测干净图像(x-prediction)。它的隐藏维度为 1536,有 24 个注意力头、16 个图像块和 4 个细化文本特征的块,图像切成 16 像素的 patch,所以一张 256×256 的图对应 256 个 token。描述在送入文本编码器前补齐到 300 个 token。每张图有一条描述,形式是一串标签,或短、中、长三种描述之一,比例分别为 1%、45%、45% 和 9%。官方 run 使用 AdamW,学习率 1e-4,betas 为 (0.9, 0.95),8 张 GPU 上全局 batch 为 256,bf16,EMA 衰减 0.9999。它训练 40 万步,约为 GPIC Full 的一个 epoch,FD-DINOv2 约为 76。评测用 50 步 Euler 采样并加 classifier-free guidance,在 224 像素下提取 DINOv2 ViT-L/14 特征,与工具自带的测试集统计量比较,同时报告 precision、recall、density、coverage 和 MMD。我们的评测还给每个检查点加上官方的 Inception 指标(FD、PRDC、MMD)和留出损失。2026-11-09 起评测换成更快的代码(gpic-28):FD 变化 0.03% 到 0.07%(动态形状的 kernel,补齐的最后一个 batch);Inception 的 PRDC 用固定种子抽 1 万个样本,所以它的值和以前不固定种子的值不同。

Caption featurescaption 特征Qwen3-1.7B, ≤320 × 2048Qwen3-1.7B,≤320 × 2048Text block × nt文本块 × ntself-attention, MLP自注意力、MLPtext tokens, read as文本 token 只作为keys and valueskey 和 value 被读取Noisy image带噪图像256 × 256 pixels256 × 256 像素256 patch tokens256 个 patch token16-px patches16 像素 patchImage block × nb图像块 × nbattention to image + text, MLP注意力看图像和文本、MLPlinear线性Clean image干净图像x-predictionx-predictionTimestep t时间步 tadaLN: shift, scale, gateadaLN:shift、scale、gate
JiT-T2I, the model of every ladderJiT-T2I,每个 ladder 的模型

Text blocks refine the caption tokens once per forward pass. Image blocks let the 256 patch tokens attend to themselves and to the refined text, which they read but do not change. The timestep modulates every block. A size dN has N image blocks and 2 to 4 text blocks, and the width grows with the size (64 per attention head).文本块在每次前向里把 caption token 细化一次。图像块让 256 个 patch token 对自身和细化后的文本做注意力,文本只被读取、不被改变。时间步调制每一个块。大小 dN 有 N 个图像块和 2 到 4 个文本块,宽度随大小增大(每个注意力头 64 维)。

Size大小Width宽度Image blocks图像块Text blocks文本块Heads注意力头Parameters参数量
d96409210109M
d1076810212171M
d1189611214252M
d12102412316376M
d14128014320665M
d161536164241.12B
d181792184281.68B

How we build the ladder搭建 ladder 的流程

  1. Start from the strongest published recipe of the same kind, and convert by theory what does not carry over. The next ladder takes MiniT2I's settings, Adam with a batch of 1024 and β2 0.95, and turns them into the MuP version of Muon by Su's rule, lr × 0.2√d, whose learning rate should hold across widths.
  2. Check the conversion with a search before the ladder, at the run lengths the ladder will use. The best constant rate falls as a run takes more steps, and at equal compute a deeper model takes fewer, so compare depths at equal steps; score the raw weights, because in short runs the EMA still holds the initial weights and ranks nothing (Muon learning rate, EMA lag).
  3. Make every depth fast without changing what it computes. Measure MFU per depth, keep each speed lever behind a switch, and accept a lever that changes rounding only when its loss stays within the spread of repeated runs. At the fixed batch, choose the number of GPUs for each depth (MFU). The fused kernels pass this test. The shared caption bucket leaves the held-out loss unchanged (within 0.07%); but with one caption-length bucket per step FD depends on the seed (966.6 to 1016.6) and averages 4% above runs with thirty-two buckets per step, which repeat within 0.3% (nine runs). The shared bucket also needs every GPU to cross the end of a data pass together; a version that built a new gloo group at each pass hung there, and the fix keeps one group and one epoch.
  4. Measure what repetition costs before fitting any optimum. At one depth and one compute, vary only the number of unique images, over three decades from 101K to 101M, and read FD, the held-out loss and the training loss against the passes over the data. This gives the number of passes that cost nothing (repeating images).
  5. Fit the compute-optimal size on data that repeats no more than that. Lay out an iso-FLOP grid of depths and FLOP budgets, triangular as in Marin's sweeps; train each depth once at a constant learning rate and read it at every budget; fit a parabola in log N at each budget for the optimal size, the optimal tokens and the tokens per parameter (ladder, optimum).
  6. Score every point two ways: FD-DINOv2 with the official evaluation at CFG 1, and the loss on held-out images, which is smoother and is the quantity that language-model scaling studies fit. The held-out images are the first 3072 of GPIC's validation split, with their own captions, each scored at the same 16 noise levels with the same noise at every checkpoint; none of their keys is among the 99,975,623 keys of the 8000 training shards, and GPIC removed exact duplicates and near-copies (SSCD copy-detection features) from the whole corpus before it made the splits. Runs whose held-out loss agrees to 0.1% can differ by several percent in FD (figure 13), so a small FD difference between two runs needs a repeat before it counts.
  7. Place the released reference model on the same evaluation, so that the ladder reads against the published result. The released GPIC model scores FD 472.4 with Euler at 50 steps and CFG 1.
  8. Only then test new methods, each against the ladder at the same compute, and redesign earlier experiments on the new ladder where it changes their baseline.
  9. Record every step on this page with its literature, in the units of language-model scaling studies: FLOP budgets, depths as rungs, tokens per parameter, unique and total tokens.
  1. 从同类里最强的已发表配方出发,搬不过来的部分用理论换算,而不是重新调。下一个 ladder 采用 MiniT2I 的设置(Adam,batch 1024,β2 0.95),并按苏剑林的规则(lr × 0.2√d)换成 MuP 版 Muon,它的学习率应该能在宽度之间迁移。
  2. 开始 ladder 之前,用搜索检查换算,搜索的运行长度要和 ladder 一样。一次运行的步数越多,最优的常数学习率越小,而相同算力下越宽的模型步数越少,所以要在相同步数下比较深度;并给原始权重打分,因为短运行里 EMA 还含着初始权重,排不出学习率(Muon 学习率、EMA 滞后)。
  3. 在不改变计算内容的前提下,让每种深度都跑得快。按深度测 MFU,每项提速都放在开关后面;改变舍入的提速,只有损失落在重复运行的范围以内才采用。在固定的 batch 下,为每种深度选 GPU 数(MFU)。融合内核通过了这项检验。共享 caption 档不改变留出损失(相差不到 0.07%);但每步只有一个 caption 长度档时,FD 取决于种子(966.6 到 1016.6),平均比每步三十二个档的运行高 4%,而后者重复时只差 0.3%(九次运行)。共享档还要求所有 GPU 一起跨过数据的一遍;每遍新建 gloo 组的版本在那里卡住了,修复后只用一个组、一个 epoch。
  4. 拟合任何最优点之前,先测重复的代价。固定深度和算力,只改唯一图像的数量,从 10.1 万到 1.01 亿跨三个数量级,按数据被过了几遍来读 FD、留出损失和训练损失。由此得到几遍以内不吃亏(重复图像)。
  5. 再在重复不超过这个遍数的数据上拟合最省算力的大小。按深度和 FLOP 预算排一张 iso-FLOP 网格,和 Marin 的扫描一样是三角形;每种深度用恒定学习率训练一次,在每个预算处读数;在每个预算上对 log N 拟合抛物线,得到最优大小、最优 token 数和每个参数的 token 数(ladder、最优点)。
  6. 每个点用两种方式打分:官方评测、CFG 1 的 FD-DINOv2,以及留出图像上的损失;后者更平滑,也是语言模型 scaling 研究拟合的量。留出图像是 GPIC 验证集的前 3072 张,用它们自己的 caption,每个检查点上每张图都用同样的 16 个噪声水平和同样的噪声;8000 个训练 shard 共有 99,975,623 个 key,其中没有一个是它们的 key;GPIC 在划分数据集之前,已在整个数据集里去掉完全相同的图和近似拷贝(SSCD 拷贝检测特征)。留出损失相差不到 0.1% 的运行,FD 可以相差几个百分点(图 13),所以两次运行之间小的 FD 差别要重复一次才算数。
  7. 把发布的参考模型放在同一套评测上,让 ladder 能和已发表的结果对照。发布的 GPIC 模型在 50 步 Euler、CFG 1 下的 FD 是 472.4。
  8. 到这一步才检验新方法,每个都和 ladder 在相同算力下比;如果新 ladder 改变了以前实验的基线,就在新 ladder 上重新设计它们。
  9. 每一步都连同文献记在这一页上,用语言模型 scaling 研究的单位:FLOP 预算、深度当作梯级、每个参数的 token 数、唯一 token 和总 token。

Experiments实验

Testing检验中Does the official pipeline run end to end on GPIC Lite on our cluster and behave like the official run?官方流程能在我们的集群上用 GPIC Lite 完整跑通,并且表现和官方 run 一致吗?

Answered已有结论Where does the time of a training step and of an evaluation go?一步训练和一次评测的时间花在哪里?

A training step splits into data loading and JPEG decoding, the Qwen3-1.7B text encoder, the denoiser's forward and backward passes, and the optimizer step with the EMA update. An evaluation splits into sampling and DINOv2 feature extraction.

一步训练分成几段:读数据和解码 JPEG、Qwen3-1.7B 文本编码器、去噪网络的前向和反向,以及优化器更新和 EMA 更新。一次评测分成采样和提取 DINOv2 特征两段。

In the official code on 8 H100s with 32 images per GPU, a step takes 263 ms: 90 ms of matrix multiplies, 89 ms of element-wise kernels, 37 ms of communication that the backward pass does not hide, 29 ms in which the GPU waits on the host, and 17 ms of attention. AdamW, gradient clipping and the EMA account for about 40 ms of the element-wise time, and the frozen text encoder does 38% of the step's FLOPs: 866 GFLOP per image, against 1394 for the denoiser's forward and backward passes. An evaluation of 50K samples would take about two hours on one H100: 87 minutes of sampling, because the official sampler always runs the doubled batch of classifier-free guidance, and 34 minutes of DINOv2 features, which wait on images decoded in the main process. Writing the samples as PNG files costs another 39 ms per image on one CPU core. Question 3 removes most of this.

官方代码在 8 张 H100、每张 GPU 32 张图时,一步 263 ms:矩阵乘法 90 ms,逐元素 kernel 89 ms,反向传播没有掩盖的通信 37 ms,GPU 等主机 29 ms,注意力 17 ms。逐元素的时间里约 40 ms 是 AdamW、梯度裁剪和 EMA;冻结的文本编码器做了一步 38% 的 FLOPs:每张图 866 GFLOP,而去噪网络的前向和反向是 1394 GFLOP。一次 5 万个样本的评测在 1 张 H100 上约要两小时:采样 87 分钟,因为官方采样器总是跑 classifier-free guidance 的双倍 batch;DINOv2 特征 34 分钟,它要等主进程解码图像。把样本写成 PNG 文件,每张图还要在一个 CPU 核上多花 39 ms。第 3 个问题去掉了其中的大部分。

Testing检验中How much faster can the whole loop get with the training math unchanged?训练的数学不变,整个流程能快多少?

A speedup counts only when the model, the data, the batch size and the optimizer stay those of the official configuration. We work from the infrastructure, namely the data path, parallelism, compilation and CUDA graphs, down to the kernels for attention, the fused normalization and modulation, and the optimizer.

只有模型、数据、batch 大小和优化器都与官方配置相同,提速才算数。我们从基础设施做起,即数据通路、并行方式、编译和 CUDA graph,一直做到 kernel:注意力、融合的归一化与调制,以及优化器。

The middle and bottom panels also answer question 2.

中图和下图也回答了问题 2。

Planned计划中Does the champion recipe, moved to pixel space, beat PixelGen at the same training compute?冠军方案搬到像素空间后,在相同训练算力下能胜过 PixelGen 吗?

The champion recipe is the best recipe of the text-to-image track of Autonomous Pretraining at Scale, here moved to pixel space, with the official Qwen3-1.7B text encoder, no classifier-free guidance and packed captions.

冠军方案是 Autonomous Pretraining at Scale 文生图赛道的最佳方案。这里把它搬到像素空间,用官方的 Qwen3-1.7B 文本编码器,不用 classifier-free guidance,并把描述打包输入。

Testing检验中Does Muon train PixelGen to better samples than AdamW?用 Muon 训练 PixelGen,样本质量比 AdamW 更好吗?

The matrices inside the transformer blocks take Muon, with its update scaled to the size of AdamW's, and everything else keeps the official AdamW; a variant splits the fused attention, MLP and modulation matrices into their parts before orthogonalizing.

Transformer 块里的矩阵改用 Muon,更新幅度缩放到与 AdamW 相当,其余参数仍用官方的 AdamW。一个变体先把融合的注意力、MLP 和调制矩阵拆成各自的部分,再做正交化。

The ladders that follow will run on Muon (owner, 2026-11-07). We take the settings of MiniT2I, a minimal pixel-space JiT for text to image: Adam at lr 4e-4 for 258M parameters and 2e-4 for 912M, β2 0.95 and a batch of 1024. The MuP version of Muon scales each update by √(dout/din), so its learning rate should carry over across widths, and Su (2025) converts an Adam rate to it by multiplying by 0.2√d. That gives 2.2e-3 from MiniT2I's 258M model and 1.3e-3 from its 912M model. We therefore train d9 and d12 on Full with Muon at 0.85e-3, 1.7e-3 and 3.4e-3, each to 3.6e18 FLOPs with a batch of 1024. The embedders, the output layer and the norms keep Adam at MiniT2I's rate for their size, and warmup and EMA follow images rather than steps: 1000 steps and 0.9996. If both depths prefer the same rate, every depth of the next ladder uses it.

之后的 ladder 改用 Muon(负责人,2026-11-07)。我们借用 MiniT2I(一个极简的像素空间文生图 JiT)的设置:2.58 亿参数时 Adam 的 lr 是 4e-4,9.12 亿参数时是 2e-4,β2 0.95,batch 1024。MuP 版 Muon 把每次更新乘以 √(dout/din),所以它的学习率应该能在宽度之间迁移;苏剑林(2025)给出的换算是把 Adam 的学习率乘以 0.2√d。由 MiniT2I 的 2.58 亿参数模型得到 2.2e-3,由 9.12 亿参数模型得到 1.3e-3。所以我们在 Full 上用 Muon 训练 d9 和 d12,学习率取 0.85e-3、1.7e-3 和 3.4e-3,各训练到 3.6e18 FLOPs,batch 1024。embedding、输出层和 norm 仍用 Adam,学习率取 MiniT2I 在对应大小上的值;预热和 EMA 按图像数而不是步数来定:1000 步和 0.9996。如果两种深度的最优学习率相同,下一个 ladder 的所有深度都用它。

What the EMA does. At a constant learning rate the weights keep moving around the optimum; the EMA averages the recent part of that path, which works like a learning-rate cooldown without changing training (averaging and step-size decay are interchangeable in the convex theory: Su, 2026; Defazio et al., 2024). That is its use for a ladder: one constant-rate run gives a cooled-looking model at every checkpoint, so one run serves every budget. Weight decay is not its equivalent: it makes the weights themselves an average of past updates and sets how fast old data are forgotten (Su, 2025), but it does not remove the noise between steps; ours is 0. The EMA's window is fixed in steps (0.9996: about 2,500), so it fits one run length: in short runs it still holds the initial weights (figure 10), and in long runs it improves the held-out loss by only 0.3% to 0.8%. Whether it improves FD is measured in figure 11. The language-model alternative is a cooldown to zero at each budget, read from the raw weights (Hägele et al., 2024); post-hoc EMA picks the window after training (Karras et al., 2024).

EMA 做什么。学习率不变时,权重在最优点附近一直移动;EMA 把这条轨迹最近的一段平均掉,作用相当于学习率冷却,但不改变训练(在凸优化理论里,权重平均和步长衰减可以互换:苏剑林,2026;Defazio 等,2024)。这就是它对 ladder 的用处:一条常数学习率的运行,每个 checkpoint 都像冷却过一样,所以一条运行能服务所有预算。weight decay 不是它的等价物:weight decay 让权重本身成为过去更新的平均,决定旧数据忘得多快(苏剑林,2025),但不去掉步与步之间的噪声;我们的 weight decay 是 0。EMA 的窗口按步数固定(0.9996 约 2500 步),所以只适合一种运行长度:短运行里它还含着初始权重(图 10),长运行里它只让留出损失好 0.3% 到 0.8%。它能否改善 FD,见图 11。语言模型的替代做法是在每个预算处冷却到 0,读原始权重(Hägele 等,2024);post-hoc EMA 则在训练后再选窗口(Karras 等,2024)。

Status (2026-11-07 11:00): the conversion lands within a factor of two or three of the best rate, and the best rate falls as runs get longer, but slowly. In short runs the largest rate tried wins (figure 8); at the ladder's own lengths (figure 9), 6.8e-3 beats 3.4e-3 by 5.9% at d14 (22.4k steps), by 3.1% at d12 (40.2k) and ties at d9 (133.6k), where 1.7e-3 is 2.4% worse. The 1/√T rule of averaged SGD (Su, 2026), which language models follow under muP (Bjorck et al., 2025), fitted to 16.7k and 33.4k steps, predicted 1.8e-3 at 133.6k; the data put the best rate between 3.4e-3 and 6.8e-3 there. d9 to d12 keep 3.4e-3 (their later segments run). d14 runs its ladder at 6.8e-3 (released 13:40), which its own runs prefer at 1.4e19 FLOPs in FD (705.2 against 749.4) and in held-out loss. d16 and d18 run at 6.8e-3 too (released 15:3x): d18's raw weights tie in FD at 1.4e19 FLOPs (1102.5 against 1101.9 at 3.4e-3) and its held-out loss is 0.36% lower at 6.8e-3; d16 lies between two depths that both prefer it (figure 9).

状态(2026-11-07 11:00):换算得到的学习率与最优值相差两到三倍;最优学习率随运行变长而下降,但下降得慢。短运行里,试过的最大学习率最好(图 8);在 ladder 自己的长度上(图 9),6.8e-3 比 3.4e-3 好:d14(2.24 万步)好 5.9%,d12(4.02 万步)好 3.1%,d9(13.36 万步)持平,而 1.7e-3 在那里差 2.4%。权重平均 SGD 的 1/√T 规律(苏剑林,2026),语言模型在 muP 下也遵循它(Bjorck 等,2025),用 1.67 万和 3.34 万步拟合后,在 13.36 万步预测 1.8e-3;实测的最优值在 3.4e-3 和 6.8e-3 之间。d9 到 d12 继续用 3.4e-3(后续段在跑)。d14 的 ladder 用 6.8e-3(13:40 放行),因为它自己的运行在 1.4e19 FLOPs 时 FD(705.2 对 749.4)和留出损失都更偏向 6.8e-3。d16 和 d18 也用 6.8e-3(15:3x 放行):d18 原始权重的 FD 在 1.4e19 FLOPs 时持平(1102.5 对 3.4e-3 的 1101.9),留出损失在 6.8e-3 低 0.36%;d16 夹在两个都偏向 6.8e-3 的深度之间(图 9)。

Running运行中At a fixed training compute, which model size gives the best samples, and how does PixelGen scale along that optimum?在固定的训练算力下,多大的模型样本最好?PixelGen 沿这个最优点怎样随算力变化?

We train five depths of the official PixelGen, from 109M to 665M parameters, each to the compute of the reference run; captions are grouped by length, and their padding is masked instead of filled to 300 tokens.

我们训练 5 种深度的官方 PixelGen,参数从 1.09 亿到 6.65 亿,每个都训练到参考训练的算力;caption 按长度分组,补齐的位置被屏蔽,不再补到 300 个 token。

Grouped captions moved the bottleneck, so we profiled this path again before the sweep. Each GPU now has its own caption length: the mean is 51 tokens, and the longest of the 8 GPUs averages 131. The frozen text encoder runs inside the synchronous step, so every step waits for the GPU with the longest captions, about 26 ms at every model size. We compute the encoder's outputs once (1.66 TiB, 18 minutes on 8 H100s) and read them in the data workers. Real tokens keep their values up to bf16 rounding, and the denoiser's masks keep padded tokens out of every attention. The median step falls from 53.7 to 39.3 ms at d9, from 85.2 to 57.5 ms at d12 and from 121.1 to 92.7 ms at d14.

caption 分组后瓶颈变了,所以我们在扫描之前重新分析了这条路径。现在每张 GPU 有自己的 caption 长度:平均 51 个 token,8 张 GPU 中最长的平均 131 个。冻结的文本编码器在同步的一步里运行,所以每一步都要等 caption 最长的那张 GPU,无论模型多大都约 26 ms。我们把编码器的输出算一次(1.66 TiB,8 张 H100 用 18 分钟),由数据 worker 读取。真实 token 的值只差 bf16 舍入,去噪网络的 mask 让补齐的 token 不进入任何注意力。一步的中位数在 d9 时从 53.7 ms 降到 39.3 ms,在 d12 时从 85.2 ms 降到 57.5 ms,在 d14 时从 121.1 ms 降到 92.7 ms。

A second bottleneck appeared only after step 928, later than any short test had run. Each data worker decoded and cropped 1024 images at once for its sorting window, about 6 s of CPU, and all workers started together, so every 1024 steps 256 workers competed for 96 CPUs and the step waited up to 6 s. Sorting needs only the text lengths, so images now decode when their batch is requested. Over 3400 steps at d9, a step takes 42.5 ms instead of 53.8 ms. The median hid this: it was 36.8 ms before the change and is 39.3 ms now. At that depth the main thread spends most of its CPU time in the Python interpreter and malloc and 11% in the CUDA driver. Launching kernels from C++ takes the median from 39.3 to 32.6 ms, with the same math up to bf16 rounding.

第二个瓶颈要到第 928 步之后才出现,比之前任何短测试都晚。每个数据 worker 为排序窗口一次解码并裁剪 1024 张图,约 6 s CPU,而所有 worker 同时开始,所以每 1024 步就有 256 个 worker 争抢 96 个 CPU,一步最多要等 6 s。排序只需要文本长度,所以现在图像在 batch 被请求时才解码。d9 跑 3400 步,每步从 53.8 ms 降到 42.5 ms。中位数掩盖了这一点:改动前是 36.8 ms,现在是 39.3 ms。在这个深度上,主线程的 CPU 时间大多花在 Python 解释器和 malloc 上,只有 11% 在 CUDA 驱动里。改由 C++ 下发 kernel 后,中位数从 39.3 ms 降到 32.6 ms,数学只差 bf16 舍入。

We then tested host settings one at a time at d9, on one node and over the same steps, without checkpoint saves. With the C++ launcher alone a step takes 35.9 ms on average. Binding each GPU's main process and data workers to that GPU's CPU socket gives 34.4 ms, and DDP gradient buckets of 1000 MiB instead of 25 MiB give 32.3 ms. Freezing the garbage collector after warm-up removes stalls of about 0.5 s and leaves the mean at 35.7 ms; tcmalloc lowers only the median, from 32.4 to 31.1 ms. Socket binding, the freeze, tcmalloc and less logging together give 31.5 ms, and 30.1 ms with buckets of 100 MiB. At d14, buckets of 1000 MiB take the step from 92.7 to 88.4 ms, while buckets of 100 MiB give 95.2 ms, with 4 stalls that add up to 4.6 s in 600 steps. The ladder therefore uses all of these settings with buckets of 1000 MiB.

接着我们逐项测试主机设置:d9,同一节点,同样的步,不含 checkpoint 保存。只用 C++ 下发时,每步平均 35.9 ms。把每张 GPU 的主进程和数据 worker 绑到它所在的 CPU socket 后是 34.4 ms;把 DDP 梯度桶从 25 MiB 加大到 1000 MiB 后是 32.3 ms。warm-up 后冻结垃圾回收,去掉了约 0.5 s 的停顿,平均仍是 35.7 ms;tcmalloc 只降低中位数,从 32.4 ms 到 31.1 ms。socket 绑定、冻结、tcmalloc 和减少日志合起来是 31.5 ms,再加 100 MiB 的桶是 30.1 ms。在 d14 上,1000 MiB 的桶把每步从 92.7 ms 降到 88.4 ms,而 100 MiB 的桶是 95.2 ms,600 步里有 4 次停顿,共 4.6 s。所以 ladder 使用以上全部设置,桶取 1000 MiB。

A test at the production settings then showed what is left. At d9 a step takes 29.8 ms on average and 26.8 ms at the median over 5894 steps; at d14 it takes 88.1 ms and 88.8 ms. The gap between mean and median at d9 does not shrink over the run, and the data workers use 77 of the 96 CPUs. With real batches kept in memory, so that no data worker, pin thread or shared memory runs, the mean at d9 falls to 25.1 ms, which bounds what data-path work can give at 16%. Giving each main and autograd thread pair its own CPU takes their wait for a CPU from about 8% of the time to 0.4% and the 90th percentile from 41.9 to 32.9 ms, but 15 steps then stall for over 0.3 s, the mean does not improve, and we do not use it. A trace corrects an earlier statement on this page. We wrote that the step at this depth is bound by the host, from a table whose host column adds up to the step time by construction. In the traced steps the GPU is busy for 16 to 21 ms of a 21 to 23 ms step on 1070 kernels, and the median kernel waits about 2 ms in the queue, so the GPU binds those steps. Aggressive fusion and one graph per direction leave the number of kernels and the mean step time unchanged. GEMM autotuning did not finish compiling within 25 minutes, so it has no step time.

随后我们在生产设置下做了一次测试,看还剩下什么。d9 跑 5894 步,每步平均 29.8 ms,中位数 26.8 ms;d14 平均 88.1 ms,中位数 88.8 ms。d9 的均值和中位数之差在整个运行中没有缩小,数据 worker 占用 96 个 CPU 中的 77 个。把真实的 batch 存在内存里,不运行数据 worker、pin 线程和共享内存,d9 的均值降到 25.1 ms,所以数据路径的改进最多带来 16%。让每对主线程和 autograd 线程独占一个 CPU,它们等 CPU 的时间从约 8% 降到 0.4%,p90 从 41.9 ms 降到 32.9 ms,但有 15 步停顿超过 0.3 s,均值没有改善,所以我们不采用。trace 更正了本页之前的一句话。我们曾写这个深度的一步受主机限制,依据是一张表,而表里的主机列按构造就等于步时。在 trace 的这几步里,一步 21 到 23 ms,GPU 忙 16 到 21 ms,共 1070 个 kernel,kernel 排队时间的中位数约 2 ms,所以这几步受 GPU 限制。aggressive fusion 和每个方向一张图都没有减少 kernel 数,也没有改变平均步时。GEMM 自动调优 25 分钟内没有编译完,所以没有步时。

Two more host settings leave the mean unchanged, and the ladder does not use them. With the data workers under SCHED_IDLE, a main or autograd thread takes a CPU from a worker at once. At d9 this lowers the 99th percentile from about 74 to 70 ms and raises the median by about 1 ms, and the mean stays between 29.3 and 29.5 ms; at d14 the mean stays at 88.3 to 88.4 ms. Sending the stop signal every 200 steps instead of every 50 removes the slow step it caused, and the mean does not change. Such a slow step is not a cost: at d14 the step with the sync takes 155 ms, the next takes 21 ms, and the others take 88 ms. A sync moves the wait for the GPU from one step to the next, so only the mean over many steps shows a gain.

另外两项主机设置没有改变均值,所以 ladder 不使用。把数据 worker 设为 SCHED_IDLE 后,主线程或 autograd 线程可以立刻从 worker 手里拿到 CPU。在 d9 上,p99 从约 74 ms 降到 70 ms,中位数升高约 1 ms,均值仍在 29.3 到 29.5 ms 之间;在 d14 上,均值仍是 88.3 到 88.4 ms。把停止信号从每 50 步发一次改成每 200 步发一次,它造成的慢步消失了,均值不变。这种慢步并不增加总时间:在 d14 上,带同步的一步 155 ms,下一步 21 ms,其他步 88 ms。同步只是把等 GPU 的时间从一步移到下一步,所以只有多步的均值才能说明有没有提速。

The official recipe seeds all GPUs alike, so a batch of 256 images has only 32 different pairs of time and noise. We trained d9 twice to an eighth of the compute with the same shard order, once with the official seeding and once with one seed per GPU. FD-DINOv2 is 2099 and 2144 at a sixteenth of the compute, and 1504 and 1451 at an eighth. The sign of the difference changes and one pair gives no noise estimate, so this test shows no clear gain, and the ladder keeps the official seeding.

官方配方让所有 GPU 使用相同的种子,所以 256 张图的一个 batch 只有 32 组不同的时间和噪声。我们用相同的 shard 顺序把 d9 训练了两次,都到八分之一的算力:一次用官方种子,一次每张 GPU 一个种子。FD-DINOv2 在十六分之一算力处是 2099 和 2144,在八分之一算力处是 1504 和 1451。差值的符号变了,而且只有一对运行,无法估计噪声,所以这次测试没有显示明确的提升,ladder 继续使用官方种子。

Pinning fails for a simple reason: the node runs out of CPUs. We gave each main and autograd thread its own CPU and put the data workers under SCHED_IDLE. At d9 the median falls from 26.3 to 24.8 ms and the 90th percentile from 41.5 to 30.5 ms, but the mean rises from 29.3 to 30.1 ms, with 9 steps over 0.3 s. The workers use 8.97 ms of CPU per image. A step of 24.8 ms would need 93 CPUs for them and about 10 for the main, pin and autograd threads, and the node has 96. So the workers fall behind, the queue of ready batches runs out, and a rank waits. The 96 CPUs bound the step at about 24 to 27 ms at this depth. At d14 a step takes 88 ms, far from this limit, and the mean stays at 88.4 to 88.7 ms.

线程绑核失败的原因很简单:节点的 CPU 不够。我们让每个主线程和 autograd 线程独占一个 CPU,并把数据 worker 设为 SCHED_IDLE。在 d9 上,中位数从 26.3 ms 降到 24.8 ms,p90 从 41.5 ms 降到 30.5 ms,但均值从 29.3 ms 升到 30.1 ms,并有 9 步超过 0.3 s。每张图要用 8.97 ms 的 worker CPU。一步 24.8 ms 需要 93 个 CPU 给 worker,还要约 10 个给主线程、pin 线程和 autograd 线程,而节点只有 96 个。所以 worker 跟不上,就绪 batch 的队列会用完,某个 rank 就要等待。这 96 个 CPU 把这个深度限制在每步约 24 到 27 ms。d14 每步 88 ms,离这个限制很远,均值保持在 88.4 到 88.7 ms。

Less CPU per image does lower the mean. The official crop resizes the whole image and then cuts 256 by 256. A crop that resizes only the region it keeps takes 1.9 ms instead of 3.3 ms per image, with the same random draws. It is not bit-identical: 0.035% of the channel values differ, by at most 2 of 255. At d9 the mean falls from 29.5 to 26.7 ms, 9.3% lower, with no stall over 0.3 s, and at d14 it stays at 88.3 to 88.5 ms. Pinning on top gives 26.4 ms, under the 3% bar we set before the run. The ladder uses this crop and does not pin.

减少每张图的 CPU 确实能降低均值。官方裁剪先 resize 整张图,再切出 256×256。只 resize 保留区域的裁剪,每张图从 3.3 ms 降到 1.9 ms,随机抽样序列不变。它不是逐位相同的:0.035% 的通道值不同,最大差 2/255。在 d9 上,均值从 29.5 ms 降到 26.7 ms,低 9.3%,没有超过 0.3 s 的停顿;在 d14 上,均值保持在 88.3 到 88.5 ms。在此基础上再绑核是 26.4 ms,没有达到运行前写定的 3% 门槛。ladder 使用这个裁剪,不绑核。

All five depths reached 1.4e19 FLOPs. At 1.4e19 FLOPs the lowest FD-DINOv2 is 826.5, at d11 with 252M parameters and 60 image tokens per parameter; d12 gives 831.5. A parabola in log N puts the best size at 259M, at 58 tokens per parameter, and 51 and 55 at 7.1e18 and 1.1e19 FLOPs. At 3.6e18 FLOPs the smallest depth is best, so the sweep does not bracket that budget. From 7.1e18 to 1.4e19 FLOPs the best size grows as compute to the power 0.42, and the lowest FD falls as compute to the power −0.26. Every run draws from the same 10.1M images of GPIC Lite, 2.6B unique image tokens, so these fits hold for that fixed set: more compute here means more passes over the same images, not more images. Lite is small for this optimum: at 1.4e19 FLOPs the best depth sees each image 5.8 times and d9 sees it 13.6 times, so the next rungs train on the full set of 101.1M images.

五种深度都训练到了 1.4e19 FLOPs。1.4e19 FLOPs 时最低的 FD-DINOv2 是 826.5,在 d11:2.52 亿参数,每参数 60 个图像 token;d12 是 831.5。对 log N 拟合抛物线,最优大小是 2.59 亿参数,每参数 58 个 token;在 7.1e18 和 1.1e19 FLOPs 处是 51 和 55。在 3.6e18 FLOPs 处,最小的深度最好,所以这次扫描没有把这一档的最优点包在中间。从 7.1e18 到 1.4e19 FLOPs,最优大小按算力的 0.42 次方增长,最低的 FD 按算力的 −0.26 次方下降。每次运行都从 GPIC Lite 的同一批 1010 万张图里取数据,即 26 亿个唯一图像 token,所以这些拟合只对这个固定的数据集成立:这里算力更多,意味着把同一批图多看几轮,而不是看更多的图。对这个最优点来说 Lite 偏小:1.4e19 FLOPs 时最优深度把每张图看了 5.8 次,d9 看了 13.6 次,所以下一档改在 1.011 亿张图的完整数据集上训练。

The next rungs train on the full GPIC set: 101.1M images and 25.9B image tokens, ten times Lite. Seven depths, from 109M to 1.68B parameters, train to 1.4e19, 2.9e19, 5.7e19 or 1.1e20 FLOPs: all seven reach 1.4e19 FLOPs and four reach 1.1e20 FLOPs. They bracket the size that Lite's fit predicts at each budget, 620M at 1.1e20 FLOPs, and at 1.1e20 FLOPs that size trains for about two epochs. A run that stops resumes in the shard order of its first launch and skips every shard it started before its checkpoint, so it trains no image twice in one epoch. The recipe and the evaluation are the ladder's.

下一档在完整的 GPIC 数据集上训练:1.011 亿张图,259 亿个图像 token,是 Lite 的 10 倍。7 种深度,从 1.09 亿到 16.8 亿参数,分别训练到 1.4e19、2.9e19、5.7e19 或 1.1e20 FLOPs:7 种深度都到 1.4e19 FLOPs,4 种到 1.1e20 FLOPs。它们把 Lite 的拟合在每个算力档预测的大小包在中间,1.1e20 FLOPs 时是 6.2 亿参数,这个大小在 1.1e20 FLOPs 训练约两轮。中断的运行按第一次启动时的 shard 顺序续跑,并跳过检查点之前开始过的每个 shard,所以一轮里没有一张图被训练两次。配方和评测都和 ladder 相同。

In the terms of language-model scaling studies, the Full ladder forms an iso-FLOP grid: seven depths, from d9 (110M parameters) to d18 (1.68B), at six budgets from 3.6e18 to 1.1e20 FLOPs. As in Marin's sweeps, the grid is triangular: every depth runs the three smallest budgets, and only the depths from d12 up run the largest, where they span 11 to 224 tokens per parameter (a token is one 16×16 patch, 256 per image). Unlike those sweeps, each depth trains once at a constant learning rate, and each budget reads that run's EMA checkpoint, without a cooldown. Every cell sees GPIC Full's 25.9B unique tokens at most about three times. The Muon ladder on GPIC Lite was dropped on 11-07 (owner: the study stays on GPIC Full); the cost of repeated images is measured by repetition arms on Full's first 80 and first 8 shards (1.01M and 101K images) at d9 to d16. So the questions come in this order: first, how many passes over the same images cost nothing; then, how many tokens per parameter are compute-optimal on data that does not repeat. The AdamW ladder on Lite gave 51 to 58, but there the fitted optimum had already seen its images 3.8 to 5.8 times.

用语言模型 scaling 研究的说法,Full ladder 组成一张 iso-FLOP 网格:7 种深度,从 d9(1.1 亿参数)到 d18(16.8 亿),6 个算力预算,从 3.6e18 到 1.1e20 FLOPs。和 Marin 的扫描一样,网格是三角形的:每种深度都跑最小的三个预算,只有 d12 以上跑最大的预算,那里每个参数分到 11 到 224 个 token(一个 token 是一个 16×16 的图像块,每张图 256 个)。和那些扫描不同,每种深度只用恒定学习率训练一次,每个预算读这次运行在该处的 EMA 检查点,不做 cooldown。每个格子最多把 GPIC Full 的 259 亿个唯一 token 看约三遍。GPIC Lite 上的 Muon ladder 在 11-07 取消了(主人:研究只在 GPIC Full 上做);重复图像的代价由 Full 前 80 个和前 8 个 shard 上的重复数据组来测(101 万和 10.1 万张图),深度从 d9 到 d16。所以问题按这个顺序:先问同一批图看多少遍不吃亏,再问在不重复的数据上,每个参数配多少 token 最省算力。Lite 上的 AdamW ladder 给出 51 到 58,但那里拟合出的最优点已经把图看了 3.8 到 5.8 遍。

The two depths that the Lite ladder never ran fit on one H100 with room to spare. In a smoke test, d16 takes 136.7 ms per step and reserves 44.9 GiB, and d18 takes 193.4 ms and reserves 61.2 GiB. Model FLOPs utilization, the share of the H100's bf16 peak that the training FLOPs use, rises with depth, and the widest runs take most of the full ladder's GPU-hours, so we raised it depth by depth without changing what the training computes. Each change sits behind a switch. The changes that alter rounding were checked against the plain code by the loss over 1024 steps on the same batches, where they stay within the spread of repeated runs of the plain code; the others give the same bits or do not touch the training math. Six changes held: FlashAttention-3 for the masked attention; FSDP2, which spreads the weights, AdamW and the EMA over the 8 GPUs and pays from d14 up, and from d11 up once several blocks share one unit and AdamW and the EMA work on the local shards; the bicubic resize on the GPU, equal to Pillow bit for bit; uint8 crops; checkpoint writes in a separate process, which cut a save at d18 from 57.8 s to 21.9 s; and Inductor's tuning of the element-wise kernels, a further 1.9% at d14. Together they raise MFU from 12.8% to 13.8% at d9, where the host and the data path bound the step, and from 28.1% to 36.9% at d18; weighted by the full ladder's GPU-hours, from 22.9% to 28.4%. d14 to d18 train with FlashAttention-3, FSDP2, the GPU resize, uint8 crops and the separate writer from their first step. d9 to d12 had started on the plain code, and a run keeps one code from its first step to its last (a checkpoint saved without FSDP2 does not even resume under it), so they keep the plain code; the ladder as it runs is at 26.2%. Two Triton kernels came next. One fuses the residual add, RMSNorm and the adaLN modulation (K), and the other fuses the q and k RMSNorm, RoPE and the k and v concatenation (K2), each with its own backward. They change only the rounding: over the last 500 of 2048 steps on the same batches, the loss stays within the spread of three repeated runs at d12 to d16 and at its edge at d18 (0.67%, against a spread of 0.60% to 0.65%). From d12 to d18 they shorten the step by 2.7% to 4.5%, and MFU at d18 rises to 38.4%; weighted by the full ladder's GPU-hours, it rises to 29.5%. d9 to d11 have not been measured with them yet. The full ladder keeps the code it started with, so K and K2 serve later runs.

Lite ladder 没跑过的两种深度在一张 H100 上都放得下,还有余量。冒烟测试里,d16 每步 136.7 ms,占用 44.9 GiB;d18 每步 193.4 ms,占用 61.2 GiB。MFU(训练 FLOPs 占 H100 bf16 峰值的比例)随深度上升,而最宽的几次运行占完整 ladder 的大部分 GPU 小时,所以我们在不改变训练计算内容的前提下,按深度逐个提高它。每项改动都有开关。改变舍入的改动都和原来的代码在同样的批上比较了 1024 步的损失,差别都在原来的代码重复运行的范围以内;其他改动给出相同的比特,或者不碰训练的计算。六项改动有效:带掩码的注意力用 FlashAttention-3;FSDP2 把权重、AdamW 和 EMA 分到 8 张 GPU 上,从 d14 起有收益,几个块共用一个单元、AdamW 和 EMA 在本地分片上计算以后,从 d11 起就有收益;双三次缩放放到 GPU 上,和 Pillow 逐位相同;裁剪用 uint8;检查点由单独的进程写,d18 的一次保存从 57.8 秒降到 21.9 秒;Inductor 调优逐元素的核,在 d14 再快 1.9%。合起来,d9 的 MFU 从 12.8% 升到 13.8%(这时主机和数据通路限制了步长),d18 从 28.1% 升到 36.9%;按完整 ladder 的 GPU 小时加权,从 22.9% 升到 28.4%。d14 到 d18 从第一步起就用 FlashAttention-3、FSDP2、GPU 缩放、uint8 裁剪和单独的写入进程。d9 到 d12 已经用原来的代码开始训练,而一次运行从第一步到最后一步只用一份代码(不用 FSDP2 存的检查点在 FSDP2 下甚至不能续训),所以它们保持原来的代码;按现在实际运行的方式,ladder 是 26.2%。之后又加了两个 Triton 核:一个把残差相加、RMSNorm 和 adaLN 调制合成一个(K),另一个把 q 和 k 的 RMSNorm、RoPE 以及 k 和 v 的拼接合成一个(K2),各有自己的反向。它们只改变舍入:在同样的批上跑 2048 步,最后 500 步的损失在 d12 到 d16 落在三次重复运行的范围以内,在 d18 落在范围边上(0.67%,范围是 0.60% 到 0.65%)。从 d12 到 d18,它们让每步缩短 2.7% 到 4.5%,d18 的 MFU 升到 38.4%;按完整 ladder 的 GPU 小时加权,升到 29.5%。d9 到 d11 还没有用它们测过。完整 ladder 保持开始时的代码,所以 K 和 K2 留给以后的运行。

Batch 1024 per depth (MFU session, 2026-11-07). The new ladders train with Muon at a batch of 1024 on 8 GPUs, and every depth keeps 128 images per GPU without accumulation where it fits: DDP at d9 to d12, FSDP2 with 7 blocks per unit at d14, FSDP2 at d16 (70.5 GiB of 80), and 64 × 2 at d18, which would need about 94 GiB at 128. A step takes 76.5, 83.6, 103.9, 128.9, 211.2, 324.0 and 476.7 ms from d9 to d18, so MFU runs from 17.6% to 42.2% and the ladder, weighted by its GPU-hours, from 29.5% (batch 256, AdamW) to 35.7%. Against 32 images per GPU accumulated 4 times, 128 × 1 is 13.5% faster at d9 and 11.1% at d14; at d14 FSDP2 and DDP give the same losses on the same data, and FSDP2 is 1.1% faster with 8 GiB less. The shared caption bucket (all GPUs use one caption-length bucket in a step, so none waits for a longer caption) saves 2.8% to 4.4% at 128 × 1 and, at 32 × 4, costs 15% at d9 and nothing at d14, where a GPU synchronizes only after its fourth micro-batch (figure 26). Its pools of waiting batches grow like a random walk, and a start sends the rare long-caption buckets late and then in a burst (figure 32). Packing the captions end to end, so that a batch mixes every length with no padding (w1846), is 2.9% faster than a bucket per GPU at d9 and 5.8% and 3.5% slower at d12 and d14 (at d14 against DDP), all of it GPU time: its q/k preparation runs unfused and its attention copies the keys in every block, so it waits for a fused kernel. With that kernel (w1878, after a fix: its first version left the padded caption rows uninitialised and trained to NaN) packed captions take 76.3, 78.0, 106.2, 134.0, 219.4 and 336.2 ms at d9 to d16, and 488.6 ms at d18 (64 × 2): about as fast as a bucket per GPU, 0.8% to 3.8% slower than one bucket for all GPUs at six depths and 6.7% faster at d10. The speeds are close, so the FD of a run with packed captions decided: at d9 it scores 974.8, inside the shared bucket's spread between seeds (966.6 to 1016.6), with the same held-out loss (figure 13). Packed captions are closed: they do not hurt FD, but they are 1% to 4% slower than the shared bucket, so the ladder keeps the shared bucket. A crash after 139 minutes (w1204) came from torch 2.7.1's C++ launcher, which stored None without a reference on every compiled call; a patched template keeps all 1000 references in a 1000-call test (figure 33). A cold start under DDP compiles the whole model in 240 to 282 s, and FSDP2 one graph per block class in about 30 s (figure 34). Two speed jobs measured batch 256 by mistake (an overlay passed as an environment variable, which a queued job does not see), and the multi-node GPU-count jobs were withdrawn because they held quota while waiting.

每种深度的 batch 1024(MFU 会话,2026-11-07)。新 ladder 在 8 张 GPU 上用 Muon、batch 1024 训练;放得下的深度都用每卡 128 张图、不累积:d9 到 d12 用 DDP,d14 用每单元 7 个块的 FSDP2,d16 用 FSDP2(80 GiB 用了 70.5 GiB),d18 用 64 × 2,因为 128 张需要约 94 GiB。从 d9 到 d18,每步 76.5、83.6、103.9、128.9、211.2、324.0 和 476.7 ms,MFU 从 17.6% 到 42.2%;按 GPU 小时加权,ladder 的 MFU 从 29.5%(batch 256、AdamW)升到 35.7%。和每卡 32 张图、累积 4 次相比,128 × 1 在 d9 快 13.5%,在 d14 快 11.1%;d14 上,FSDP2 和 DDP 在同样的数据上损失相同,FSDP2 快 1.1%,少用 8 GiB。共享 caption 档(一步里所有 GPU 用同一个 caption 长度档,谁也不用等更长的 caption)在 128 × 1 时省 2.8% 到 4.4%;在 32 × 4 时,d9 反而多花 15%,d14 不变,因为那时每张 GPU 第四个 micro-batch 之后才同步(图 26)。它的等待批次池像随机游走一样增长,而且每次启动时,少见的长 caption 档先来得晚,然后集中到来(图 32)。把 caption 首尾相接打包、让一个 batch 不补齐地混合所有长度(w1846),在 d9 比每卡一个档快 2.9%,在 d12 和 d14 慢 5.8% 和 3.5%(d14 是和 DDP 比),多出的都是 GPU 时间:它的 q/k 预处理没有融合,注意力在每个块里还要复制一次键,所以要等融合内核。用上这个内核后(w1878,修过一次:第一版没有初始化补齐的 caption 行,训练出了 NaN),打包 caption 在 d9 到 d16 每步是 76.3、78.0、106.2、134.0、219.4 和 336.2 ms,d18(64 × 2)是 488.6 ms:和每卡一个档差不多快,在六个深度上比共享档慢 0.8% 到 3.8%,在 d10 快 6.7%。速度很接近,所以由打包 caption 运行的 FD 来决定:d9 上它是 974.8,落在共享档不同种子的范围(966.6 到 1016.6)以内,留出损失也相同(图 13)。打包 caption 到此结束:它不损害 FD,但比共享档慢 1% 到 4%,所以 ladder 继续用共享档。一次 139 分钟后的崩溃(w1204)来自 torch 2.7.1 的 C++ 启动器:它每次编译调用都存了 None 却不持有引用;修补后的模板在 1000 次调用的测试里保住了全部 1000 个引用(图 33)。DDP 冷启动时把整个模型编译一遍要 240 到 282 秒,FSDP2 每类块编一个图,约 30 秒(图 34)。两个测速作业误测了 batch 256(配置是用环境变量传的,排队的作业看不到),多节点 GPU 数作业因为排队时占着配额而撤回。

Running运行中Does a model that draws a sample of the posterior at each step beat the point model at the same training compute?每一步输出后验的一个样本的模型,在相同的训练算力下能胜过点模型吗?

A point model outputs the mean of the clean image given the noisy one. This model outputs one sample of the clean image given the noisy one, so one network call can move any distance along the path. Both train on the same denoiser FLOPs. The main comparison stays at 50 steps, and we also report the FD at fewer calls.

点模型输出的是:给定带噪图像时干净图像的均值。这个模型输出的是:给定带噪图像时干净图像的一个样本,所以一次网络调用可以沿路径走任意远。两者用相同的去噪网络训练 FLOPs。主要比较仍然是 50 步,同时报告更少调用次数下的 FD。

Answered已有结论Does a code of the image, fixed along the sampling path, lower the FD at the same training compute?一个固定在采样路径上的图像编码,能在相同的训练算力下降低 FD 吗?

A small encoder turns each training image into a code that carries at most a fixed amount of information, and the network gives one mean for each code. A tiny flow learns the distribution of the codes given the caption. To sample, we draw one code and keep it along the whole path of 50 Euler steps. The encoder and the flow add 1% to the training FLOPs, which the code run pays with 1% fewer steps, and the flow adds 0.07% to sampling. So nearly all the compute goes to the part that the code leaves open.

一个小编码器把每张训练图像变成一个信息量有固定上限的编码,网络对每个编码给出一个均值。一个小 flow 学习给定 caption 时编码的分布。采样时抽一个编码,并在 50 步 Euler 的整条路径上保持不变。编码器和 flow 给训练增加 1% 的 FLOPs,这次运行相应少走 1% 的步数;flow 给采样增加 0.07%。所以几乎所有算力都用在编码没有决定的部分。

The code does not pass the rule we set before the runs. With one noise per prompt in both models, at a sixteenth of the compute the FD falls from 1530 to 1394 at 64 nats and to 1372 at 256 nats, 9% and 10% lower. At an eighth it is 1084 for the point model, 1066 at 64 nats and 1104 at 256 nats, within 2%. Two runs that differ only in how the GPUs are seeded differ by 2.1% and 3.5%, and one pair gives no noise estimate. So we state these as single runs, and we do not claim a trend with compute. Precision, recall and coverage are all a little higher at an eighth; coverage rises from 0.248 to 0.273 and 0.279. For the same reason we do not count this as evidence.

这个编码没有通过我们在运行前写定的规则。两个模型都用逐提示词的噪声时,在十六分之一算力处,FD 从 1530 降到 1394(64 nat)和 1372(256 nat),低 9% 和 10%。在八分之一算力处,点模型是 1084,64 nat 是 1066,256 nat 是 1104,差距在 2% 以内。只改 GPU 种子方式的两次运行相差 2.1% 和 3.5%,一对运行无法估计噪声。所以这些都只是单次运行的结果,我们不声称存在随算力变化的趋势。八分之一算力处的 precision、recall 和 coverage 都略高,coverage 从 0.248 升到 0.273 和 0.279。同样的原因,我们不把它算作证据。

A smaller test looks at what the code does. We overfit the model to 256 images and sampled with the code of a known image. The nearest training image of a sample is the code's own image for 1 to 2% of the samples at 16 nats and 12% at 64 nats, where chance is 0.4%. So the code steers the image only weakly. We did not test whether the noisy code still identifies its image. Codes from the encoder and from the flow give samples equally close to the training images, so on this small set the flow is not the limit. We have not tested any of this on the full data.

一个更小的测试观察编码起了什么作用。我们让模型过拟合 256 张图,并用已知图像的编码采样。样本最近的训练图正好是编码来源图的比例,在 16 nat 时是 1% 到 2%,在 64 nat 时是 12%,随机水平是 0.4%。所以编码对画哪张图的影响很弱。我们没有测试带噪的编码还能不能认出来源图。用编码器的编码和用 flow 的编码,样本离训练图一样近,所以在这个小数据集上,限制不在 flow。这些都没有在完整数据上测试。

Answered已有结论Does the official evaluation's single noise tensor change the FD?官方评测所有提示词共用一个噪声,这会改变 FD 吗?

The official evaluation seeds each prompt's noise with its sample index, and with one sample per prompt that index is always 0. So all 50,000 prompts start from one noise tensor, and the noise no longer varies from prompt to prompt. Every FD on this page uses this official protocol. Without training, we evaluate the d9 baseline again with two other shared tensors and with one noise per prompt. The spread among the shared tensors shows how much the tensor itself matters, and the gap to one noise per prompt shows what sharing costs.

官方评测用样本序号作为每个提示词噪声的种子,而每个提示词只有一个样本,所以序号总是 0。50000 个提示词全部从同一个噪声张量出发,噪声不再随提示词变化。本页所有 FD 都使用这个官方协议。我们不做训练,重新评测 d9 的基线:换两个共用张量,以及每个提示词一个噪声。共用张量之间的差异说明张量本身有多重要,和逐提示词噪声的差距说明共用的代价。

It changes the FD by more than any host setting or seed on this page. At an eighth of the compute the FD falls from 1504 with the official tensor to 1084 with one noise per prompt, 28% lower with the same weights. At a sixteenth it falls from 2099 to 1530, 27% lower. Recall rises from 0.0002 to 0.012, and coverage from 0.188 to 0.248. The shared tensor itself matters too: three shared tensors give 1504, 1382 and 1357, a spread of 10%. Two sets of one noise per prompt give 1083.97 and 1083.90, so with this protocol the FD hardly depends on the draw. With the caption fixed, a change of the noise moves the DINOv2 features by 77% of their total variance at an eighth of the compute. One shared tensor still leaves 90 to 96% of the variance, because the noise acts differently for each caption, but it concentrates the variance in fewer directions. In the samples, images for different captions share their composition when they share a tensor. The ladder's queued evaluations still use the official tensor, so its numbers stay comparable with the official baseline.

它对 FD 的影响,比本页任何一项主机设置或种子都大。在八分之一算力处,同样的权重,FD 从官方张量的 1504 降到逐提示词噪声的 1084,低 28%。在十六分之一算力处,从 2099 降到 1530,低 27%。recall 从 0.0002 升到 0.012,coverage 从 0.188 升到 0.248。张量本身也有影响:3 个共用张量给出 1504、1382 和 1357,相差 10%。两组逐提示词噪声给出 1083.97 和 1083.90,所以在这个协议下 FD 几乎不受抽样影响。在八分之一算力处,固定 caption 只换噪声,DINOv2 特征移动的方差占总方差的 77%。共用一个张量仍保留 90% 到 96% 的方差,因为噪声对每个 caption 的作用不同,但方差集中到更少的方向上。从样本图上看,共用张量时,不同 caption 的图构图相同。ladder 排队中的评测仍用官方张量,所以它的数字可以和官方基线比较。

Two other sampler changes do not help on these weights. Landing the last step on the network's output removes the noise that the official clamp leaves, and it raises the FD by 3.9% at an eighth of the compute and 3.7% at a sixteenth. It also changes the contrast and relies on the output at a time the model rarely trains, so we did not isolate the cause. Drawing fresh noise at each step, with the network's output in place of the clean image in the DDPM posterior, gives an FD 4.6% and 30.9% above the landing arm. The network outputs no distribution here, so this does not test a model that does.

另外两项采样器改动在这些权重上没有帮助。让最后一步落在网络输出上,去掉了官方截断留下的噪声,但 FD 在八分之一算力处升高 3.9%,在十六分之一算力处升高 3.7%。这个改动同时改变了对比度,并且依赖模型很少训练的时间点上的输出,所以我们没有隔离原因。每一步抽新的噪声,在 DDPM 后验里用网络输出代替干净图像,FD 比上一项高 4.6% 和 30.9%。这里网络并没有输出分布,所以它不能检验一个真正输出分布的模型。

Testing检验中Does a model that outputs a distribution at each step beat the point model at the same training compute?每一步输出一个分布的模型,在相同的训练算力下能胜过点模型吗?

A language model outputs a distribution over the next token at each step, and draws from it. A point model for images has no such choice: it outputs one velocity, and its path is fixed by its start. We test three ways to give each step a distribution. In autoregression over patches, each patch gets a distribution given the patches already drawn, and a small flow draws from it. In a jump process, each pixel channel outputs a softmax over its values next to the velocity, and sometimes jumps to a draw from it. With an energy score, a small head turns noise into a whole clean image. Each design first has to reproduce 256 training images, which takes minutes, and then trains on the real data at the same compute as the point model. No run in this question has caption dropout, since we sample with the conditional branch only. In a fourth design, each pixel outputs a Gaussian mixture of its value (GMFlow), and a control has one Gaussian and the same loss. We judge it apart at 50 and at 8 sampling steps, since GMFlow reports its gains at 8 steps or fewer.

语言模型每一步输出下一个 token 的分布,再从中抽样。图像的点模型没有这种选择:它只输出一个速度,路径由起点决定。我们检验三种让每一步带有分布的做法。在按 patch 的自回归里,每个 patch 在已抽出的 patch 的条件下有一个分布,由一个小的流抽样。在跳跃过程里,每个像素通道在速度之外输出一个对取值的 softmax,并不时跳到从中抽出的值。在能量分数的做法里,一个小 head 把噪声变成一张完整的干净图。每个设计先要复现 256 张训练图,这只要几分钟,然后在真实数据上用和点模型相同的算力训练。这个问题下的所有运行都没有 caption dropout,因为采样时只用条件分支。第四个设计里,每个像素输出它的取值的高斯混合(GMFlow),另有一个只有一个高斯、损失相同的对照。我们在 50 步和 8 步分开判定,因为 GMFlow 报告的优势在 8 步以内。

Point model点模型

The point model outputs one velocity at each step, so its whole path is fixed by its starting noise.点模型每一步输出一个速度,所以整条路径由起始噪声决定。

Autoregression自回归

Each patch is drawn from its own distribution given the patches already drawn, a few at a time in a random order. With η, a drawn patch can go back and be drawn again.每个 patch 在已抽出的 patch 的条件下,从自己的分布中抽出,按随机顺序每次抽几个。加上 η 后,抽出的 patch 可以撤回再抽。

Jump and velocity跳跃加速度

Each pixel value outputs a velocity and a softmax over its 256 values. At each step it moves with the velocity, and sometimes it jumps to a draw from the softmax.每个像素值输出一个速度和对 256 个取值的 softmax。每一步它沿速度移动,有时跳到从 softmax 抽出的值。

Energy score整图能量分数

After one pass of the network, a small head turns noise into a whole clean image. The loss pulls two samples of each noisy image toward the data and pushes them apart.网络跑一次之后,一个小 head 把噪声变成一张完整的干净图。损失把每张带噪图的两个样本拉向数据,同时把它们推开。

Gaussian mixture高斯混合

Each pixel outputs a mixture of 8 Gaussians over its RGB value, with one spread per image. A step draws a clean value from the mixture and moves part of the way toward it, with fresh noise.每个像素输出它的 RGB 值上 8 个高斯的混合,每张图一个方差。每一步从混合中抽一个干净值,朝它走一部分,再加新的噪声。

None of the three designs clearly beats the point model. On the real data at an eighth of the compute, the point model has an FD of 1090. Autoregression reaches 1709, or 1626 when half of its batches see few known tokens, and 1493 when tokens can also go back and be drawn again during sampling. Its samples look more real than the point model's, with a precision of 0.98 against 0.89, but they cover less of the data, with a coverage of 0.17 against 0.25. The energy score comes closest. On the same Euler sampler it lies 7.5% below the point model at a sixteenth of the compute and 2.5% below at an eighth, which is under the 5% we set before the runs, and this is one seed. On a sampler that lands on the network's output, which costs the point model 1.8% and 4.8%, the gap is 9.4% and 5.7%. The jump process did not reach the threshold on 256 images, because training its loss with the velocity harms the velocity on the shared network.

三个设计都没有明确胜过点模型。在真实数据上,八分之一算力处点模型的 FD 是 1090。自回归是 1709;一半 batch 只看到很少的已知 token 时是 1626;采样时 token 还可以撤回重抽时是 1493。它的样本比点模型更像真实图,precision 是 0.98 对 0.89,但覆盖的数据更少,coverage 是 0.17 对 0.25。能量分数最接近。用同样的 Euler 采样器,它在十六分之一算力处比点模型低 7.5%,在八分之一处低 2.5%,后者没有达到运行前定的 5%,而且只有一个种子。在最后一步落到网络输出上的采样器上,点模型变差 1.8% 和 4.8%,差距是 9.4% 和 5.7%。跳跃过程在 256 张图上没有达到门槛,因为它的损失和速度一起训练时损害了共享网络上的速度。

The small test taught less than we hoped, in two ways. On 256 images the exact posterior is one image from t = 0.02 on, so the first step already chooses the image, and a design that outputs a distribution at each step is hardly asked to do so. A tie there says little. And a change that doubled the number of images the autoregressive model draws on this test moved its coverage on the real data only from 0.173 to 0.178. Turning off caption dropout changed the point model's FD by 0.6%, so it does not explain any of these gaps.

小测试能告诉我们的比预想的少,有两点。在 256 张图上,精确后验从 t = 0.02 起就是一张图,所以第一步就选定了图,每步输出分布的设计几乎没有被问到。在这里打平说明不了多少。另外,一个改动让自回归模型在这个测试上抽到的图数翻倍,在真实数据上 coverage 却只从 0.173 变到 0.178。关掉 caption dropout 让点模型的 FD 变化 0.6%,所以它解释不了这些差距。

For the reason above, the Gaussian mixture skips the small test. It ties the point model at 50 steps and beats it at 8. We judge it by GM-ODE, which follows the mixture's mean with exact sub-steps inside each network call, against the point model's best sampler at the same number of calls. At 50 steps it lies 0.6% below the point model at a sixteenth of the compute and 0.7% above at an eighth. At 8 steps it lies 6.0% and 9.3% below, past the 5% line at both points. The control with one Gaussian already lies 3.8% and 6.1% below there, about two thirds of the gain, and the mixture adds 2.3% and 3.4%, under the 5% line. Most of the control's gain comes from the sub-steps, which use the learned spread to update the estimate of the clean image within one call; with a spread of zero they reduce to the point model's exact step. Drawing a clean value from the mixture at every step (GM-SDE) does worse than following its mean, at 2151 against 1607 at 8 steps and a sixteenth of the compute. These numbers use one noise per prompt. We now evaluate every model again with the official noise, one noise for all prompts, and judge by those numbers; figures 39 and 41 keep the earlier protocol. Next we test whether the lead grows at fewer steps and at larger scale, whether it holds along the ladder, where each design gets its best size at each compute, whether a spread per pixel or more components widen it, and whether the method still works without the paper's transition loss.

因为上面的原因,高斯混合跳过了小测试。它在 50 步时和点模型持平,在 8 步时胜过它。我们用 GM-ODE 判定:它在每次网络调用内部用精确的子步沿混合的均值走;比较的对象是同样调用次数下点模型最好的采样器。50 步时,它在十六分之一算力处比点模型低 0.6%,在八分之一处高 0.7%。8 步时,它低 6.0% 和 9.3%,两个算力点都过了 5% 的线。只有一个高斯的对照在 8 步时已经低 3.8% 和 6.1%,约占这个优势的三分之二;混合自己再多 2.3% 和 3.4%,没有达到 5%。对照的优势主要来自子步:子步在一次调用内部用学到的方差更新对干净图的估计,方差为 0 时就退化成点模型的精确一步。每一步从混合里抽一个干净值(GM-SDE)比沿均值走差:十六分之一算力、8 步时是 2151 对 1607。这些数用的是每个提示词一个噪声。我们现在用官方噪声(所有提示词共用一个噪声)重新评测每个模型,并按这些数判定;图 39 和图 41 保留以前的设置。接下来我们检验这个优势在更少的步数和更大的规模下是否变大,在阶梯上(每个算力下各自取最好的模型大小)是否保持,每个像素一个方差或更多分量能否让它更大,以及去掉论文的转移损失后方法是否仍然有效。

Figure 40 shows what changes inside one network call. A point model outputs one value per pixel, the mean of the clean value, and the sampler moves straight toward it. The mixture outputs 8 candidate values per pixel with their weights, and one spread per image. GM-ODE does not draw from them: inside the call it takes many small steps, and before each one it re-weights the 8 candidates by Bayes' rule for the current position and moves toward their weighted mean, so the path can bend within one call. Its only randomness is the starting noise.

图 40 说明一次网络调用里发生了什么。点模型每个像素输出一个值,也就是干净值的均值,采样器沿直线走向它。混合每个像素输出 8 个候选值和它们的权重,每张图再输出一个深度。GM-ODE 不从中抽样:它在一次调用里走很多小步,每走一步之前,先按当前位置用贝叶斯公式重新给 8 个候选加权,再走向加权平均,所以一次调用里的路径可以拐弯。它唯一的随机性是起始噪声。

Takeaways核心结论

Acknowledgements致谢

The author is pleased to acknowledge that the work reported on in this post was substantially performed using the Princeton Research Computing resources at Princeton University. Princeton Research Computing is a consortium of groups including the Princeton Institute for Computational Science and Engineering (PICSciE) and Research Computing at Princeton University.

本文报告的工作主要使用普林斯顿大学 Princeton Research Computing 的计算资源完成。Princeton Research Computing 是由普林斯顿计算科学与工程研究所(PICSciE)和普林斯顿大学 Research Computing 等团队组成的联合体。

Experiment record实验记录

Citation

@misc{chai2026gpicspeed,
  title        = {Generating Distributions},
  author       = {Chai, Wenhao},
  year         = {2026},
  howpublished = {Blog post},
  url          = {https://wenhaochai.com/exps/gpic-speed.html}
}
Experiments Back to top回到顶部