FlashNorm: two lines of algebra buy 33-35% speedup — and a CUDA race that made the model echo the past

AI Engineer · youtube · 2026-09-20

AI Engineer interview with Filip Makraduli (paper co-written with Nils Graef) on FlashNorm: an RMS norm layer does almost no arithmetic yet can launch 33 times per decode step. The fix folds the norm's gain into projection weights offline, defers the scalar divide so tensor cores and CUDA cores run in parallel, and drops redundant double-normalization (scale invariance) — a 33-35% speedup on norm+projection, compatible with torch.compile and quantized checkpoints. The deferral required hand-written CUDA; an implicit join between streams let post-scale read a stale buffer, making the model repeat outputs with a one-step lag — fixed by explicit stream-end sync. Deploying modified checkpoints required Superlinked's open inference engine, since kernel surgery isn't possible on rented endpoints.

Original post →

More from Infra

Infra channel →