Google and Meta open-source TorchTPU, a native PyTorch backend for TPUs
TorchTPU is an open-source project from Google and Meta that gives Google TPUs a native PyTorch backend. Moving a workload from GPU to TPU mainly means replacing the cuda device with tpu and the nccl distributed backend with tpu_dist; developers can also use the new torch.accelerator.current_accelerator API to detect the available chip. Google says it tested about 5,000 Hugging Face models across more than 500 architectures on TPU generations starting from v5e, in both eager and compiled modes. On performance, a 30B-parameter model reached 25,700 tokens per second on a single TPUv7 chip at a sequence length of 5,120, and training on Qwen3 MoE 235B scaled from 1,024 to 8,192 TPUv7 chips. The project is still early: dynamic shapes, compile performance, operator coverage, reinforcement learning and quantization are all listed as roadmap work rather than finished features.
Teams that kept training or serving on GPUs because porting to TPU meant rewriting code now have a much cheaper test: swap the device and distributed backend, then check whether your model's operators are covered. The 5,000-model test is a useful signal of breadth, but it is Google's own pipeline, and the unfinished roadmap items — dynamic shapes and operator coverage in particular — are the ones most likely to block a real workload.
On Hacker News, commenter tingkuanpei called the work interesting and said Google should have done it long ago, citing how rich the PyTorch ecosystem is. Other commenters noted that beyond selling TPUs through GCP, Google also sells them to enterprises for on-premises deployment, including Anthropic, and that Meta could follow.