Pinned implementation and paper LDLM @ e18c42a, not yet public · arXiv:2605.07933v1 · OpenWebText · 1024 · checkpoint, tokenizer and saved statistics not verified · How to read

learned

1,024 calls of the denoiser along a time grid from 1 to 0.05: each call predicts the clean latents and one Euler–Maruyama step moves the latents towards them.

Why

At inference Gaussian noise is drawn and the reverse diffusion is run with the Euler–Maruyama solver to a clean latent prediction, which is decoded without the decoder’s input noise. LDLM paper §4.3

All at once. A continuous model refines all positions gradually and need not commit to a token before sampling is complete: tokens are read out only at the end. LDLM paper §1

Cost. Sampling is cheap for what it repeats: only the denoiser runs at every call, and it has no token embedding matrix and no vocabulary-sized output. The frozen token encoder and the latent encoder are not used at all, and the two decoders, with the vocabulary projection, run once after denoising. LDLM paper Appendix C

f=−12 βt zt−βt sf=-\tfrac12\,\beta_t\,z_t-\beta_t\,s
βt=π 9 τ (1+τ2)1+9 τ2\beta_t=\frac{\pi\,9\,\tau\,(1+\tau^2)}{1+9\,\tau^2}
τ=tan⁡ ⁣(π2min⁡(t, 0.95))\tau=\tan\!\big(\tfrac{\pi}{2}\min(t,\,0.95)\big)
mt′=zt+f (t′−t)m_{t'}=z_t+f\,(t'-t)
All 26 steps
tk=max⁡ ⁣(F−1(1−k/N),  0.05)t_k=\max\!\big(F^{-1}(1-{\htmlClass{vl-stream-k}{k}}/N),\;0.05\big)
F(ui+1)=∑j≤ipj and linear between edgesF(u_{i+1})=\textstyle\sum_{j\le i}p_j\ \text{and linear between edges}
k=0,…,N{\htmlClass{vl-stream-k}{k}}=0,\ldots,N
N=1,024N=1,024
Denoiser:\text{Denoiser:}
x0=[ zt  z^0sc ]Win+binx_0=[\,z_t\;\hat z_0^{\mathrm{sc}}\,]W_{\mathrm{in}}+b_{\mathrm{in}}
et=[cos⁡(t ωj)]j ∥ [sin⁡(t ωj)]je_t=\big[\cos(t\,\omega_j)\big]_{j}\,\Vert\,\big[\sin(t\,\omega_j)\big]_{j}
ωj=10−j/384,  j=0,…,383\omega_j=10^{-j/384},\;j=0,\ldots,383
e↑=etW1+b1e^{\uparrow}=e_tW_{1}+b_{1}
eσ=e↑ σ(e↑)e^{\sigma}=e^{\uparrow}\,\sigma(e^{\uparrow})
e↓=eσW2+b2e^{\downarrow}=e^{\sigma}W_{2}+b_{2}
at=e↓ σ(e↓)a_t=e^{\downarrow}\,\sigma(e^{\downarrow})
mn=[ ba  sa  ga  bm  sm  gm ]=atWn+cnm_n=[\,b_a\;s_a\;g_a\;b_m\;s_m\;g_m\,]=a_tW_{n}+c_{n}
xˉattn=γ1⊙xn−μ(xn)σ2(xn)+ε\bar x_{\mathrm{attn}}=\gamma_{1}\odot\frac{x_n-\mu(x_n)}{\sqrt{\sigma^2(x_n)+\varepsilon}}
ε=10−5\varepsilon=10^{-5}
xattn=xˉattn⊙(1+sa)+bax_{\mathrm{attn}}=\bar x_{\mathrm{attn}}\odot(1+s_{a})+b_{a}
Δ~attn=ga⊙Δattn\tilde\Delta_{\mathrm{attn}}=g_{a}\odot \Delta_{\mathrm{attn}}
xn′=xn+Δ~attnx'_n=x_n+\tilde\Delta_{\mathrm{attn}}
xˉmlp=γ2⊙xn′−μ(xn′)σ2(xn′)+ε\bar x_{\mathrm{mlp}}=\gamma_{2}\odot\frac{x'_n-\mu(x'_n)}{\sqrt{\sigma^2(x'_n)+\varepsilon}}
ε=10−5\varepsilon=10^{-5}
xmlp=xˉmlp⊙(1+sm)+bmx_{\mathrm{mlp}}=\bar x_{\mathrm{mlp}}\odot(1+s_{m})+b_{m}
Δ~mlp=gm⊙Δmlp\tilde\Delta_{\mathrm{mlp}}=g_{m}\odot \Delta_{\mathrm{mlp}}
xn+1=xn′+Δ~mlpx_{n+1}=x'_n+\tilde\Delta_{\mathrm{mlp}}
xˉ=γout⊙x12−μ(x12)σ2(x12)+ε\bar x=\gamma_{\mathrm{out}}\odot\frac{x_{12}-\mu(x_{12})}{\sqrt{\sigma^2(x_{12})+\varepsilon}}
ε=10−5\varepsilon=10^{-5}
mout=[ bo  so ]=atWo+com_{\mathrm{out}}=[\,b_o\;s_o\,]=a_tW_{o}+c_{o}
xout=xˉ⊙(1+so)+box_{\mathrm{out}}=\bar x\odot(1+s_o)+b_o
z^0=xoutWout+bout\hat z_0=x_{\mathrm{out}}W_{\mathrm{out}}+b_{\mathrm{out}}
ϵ^=zt−αt z^0σt\hat\epsilon=\frac{z_t-\alpha_t\,\hat z_0}{\sigma_t}
s=−ϵ^σts=-\frac{\hat\epsilon}{\sigma_t}
f=−12 βt zt−βt sf=-\tfrac12\,\beta_t\,z_t-\beta_t\,s
βt=π 9 τ (1+τ2)1+9 τ2\beta_t=\frac{\pi\,9\,\tau\,(1+\tau^2)}{1+9\,\tau^2}
τ=tan⁡ ⁣(π2min⁡(t, 0.95))\tau=\tan\!\big(\tfrac{\pi}{2}\min(t,\,0.95)\big)
mt′=zt+f (t′−t)m_{t'}=z_t+f\,(t'-t)
zt′=mt′+βt t−t′  ξz_{t'}=m_{t'}+\sqrt{\beta_t}\,\sqrt{t-t'}\;\xi
ξ∼N(0,I)\xi\sim\mathcal N(0,I)
in
ztz_t [B batch, T positions, 768 d]
out
mt′m_{t'} [B batch, T positions, 768 d]
parameters
132,836,352
Parameters

132,836,352 parameters per call, across its learned components

Exact per-instance accounting
ComponentCalculationParameters
Denoiser132,836,352 across its components132,836,352
Per-instance total132,836,352

Across 1024 shared calls: 132,836,352×1=132,836,352132{,}836{,}352 \times 1 = 132{,}836{,}352 parameters.

Derived from the pinned implementation’s constructors and configuration. The checkpoint’s tensors have not been counted. 306,011,162 of these parameters are trained; frozen GPT-2 and the decoder’s mask vector, 124,442,112, are not.

Sources7

Direct evidence

Sampling starts from the prior with a zero self-conditioning estimate, uses the averaged denoiser, takes the adaptive grid when it is requested and the sampler has been updated and a uniform grid otherwise, steps N times carrying the state and the clean estimate, and returns the last step’s mean.

The implementation, pinned at revision e18c42acdfb7, not yet public

Direct evidence

One Euler–Maruyama step: the mean is x + drift · dt, and the next state adds diffusion · √(−dt) · noise; the clean estimate is returned with them.

The implementation, pinned at revision e18c42acdfb7, not yet public

Direct evidence

The reverse SDE: drift −β x/2 − β · score and diffusion √β; the ODE halves the score term and has no diffusion.

The implementation, pinned at revision e18c42acdfb7, not yet public

Direct evidence

The denoiser’s clean prediction is converted into the noise estimate and the score with the marginal’s mean and standard deviation.

The implementation, pinned at revision e18c42acdfb7, not yet public

Direct evidence

The generation grid: N + 1 times at equal steps of the weights’ cumulative distribution, interpolated inside bins, clamped to the stopping time, in decreasing order.

The implementation, pinned at revision e18c42acdfb7, not yet public

Direct evidence

Diffusion: self-conditioning on, `t_min` 0.05 and `eps` 10⁻⁵; the adaptive time sampler has 100 bins, a minimum weight of 0.0001, an EMA of 0.9 and updates every 5,000 steps; the denoiser’s EMA decay is 0.9999; scheduler `tanh` with d = 3, solver `euler`, `ode_sampling` false, N = 128 by default; the denoiser has 12 blocks of width 768 with 12 heads, time conditioning `adaln`, a standard MLP, softcap 50 and self-conditioning by concatenation; the timestep embedding’s `max_period` is 10.

The implementation, pinned at revision e18c42acdfb7, not yet public

Direct evidence

The documented OpenWebText invocation: the joint task on 1,024-token sequences, decoder noise 3, hidden state −3, 1,024 diffusion steps on the adaptive grid.

The implementation, pinned at revision e18c42acdfb7, not yet public