# Hugging Face — Hugging Face ❤️ TorchTPU: TPUs, Natively

- Company: Hugging Face (huggingface.co)
- Announced: 2026-10-20
- Category: infrastructure-release
- Coverage: not counted
- Announcement: yes
- Group: announcements
- Source: https://huggingface.co/blog/hf-torchtpu
- Record: https://forck.live/items/25276-hugging-face-torchtpu-tpus-natively
- Subject: Platform
- Models affected: Qwen/Qwen3.5-9B, Qwen/Qwen3-30B-A3B-Instruct-2507, Gemma 4 26B-A4B

Hugging Face says TorchTPU, a native PyTorch backend, now lets Transformers, Diffusers and Kernels run on Google TPUs without porting code to torch_xla or learning JAX. Until now, running PyTorch on TPUs meant going through PyTorch/XLA, where tensors were lazy, small changes could trigger graph recompilations and debugging was hard to reason about. TorchTPU adds TPU as a new PyTorch backend with Pallas kernels tuned for TPUs, distributed training support and a torch.compile integration, installed on a TPU VM with one pip command. Loading a model on a TPU takes device_map="tpu" in Transformers, while Diffusers needs pipe.to("tpu") in eager mode or one compile call for deployment. Models too large for one chip can be sharded across chips by passing a TensorParallelConfig to from_pretrained. Hugging Face says Optimum TPU is no longer required for Hugging Face models with Transformers and Diffusers, and that 96.5% of the tests that run on TPU pass, with 34 issues reported to the TorchTPU repo and 19 already fixed.

## Evidence

Verbatim from https://huggingface.co/blog/hf-torchtpu:

> TorchTPU adds TPU as a new backend to PyTorch. You write regular PyTorch code. It comes with Pallas kernels tuned for TPUs, support for distributed training, and a torch.compile integration for when you want more speed.

---

Record: https://forck.live/items/25276-hugging-face-torchtpu-tpus-natively
Catalogue: https://forck.live/llms.txt
Current issue: https://forck.live/feed.md
