AI
Google and Meta bring PyTorch training to Cloud TPUs with new TorchTitan fork
TorchTPU, a native PyTorch backend for Google Cloud TPUs, simplifies large-scale model training by eliminating the need to rewrite code in JAX or work with legacy tools.
Google Developers Blog (AI)
Google and Meta have jointly developed a new approach to large-scale generative AI training on Google Cloud TPUs, removing long-standing friction for PyTorch developers. Rather than forcing a complete rewrite into JAX or grappling with outdated libraries, the new TorchTPU native backend integrates directly into PyTorch's core interface, requiring only minimal adjustments to device initialization code.
What's New#
The centerpiece of this effort is TorchTitan on TPU, a specialized fork of Meta's widely-used TorchTitan training framework, now optimized to run on Google Cloud TPUs. The implementation is available on GitHub. Rather than ask engineering teams to craft custom TPU sharding strategies or manually write low-level XLA communication passes, the joint effort embedded TPU-native execution passes directly into TorchTitan itself, making it the canonical reference for scaling PyTorch workloads on Cloud TPUs.
Which Models Are Supported#
TorchTitan provides production-ready recipes for several model classes:
- Large dense models (Llama 3 70B/405B, Qwen 3 8B/32B)
- Mixture-of-Experts architectures (Qwen 3 235B MoE)
- Diffusion transformers (FLUX.1 12B)
Beyond initial pre-training, the framework integrates with post-training pipelines like VeRL for reinforcement learning alignment, synchronizing weights with high-throughput serving engines such as vLLM-TorchTPU.
How Optimization Works#
TorchTitan takes a modular approach to performance tuning. Model definitions are written in standard PyTorch with no TPU-specific code; distributed training strategies are applied as framework layers (FSDP), declarative sharding plans (tensor parallelism), or backend plugins (MoE layers).
Google's TPU recipes replace standard components with optimized Pallas kernels, including:
- Splash Attention: avoids materializing the full attention matrix while supporting causal, sliding-window, and packed-document masks
- Fused loss computation: combines the final projection and cross-entropy loss without writing full logits to memory
- Grouped MoE kernels: replace sequential expert multiplications with a single kernel per layer

