Originally reported November 12, 2026.
TorchTPU, an open-source project developed by Google and Meta, provides a native PyTorch backend for Google TPUs. It aims to run existing PyTorch workloads with limited code changes while supporting eager execution, compiled execution and distributed computing.
Google says its earlier PyTorch/XLA approach required developers to explicitly define compilable regions, incurred substantial compilation latency, lacked PyTorch’s native eager execution and lagged behind newer distributed-computing primitives. TorchTPU instead prioritizes eager execution. For a GPU workload, the migration described in the report involves changing the device from cuda to tpu and the distributed backend from nccl to tpu_dist. Developers can also use torch.accelerator.current_accelerator to identify an available accelerator.
TorchTPU offers three eager-execution modes: Strict, Debug and DeferAndFuse. Google claims DeferAndFuse, which combines eager and compiled execution, can run more than 50% faster than Strict Eager while reducing peak HBM use. That is a vendor-reported comparison, not a general performance guarantee.
Google says it built an integration pipeline to evaluate approximately 5,000 Hugging Face models spanning more than 500 architectures, in eager and compiled modes across multiple TPU generations starting with v5e. In a separate test using a standard PyTorch implementation of the 30-billion-parameter Muse Glimmer model, Google reported single-chip TPUv7 inference throughput of 25,700 tokens per second at a sequence length of 5,120 and 22,400 at 10,240. For training on four TPUv7 chips, it reported 5,600 and 4,600 tokens per second at those respective lengths.
Google also tested a Qwen3 MoE 235B training workload while scaling from 1,024 to 8,192 TPUv7 chips. It said vLLM delivered competitive performance per unit cost for large MoE inference workloads, but the report provides no figures for that comparison.
TorchTPU remains at an early stage. Its roadmap includes dynamic shapes, compilation performance, operator coverage, reinforcement learning and quantization—areas to check against a workload’s requirements before planning a migration.