Google and Meta want PyTorch code written for Nvidia to run on Google’s chips with a one-word change Google and Meta introduced TorchTPU at the PyTorch Conference in San Jose on Tuesday, an open-source backend that lets PyTorch models run natively on Google's Tensor Processing Units with a change from model.to("cuda") to model.to("tpu"). Google says 98% (4,821) of the 4,917 most-downloaded Hugging Face open models ran without crashing on the software, and 97% of a 657-model representative subset matched GPU numerical results, though the performance figures are Google's own and unverified. Google reports training Alibaba's Qwen3 235B on up to 8,192 Ironwood chips at roughly 27% to 29% efficiency, and Hugging Face said its Transformers and Diffusers libraries now treat TPUs as "just another device," with 96.5% of its TPU tests passing. Google’s Ironwood TPU chips on a board, from Google’s launch of the chip in April 2025. TorchTPU’s headline benchmarks ran on Ironwood. Image: Google Google wants developers who write AI code for Nvidia chips to be able to run it on Google’s own chips by changing a single word. Google and Meta introduced TorchTPU https://pytorch.org/blog/introducing-torchtpu/ on Tuesday at the PyTorch Conference in San Jose: an open-source backend that lets PyTorch, the most widely used framework for building AI models, run natively on Google’s Tensor Processing Units TPUs . The aim, in the project’s own words, is that porting a model “should be as simple as changing model.to "cuda" to model.to "tpu" ”. CUDA is Nvidia’s software platform, and the habit of writing for it is a big reason so much AI work stays on Nvidia hardware. What TorchTPU changes for developers PyTorch began at Meta, and Google has long backed its own frameworks, TensorFlow and JAX, for TPUs. Until now, PyTorch users who wanted TPUs had to use PyTorch/XLA, a bridge Google introduced in 2020, or learn JAX. Google’s engineers are blunt about the old route: the post says PyTorch/XLA “required intrusive source-code modifications”, “suffered from severe compile-time latency” and lacked PyTorch’s normal step-by-step “eager” mode. TorchTPU was started at Google in mid 2025 with the PyTorch team at Meta. It supports eager mode by default, plus PyTorch’s torch.compile for faster compiled runs, and the usual tools for spreading a model across many chips. Google says it already runs in production, for both training and inference, for “some of the largest Google Cloud customers”. The code is on GitHub https://github.com/google-pytorch/torch tpu , alongside TPU versions of the vLLM and SGLang serving engines and Meta’s TorchTitan training platform. TPUs aren’t sold off the shelf to developers: you use them through Google Cloud, in the regions where it offers them. Google tested the software on the 4,917 most-downloaded open models on Hugging Face, from Qwen, DeepSeek, Gemma and Llama to Whisper and CLIP. It says 98% 4,821 ran without crashing, and 97% of a smaller set of 657 representative models gave the same numerical results as on GPUs. How fast it is, by Google’s numbers The performance figures are Google’s own and haven’t been independently checked. On its latest Ironwood chips, Google says it trained Alibaba’s Qwen3 235B model on up to 8,192 chips with efficiency the share of the chips’ peak maths actually used holding steady at roughly 27% to 29% as it scaled up. On 64 chips, it says the PyTorch setup reached 1,828 tokens a second against 1,937 for Google’s own JAX-based trainer, a gap of about 6%. A companion post https://developers.googleblog.com/integrating-torchtpu-into-torchtitan-and-optimizing-models-for-tpu/ on the Google Developers Blog, co-written with a Meta engineer, reports about 57% efficiency training Llama 3 405B on 128 to 1,024 chips. Google adds a caveat: the one-word swap gets a model running, but peak speed still needs TPU-specific tuning and custom kernels. Some PyTorch features, such as FlexAttention, aren’t supported yet. Hugging Face drops its TPU workaround Hugging Face, whose libraries most developers use to download and run open models, said https://huggingface.co/blog/hf-torchtpu its Transformers and Diffusers libraries now treat TPUs as “just another device”. Its Optimum TPU add-on “is not required anymore”. Loading a model on a TPU is now a matter of passing device map="tpu" . Hugging Face is candid that the work isn’t finished: “It’s not all green yet,” it wrote, with 96.5% of its tests that run on TPU passing. A long fight with CUDA Reuters reported https://www.business-standard.com/technology/tech-news/google-works-to-erode-nvidia-s-software-advantage-with-meta-s-help-125121701308 1.html last December that Google was building TorchTPU with Meta’s help to chip away at Nvidia’s software advantage. Google is not alone. DeepSeek has been giving Huawei’s chips the software they lacked https://madrobot.blog/2026/09/30/deepseek-huawei-ascend-open-source-tilelang-nvidia-cuda-alternative/ and today opened up its inference engine https://madrobot.blog/2026/10/20/deepseek-deepinfer-open-source-inference-engine-huawei-ascend-nvidia/ , while Microsoft is betting on its own Maia 300 chip https://madrobot.blog/2026/10/12/microsoft-maia-300-ai-chip-inference-nvidia-gpus-2027/ . One of Google’s test models is Meta’s Muse Glimmer 30B https://madrobot.blog/2026/10/10/meta-muse-glimmer-how-to-run-locally-ollama-lm-studio-vs-qwen-gemma/ , originally written for Nvidia GPUs, which Google says trained well on TPUs after it swapped out one attention function that TorchTPU doesn’t yet support. Google says the next 6 to 12 months will go on hardening the software, broader model support and reinforcement learning, and it is asking developers for feedback on GitHub. Why it matters Nvidia’s grip on AI rests as much on CUDA as on its chips, because rewriting code is costly. If PyTorch code moves to TPUs with a one-word change, renting Google’s chips instead becomes a price comparison rather than a rewrite, and Meta’s backing gives the effort weight with PyTorch developers. Sources: PyTorch blog https://pytorch.org/blog/introducing-torchtpu/ , Google Developers Blog https://developers.googleblog.com/integrating-torchtpu-into-torchtitan-and-optimizing-models-for-tpu/ , Hugging Face https://huggingface.co/blog/hf-torchtpu , TorchTPU on GitHub https://github.com/google-pytorch/torch tpu , Reuters via Business Standard https://www.business-standard.com/technology/tech-news/google-works-to-erode-nvidia-s-software-advantage-with-meta-s-help-125121701308 1.html .