Skip to content

Hugging Face adds native TPU support with TorchTPU

Hugging Face BlogFrom the sourcePicksHugging Face ❤️ TorchTPU: TPUs, Natively
Original
Image: Hugging Face Blog
Who
Hugging Face
What
introduces TorchTPU, a native PyTorch backend for running Hugging Face libraries on TPUs
QuoteWith TorchTPU , a native PyTorch backend, TPU is now just another device.

What happened

Hugging Face announces native TPU support across Transformers, Diffusers, and Kernels through TorchTPU, a native PyTorch backend. Models can use device_map="tpu" or pipe.to("tpu"), with optional compilation and distributed execution; Optimum TPU is no longer required for Transformers and Diffusers. Hugging Face reports that 96.5% of tests running on TPU pass, with 19 of 34 reported TorchTPU issues already fixed.

Why it matters

Native TPU support lets PyTorch users keep familiar Hugging Face workflows, reducing the software changes previously required to move models onto Google’s accelerators.

The story so far

Hugging Face has added native TPU support across Transformers, Diffusers, and Kernels through TorchTPU, a native PyTorch backend, removing the need for Optimum TPU when running Transformers and Diffusers models on TPUs. Models can target the hardware with device_map="tpu" or pipe.to("tpu"), with optional compilation and distributed execution. Hugging Face reports that 96.5% of tests running on TPU pass and that 19 of 34 reported TorchTPU issues have already been fixed.

Catch every AI shift in one morning briefing

Model releases, price cuts, and compute shifts with original sources. Free, confirmed by email, unsubscribe anytime. Read a past issue

Read next

See the full storyHugging Face Adds Native PyTorch Support for TPUs Through TorchTPU
This story is in 10/21 AI DailyRead the whole issue