TorchTPU brings PyTorch to Google TPUs with Meta’s backing, but the chip choice still depends on the workload

Última actualización: 11/02/2026
  • Release and scope: Google and Meta open-sourced TorchTPU, a native PyTorch backend for Google TPUs that replaces PyTorch/XLA and supports eager execution, torch.compile, distributed training and serving tools.
  • Compatibility: Google tested 4,917 Hugging Face models and 98% ran without crashing; numerical results matched GPUs in 97% of architecture tests, but peak TPU performance still needs Pallas kernels.
  • Performance and cost: On Qwen3 MoE 235B, PyTorch reached about 94% of JAX throughput; SemiAnalysis found Ironwood cheaper per token than Nvidia B200/B300 at moderate speeds but slower to first token under heavy concurrency.
  • Practical split: TPUs look suitable for batch inference and background work, while latency-sensitive chat, FP4 inference and hand-tuned CUDA workloads still favor Nvidia; Meta has TPU rental and chip-supply commitments across Google, Nvidia and AMD.

TorchTPU Google Meta PyTorch TPU

Google and Meta have open-sourced TorchTPU, a native PyTorch backend for Google TPUs, replacing the older PyTorch/XLA route and aiming to let existing PyTorch workloads run on Tensor Processing Units with limited code edits. The project was presented at the PyTorch Conference on 20 October, and it supports eager execution, torch.compile, distributed computing and hardware-specific optimizations. It is meant to reduce migration friction for teams already using PyTorch, rather than asking them to rebuild models around JAX or a separate TPU-only stack.

The sales pitch is straightforward on paper: swap .to('cuda') for .to('tpu') and move a model from Nvidia GPUs to Google hardware. The catch is that peak TPU performance does not come from a one-line change; Google and the PyTorch Foundation both point to custom Pallas kernels and further tuning for production workloads. For an infrastructure team, the real shift is the cost of testing a TPU, not a blanket claim that one chip wins everywhere.

Google se une a PyTorch de Meta para desafiar el dominio de Nvidia
Related article:
Google teams up with Meta’s PyTorch to challenge Nvidia’s AI dominance

What TorchTPU changes under the hood

Work on the backend began at Google in mid-2025 in collaboration with Meta’s PyTorch team. It replaces PyTorch/XLA, which Google introduced in 2020 and which leaned on JAX, XLA and lazy tensors. According to Google, that older path forced intrusive source-code changes to define compilable regions, suffered from heavy compile-time latency, lacked native eager execution and trailed PyTorch’s distributed primitives. TorchTPU is designed to close that gap without asking developers to leave the PyTorch ecosystem behind.

Eager execution is treated as a first-class feature. Migration usually means replacing the cuda device with tpu and the nccl distributed backend with tpu_dist; the newer torch.accelerator.current_accelerator API can also detect the available accelerator. The backend supports roughly 450 core PyTorch operations, works in step-by-step mode and with torch.compile, and has been validated with the vLLM and SGLang serving engines plus the TorchTitan training library.

There are three eager modes: strict, debug and DeferAndFuse. The last one is a hybrid eager/compiled mode that Google says can run 50% or more faster than strict eager while reducing peak HBM memory. That matters because TPU users often want the familiar PyTorch debugging flow without giving up compiled performance once a model is ready for heavier workloads.

PyTorch
Related article:
PyTorch pushes past GPU-only workflows as TorchTPU, TorchNeuron and llm-d mature

Google built an integration pipeline to test about 5,000 Hugging Face models across more than 500 architectures in both eager and compiled modes, on TPU generations starting from v5e. The testing plan used a two-tier selection process, with corpus stratification and balanced architectural choices, to mix real-world adoption with broad coverage and avoid redundant tests of minor variants. In compatibility terms, 4,821 of 4,917 models ran without crashing, a 98% pass rate, and numerical results matched GPUs in 638 of 657 architecture tests, or 97%. Those are compatibility numbers rather than speed numbers, and Google still recommends Pallas kernels for teams chasing peak performance.

Early production use, serving stack and gaps

The serving piece, SGLang-TorchTPU, was built by RadixArk’s SGLang team with Google and Meta. Meta’s PyTorch-TPU lead says it is already running in production at Meta, although LMSYS did not disclose which workloads use it or at what scale. The launch arrived with 193 registered TPU tests and 15 models in continuous testing, while structured output, function calling and reinforcement learning training on TPUs remain experimental or in preview.

There are practical limits. A TPU can be accessed by only one process at a time, so reinforcement-learning setups that share a chip between training and serving are not supported out of the box; SGLang lists closing the step-time gap with GPUs in RL training as future work. Latency-sensitive serving, FP4 inference and workloads built around hand-tuned CUDA kernels still favor Nvidia, whose CUDA stack has had more than a decade to mature. Reporting on Amazon’s Trainium push has also found its software facing adoption hurdles, which shows how much weight the software layer carries.

How PyTorch on TPU compares with JAX and Nvidia

Google validated performance with a 30-billion-parameter MuseGlimmer model written in standard PyTorch. On a single TPUv7 chip, inference reached 25.7k tokens per second at a 5,120 sequence length and 22.4k tokens per second at 10,240. Training on four TPUv7 chips reached 5.6k tokens per second at 5,120 length and 4.6k at 10,240, giving teams a concrete baseline for mixed inference and training tests.

Oracle
Related article:
Oracle widens its AI cloud menu with Google TPUs, custom chips, and Gemini data links

For a closer comparison with Google’s own stack, training Qwen3’s 235-billion-parameter mixture-of-experts model on 64 TPU v7 chips produced 1,828 tokens per second on the PyTorch path, versus 1,937 for JAX, which Memeburn calculated as about 94% of the native stack. Google also scaled Qwen3 MoE 235B training from 1,024 to 8,192 TPUv7 chips and reported competitive performance-per-dollar for large-scale MoE inference using vLLM.

SemiAnalysis tested Ironwood, or TPU v7, against Nvidia’s B200 and B300 while serving Qwen3.5 397B in FP8 precision. At 100 tokens per second per user, Ironwood cost $0.181 per million tokens, compared with $0.222 on B200 and $0.276 on B300, or 18.5% and 34.4% cheaper respectively. Throughput per chip at 20 tokens per second per user was 9,364 tokens/s on Ironwood, 8,903 on B200 and 8,925 on B300, edging ahead by roughly 5%. The figures come from a total-cost-of-ownership model for a hyperscale buyer, not from cloud rental prices.

The latency picture flips under heavy concurrency. At 256 concurrent users, mean time to first token was 5.41 seconds on Ironwood, 3.75 seconds on B200 and 2.40 seconds on B300, making Ironwood about 1.4 times slower than B200 and 2.25 times slower than B300 on that metric. TPU v7 also lacks native FP4 compute, so Nvidia keeps an edge for FP4 serving. Software is moving the cost line quickly: vLLM-TorchTPU’s lowest cost for Qwen3.5 on the InferenceX 8K/1K test fell from 3.6 cents per million tokens in September to 2.01 cents, a 44% drop in about six weeks without new hardware. The pattern makes workload shape more important than brand.

Meta’s TPU bet and the wider supply chain

Meta’s TPU spending sits alongside large commitments to Nvidia and AMD rather than replacing them. In February, Meta signed a multi-year, multibillion-dollar deal to rent Google TPUs and was in talks to buy TPUs for its own data centres; earlier that month it agreed to buy current and future Nvidia chips, and AMD said it would sell Meta up to $60 billion in AI chips. Meta is spreading its bets across Google TPUs, Nvidia and AMD, and neither company commented on the Google deal, according to Reuters reporting carried by Malay Mail.

TorchTPU adds a software layer that lets the same PyTorch model run across more than one supplier, with Meta helping maintain the backend. Google’s side of that supply chain also runs through Broadcom, which signed a long-term agreement covering future TPU generations. Beyond cloud rentals, Google sells TPUs for on-premises enterprise deployments, with commenters citing Anthropic as a client; that broader hardware channel is part of why the backend release matters beyond one conference demo.

Reaction in developer circles was blunt. Hacker News user tingkuanpei argued that Google should have done this a long time ago, pointing to the richness of the PyTorch ecosystem. Other users noted that Google’s TPU business goes beyond GCP rentals and includes enterprise on-premises deployments, while the general mood was less about brand loyalty and more about having a credible second hardware path for PyTorch code.

Where TPUs fit: batch inference versus interactive chat

Memeburn’s recommendation for infrastructure leads is to price TPUs now for work where nobody waits on the first token, such as batch inference, overnight evaluation and background agent runs, and to keep interactive chat on Blackwell GPUs. The numbers split cleanly: Ironwood serves tokens 18.5% more cheaply than B200 and 34.4% more cheaply than B300 at 100 tokens per second per user, yet its first token arrives 2.25 times later than B300’s at 256 concurrent users. The practical split is batch and background work on TPUs, latency-sensitive chat on Nvidia.

TorchTPU lowers the cost of testing that split, because the PyTorch path already reaches about 94% of JAX on Google’s own hardware and serving cost fell 44% in six weeks. Even a partial shift of batch inference would matter to Nvidia, whose bull case rests on roughly $733 billion in AI infrastructure spending expected from the five largest cloud providers in 2026. That advice would change if TPU v8i, which SemiAnalysis expects to add native FP4, closes most of the time-to-first-token gap.

The project is still early and in continuous evolution. Its roadmap targets dynamic shapes, compilation performance, broader operator coverage, reinforcement learning and quantization. In other words, TorchTPU is a serious compatibility play today, not a finished replacement for every GPU workflow; teams still need to test their own models, serving patterns and cost assumptions before moving production traffic.

For teams evaluating the stack, TorchTPU is best read as a lower-friction bridge from PyTorch to Google TPUs, with strong compatibility results, roughly 94% of JAX throughput in one large MoE comparison, cheaper token economics in some batch scenarios, and clear remaining gaps in first-token latency, FP4 support and some reinforcement-learning setups. Meta’s production use and its multi-supplier chip commitments show that the software layer is becoming as important as the hardware choice, while Nvidia still holds the advantage where interactive response times and mature CUDA tooling matter most.

Related posts: