Fixing Gradient Spikes in Gemma 4 Fine-tuning: Fragile Mid-Layer Backward Pass

EntertainmentBroad43 · reddit · 2026-11-24

A practitioner fine-tuning Gemma 4 with LoRA (SFT + RL) on CT images hit severe gradient spikes. With Claude Opus's help in debugging, they traced the root cause to ill-conditioned backward paths in Gemma 4's middle layers that silently wreck training of the lower layers (observed on both 12B and 31B). After days of compute they confirmed a small code fix eliminates the spikes and improves task performance. They also note Gemma 4 edges out other models on their medical vision benchmarks. Full details and the fix are in their arXiv paper (2611.27243).

Original post →

More from Research

Research channel →