Models
Hugging Face ❤️ TorchTPU: TPUs, Natively
Published · Reported by Hugging Face
Hugging Face announced on October 20, 2026 that its main libraries now run natively on Google's Tensor Processing Units through TorchTPU, a PyTorch backend that treats the TPU as an ordinary device. Transformers, Diffusers and Kernels all support it, so developers can load a Hub model with device_map set to "tpu" or move a pipeline with a single call. Previously, PyTorch users relied on PyTorch/XLA, which the company says brought lazy tensors, unexpected graph recompilations and difficult debugging, or they switched to JAX. Hugging Face says its earlier Optimum TPU tool is no longer needed to run models with Transformers and Diffusers.
TorchTPU includes Pallas kernels tuned for the hardware, distributed training and a torch.compile integration. In a Cloud TPU v6e-4 example, Hugging Face reports that Qwen-Image-2.1 produced a 1024×1024 image in 3.5 seconds compiled versus 8.0 seconds eager. Models too large for one chip can be sharded across several as they load. On a TPU v6e-8, the company says Hub kernels sped decoding at batch size 64 by 21.5 times on Qwen3-30B-A3B and 12.8 times on Gemma 4 26B-A4B, compared with the default implementation.
Support is still maturing. Hugging Face says 96.5% of the Transformers tests that run on TPU pass, and that it has filed 34 issues with TorchTPU, 19 of them fixed, while a nightly CI is in the works. The change matters because TPU software grew up around TensorFlow and JAX, leaving PyTorch developers with a harder path to Google's accelerators.
2 min recap · This recap was written by an AI model from Hugging Face's reporting and has not been checked by a person. It can contain errors.
Source: Hugging Face