Google and Meta have released TorchTPU, an open-source project that provides a native PyTorch backend for Google's Tensor Processing Units. The collaboration enables PyTorch workloads to run on TPU hardware with minimal code changes, supporting both eager and compiled execution modes, distributed computing, and hardware-specific optimizations. According to the announcement, TorchTPU represents a fundamental shift from Google's previous approach to running PyTorch on TPUs.

To validate TorchTPU's performance, Google tested a 30-billion parameter Muse Glimmer model implemented in standard PyTorch. On a single TPUv7 chip, inference throughput hit 25,700 tokens per second at 5,120 sequence length and 22,400 tokens per second at 10,240 sequence length. For training workloads using four TPUv7 chips, throughput reached 5,600 tokens per second and 4,600 tokens per second at the same sequence lengths, respectively. Google also ran experiments using Qwen3 MoE 235B for training workloads, scaling from 1,024 to 8,192 TPUv7 chips. To test TorchTPU's ability to run existing PyTorch models without modifications, Google built an integration pipeline to evaluate approximately 5,000 Hugging Face models across more than 500 architectures in both eager and compiled modes on TPU hardware generations starting from v5e.

Google explains that the company began supporting PyTorch workloads on TPUs in 2020 through PyTorch/XLA, which relied on JAX, XLA, and lazy tensors. According to Google, this earlier approach had significant shortcomings: it required intrusive source-code modifications to explicitly define compilable regions, suffered from severe compile-time latency, lacked support for PyTorch's native imperative execution mode, and lagged in supporting emerging distributed computing primitives within the PyTorch ecosystem. TorchTPU takes a fundamentally different approach, making eager execution a top priority and enabling existing PyTorch workloads to run with minor code modifications. Specifically, migrating from GPUs to TPUs involves replacing the cuda device with tpu and the nccl distributed backend with tpu_dist. TorchTPU supports three eager execution modes: strict, debug, and DeferAndFuse, with Google claiming that the latter "can be 50% or more faster than Strict Eager while reducing peak HBM memory."

The shortcomings of PyTorch/XLA created friction for developers seeking to move models between GPU and TPU infrastructure, limiting the adoption of Google's specialized chips despite their potential performance advantages. By prioritizing eager execution and minimizing required code changes, TorchTPU addresses the core barriers that kept PyTorch's rich ecosystem largely confined to GPU hardware. The project remains at an early stage and in continuous evolution, with the roadmap including work on dynamic shapes, compilation performance, operator coverage, reinforcement learning, and quantization. Google's testing methodology relied on corpus stratification and balanced architectural selection, designed to balance real-world adoption with broad architectural diversity while avoiding redundant testing of minor variations and ensuring production weights are thoroughly evaluated. For inference workloads, Google reported competitive performance-per-dollar for large-scale mixture-of-experts workloads using vLLM, and beyond offering TPUs through Google Cloud Platform, the company sells them to enterprise clients for on-premises deployments, which include Anthropic and potentially Meta in the future. The strategic calculus has shifted: organizations that standardized on PyTorch for model development now face fewer technical hurdles when evaluating specialized accelerators, potentially reshaping procurement decisions across the industry. Whether Google's belated embrace of native PyTorch support can reverse years of GPU entrenchment remains the open question for cloud buyers and chip designers alike.