The story’s score and claims

Comments on No. 126 of 132 · Giles' Blog · edition of Saturday 5 December 2026

The GradScaler implosion: how filtered-out NaN gradients became NaN weights

Summary

The author traces why PyTorch's GradScaler, which is documented as skipping optimizer steps when gradients contain inf or NaN, instead ended up turning a weight-tied model's weights into NaNs during mixed-precision training. Their logged parameter norms stayed finite until one step, then all went NaN at once.

Comments

Ranked by a public rubric, not by votes: what a comment adds counts, not who wrote it. How comments are ranked · Comment rules