AI Cloud Architect

Why Stochastic Rounding is Essential for Modern Generative AI

GoogleBlog post by Karl WeinmeisterGoogle Cloud Blog (developers and practitioners)

Stochastic rounding (SR), a 1950s technique, is now key to training massive generative AI models in low precision. Learn how it works on Google Cloud TPUs and A4X VMs.

Read the original (opens the source's page in a new tab)

AI: Summary

What it is

Stochastic rounding replaces fixed rounding with probability so small gradient updates survive low-precision training; the post shows how to enable it on TPUs with Qwix and on A4X Blackwell GPUs.

Who it is for

ML engineers training models in INT8, FP8 or 4-bit precision on Google Cloud TPUs or A4X VMs who see training stall.

Key points

  • Qwix quantization toolkit for JAX enables stochastic rounding for gradients via a bwd_stochastic_rounding setting.
  • On A4X, the NVFP4BlockScaling recipe applies stochastic rounding to gradients by default.
  • Google says A4X delivers up to 4x higher training performance than previous generations.
  • Stochastic rounding is for training only; use round-to-nearest for inference and fix a seed for reproducibility.