
What happened
Training a 7.0B weight-shared recursive Transformer on one RTX 3090, the author found PyTorch's FP32 nn.LayerNorm returns only its bias once a row's sum of squared deviations exceeds FP32's max of about 3.4×10^38, with no NaN.
Why it matters
The output becomes a constant independent of the input, so NaN checks and anomaly detection miss it, and logits stay identical across inputs, meaning a model can look like it is training while a layer has stopped passing information.
Summaries like this, every morning.
A practitioner trained a weight-shared recursive Transformer, a design that applies the same block repeatedly, so hidden-state magnitudes accumulate with depth. At the 200M-token checkpoint, the hidden state just before the final LayerNorm reached a sum of squared deviations of 2.70×10^38, close to FP32's 3.4×10^38 ceiling, and rsqrt of the variance fell to 7.7×10^-19, effectively zero.
The minimal CPU script isolates the mechanism. Because LayerNorm sums the squared deviations across the hidden dimension, a single element's square can be only about 1/65 of the FP32 maximum while the row total already overflows. In the sweep, rows collapsed exactly when that row sum exceeded FP32's max, with zero mismatches across 12,248 rows. The CE during collapse sat near ln(32000)=10.37, a finite value that looks plausible in a training log.
The reported fix was to compute only the final LayerNorm in FP64 while keeping input and output dtypes unchanged. In the real model, collapse occurrences went from 6 to 0, usable recursion depth rose from 8 to 15, and validation CE at 200M tokens fell from 10.673 to 9.806, though the author notes other changes were also included. Applying FP64 to every layer was not benchmarked, and the author notes values could still grow beyond FP64's range.
Pick your industry and the AI tools you use, and get news related to your work every day.
Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →
Ask AI anything about this article. The AI reads this article, earlier AIToday articles, and Wikipedia, and cites its sources. Q&As are published on this page for other readers too.
Home Depot CIO Angie Brown told Business Insider the retailer is in active conversations with Meta about how M…

Microsoft AI Chief Executive Mustafa Suleyman wrote on X that current AI systems are not conscious, have no su…

An updated Wells Fargo online access agreement taking effect Nov

Palo Alto Networks announced a Cortex XDR integration with Claude Cowork, placing a lightweight sensor inside…

John Deere announced JD at the Farm Progress Show in Iowa, an AI assistant inside its Operations Center that a…

Uber built an MCP Gateway supporting more than 800 MCP servers and 5,000 tools, separating an MCP Registry con…
