HomeNews

Hidden Bug Freezes 20% of Training Steps in Gated Models

Divit Bhat
Divit Bhat
•
Nov 4, 2026 11:10 AM
•
0
 min read
Select Emergent as your Preferred news source
Hidden Bug Freezes 20% of Training Steps in Gated Models

💡 TL;DR

  • A survey of 291 open-weight models finds 52.6% of untied gated architectures carry near-zero embedding rows that trigger catastrophic gradient overflow.
  • Nemotron-3-Nano Telugu continual pretraining lost 19.8% of training steps to silent FP32 overflow with no error message from standard frameworks.
  • A three-line GroupClip fix eliminates frozen steps and improves final perplexity from 13.44 to 13.04 with negligible compute overhead.

A newly published research paper reveals that more than half of all untied gated and hybrid language models carry a hidden numerical instability that silently freezes gradient updates in up to one-fifth of training steps. The bug, documented across 291 open-weight repositories on Hugging Face, affects prominent checkpoints including Nemotron-3-Nano-4B, Falcon-H1, Mamba-Codestral-7B, xLSTM-7B, and Kimi-Linear-48B-Base. Standard training frameworks log the overflow as infinity but apply zero gradient updates without raising an error, leaving practitioners unaware that their runs are stalling.

Widespread Dormant Embeddings

The survey found that 52.6% of untied gated and hybrid checkpoints, 20 out of 38 models examined, contain input embedding rows with norms below 10^-6. Weight-tied Transformer architectures showed zero instances of the pattern across 80 repositories. These near-zero embeddings emerge during pretraining when rare tokens or template strings never appear in training corpora. AdamW weight decay continues shrinking the untied embedding vectors toward zero, creating numerical landmines that detonate when the model later encounters those tokens during continual pretraining or domain adaptation.

When a gated sequence model processes one of these dormant rows, the input-embedding gradient amplifies by over 30 orders of magnitude, reaching peaks of 10^35. Once any gradient component exceeds 1.84×10^19, FP32 global-norm clipping overflows to infinity. PyTorch clip_grad_norm_, HuggingFace Trainer, and FSDP2 all log grad_norm equals infinity without error and apply zero gradient updates to the entire model.

Measured Impact on Continual Pretraining

The downstream cost is concrete and measurable. In a 1,000-step Telugu continual pretraining run on Nemotron-3-Nano-4B, 22.5% of batches triggered FP32 overflow and 19.8% of steps lost their gradient updates entirely. Trigger rates vary dramatically by language and token distribution:

  • English web text, supervised fine-tuning data, code, and math corpora: 0.0% overflow
  • Telugu corpus: 95.4% of batches trigger overflow
  • Falcon-H1 on Mongolian text: 100% trigger rate
  • Kimi-Linear-48B-Base encountering the chat tag at position zero: 100% freeze rate

The paper attributes the language-specific vulnerability to the distribution of rare tokens. Low-resource languages and chat templates that were underrepresented or absent during pretraining carry the highest concentration of near-zero embedding rows, making continual pretraining on those domains particularly fragile.

Three-Line GroupClip Fix

The authors propose a minimal intervention called GroupClip that norms the embedding gradient in FP64 precision and clips it separately from the backbone network. Officially released on November 4, 2026, the fix requires three lines of code and drops stalled steps from 198.3 to zero in the Telugu experiment. Triggered embedding rows heal from norms at or below 2.3×10^-10 to a median of 0.010, and final perplexity improves from 13.44 to 13.04 compared to standard FP32 global clipping. Per-step wall time remains nearly unchanged, moving from 2.88 seconds to 2.84 seconds.

For from-scratch pretraining, the paper introduces a complementary GateFloor offset of δ equals 0.1 on the SiLU gate. This reduces the gradient magnitude of a Mamba-2 165M model at embedding norm 10^-30 from 5.6×10^28 to 0.29, while preserving matched perplexity. LoRA fine-tuning and on-policy reinforcement learning remain unaffected because both methods read from the output embedding rather than the input embedding layer.

Framework Detection Gap

The research highlights a critical detection gap in popular training frameworks. Megatron-Core's check_for_nan_in_grad function correctly raises an exception when gradient overflow occurs, halting the run and alerting the practitioner. PyTorch, HuggingFace Trainer, and FSDP2 do not. These frameworks log grad_norm equals infinity and silently zero the update, allowing the run to continue with intermittent gradient loss. Practitioners monitoring only training loss may never notice the issue, as the stalled steps appear as temporary plateaus rather than catastrophic failures.

What This Means

The discovery of silent gradient freezing in more than half of gated language models exposes a systematic vulnerability in continual pretraining and domain adaptation workflows. Teams working with low-resource languages, specialized domains, or chat-template fine-tuning face the highest risk of wasted compute and suboptimal convergence. The three-line GroupClip fix offers an immediate, zero-overhead remedy that both prevents frozen steps and accelerates convergence. Practitioners should audit their continual pretraining pipelines for overflow signatures and consider adopting FP64 embedding-gradient norms as a standard safeguard, particularly when working with untied gated architectures or underrepresented token distributions.

About the writer

Divit Bhat is a product and growth writer at Emergent, specializing in AI-powered app building, no code platforms, and modern software workflows. He creates practical guides and tutorials to help founders, enterprises and teams build, automate, and scale products with AI.

Start Building
on Emergent today
Try Emergent