ReadingResearchRadarInvestment framework
Sign in / Sign up
← Back to reading
News2 min read·2026-10-20DisconfirmAI Editorial

Hugging Face Releases TorchTPU: Native PyTorch Support for Google TPUs Eliminates JAX Porting

Hugging Face launched TorchTPU, a native PyTorch backend that allows code to run directly on Google TPUs without torch_xla or JAX, with Transformers and Diffusers now natively supported.

ImportanceMaterialEvidenceE3 inspectableWrite-upStandard

Original publication time 2026-10-20 08:00 GMT+8

Hugging Face released TorchTPU on October 20, 2026, adding a native TPU backend to PyTorch. This means developers can now send models directly to the "tpu" device without needing to port their code to the torch_xla library or learn JAX, as was previously required. This change aims to lower the barrier to using Google Cloud TPUs within the mainstream PyTorch ecosystem.

TPUs (Tensor Processing Units) are AI accelerator chips designed by Google specifically for the matrix math used in neural networks, powering models like Gemini. Historically, the TPU software stack grew around TensorFlow and JAX, causing friction for PyTorch users who faced issues like lazy tensor execution making debugging difficult and small changes triggering graph recompilations. TorchTPU addresses these pain points by supporting standard PyTorch code, providing Pallas kernels tuned for TPUs, and integrating with torch.compile.

With TorchTPU, Hugging Face's core libraries, including Transformers v5 and Diffusers, now natively support TPUs. Developers simply need to install TorchTPU and specify device_map="tpu" when loading a model. For image and video generation, Diffusers allows prototyping via pipe.to("tpu") and performance optimization through compiled mode. Additionally, the Kernels Hub offers ready-to-use TPU kernels that significantly boost decoding throughput in scenarios like Mixture-of-Experts (MoE) models.

While compatibility improvements are ongoing, Hugging Face reports that 96.5% of test cases pass on TPUs, having already fixed upstream bugs such as those in StaticCache. This development transforms TPUs from a side quest for PyTorch users into a first-class compute option alongside GPUs, potentially encouraging more enterprises and individual developers relying on Google Cloud infrastructure to shift towards TPUs for large-scale model training and inference.

Sign in / Sign up
ReadingResearchRadarInvestment framework

Sources

  • 原始出处huggingface.co↗
Continue researching →