TorchTPU is now open source: Run native PyTorch on TPUs
Google open-sources TorchTPU, enabling native PyTorch execution on TPUs with minimal code changes, expanding hardware choices for AI workloads.
Google announced TorchTPU as an open-source PyTorch stack for TPUs at PyTorch Conference 2026, allowing developers to run, serve, and deploy models using familiar PyTorch APIs. The integration supports tools like vLLM, SGLang, and Hugging Face, enabling consistent workflows across TPUs, GPUs, and CPUs without extensive modifications.
Co-developed with Meta’s PyTorch team, TorchTPU lets users debug models in eager mode before optimizing for production with torch.compile, reducing memory overhead and improving TPU utilization. The stack includes native distributed primitives and advanced diagnostics, ensuring high performance and operational efficiency from initial deployment.
Hugging Face partnered with Google to enable native TorchTPU support in Transformers v5, allowing models to be deployed by setting device_map="tpu". The Diffusers library also runs natively on TPUs with eager mode, torch.compile, and tensor parallelism, while dedicated CI/CD pipelines test the suite nightly on TPU infrastructure.
Google integrated TorchTPU into open-source serving engines and Kubernetes-native routing to optimize inference costs and latency. Collaborations with Inferact, RadixArk, and others enhance throughput and efficiency, while TorchTitan provides production-grade training recipes validated on up to 8,000 Ironwood TPUs, demonstrating up to 52% MFU on Qwen 3 8B.