Run Ray on TPU, Part 2: Ray AI libraries- Google Developers Blog
Jul 24, 2026Ivan Nardini, Spencer Peterson

Summary
This post details the integration of Ray AI libraries (Ray Serve, Ray Data, and Ray Train) with Google Cloud TPUs. It explains how Ray Serve leverages TPUs for LLM inference, using a `topology` field in `accelerator_config` to ensure multi-host models are placed on a single TPU slice. Ray Data introduces `iter_jax_batches()` for efficient, device-sharded JAX array batching for training and inference. JaxTrainer is presented as a solution for distributed JAX training on TPUs, simplifying topology management and providing fault tolerance. The post also highlights the availability of official `rayproject/ray:*-tpu` Docker images and enhanced Ray Dashboard metrics for TPU utilization.
More from the Google Developer Platform trail
- Autonomous LLM post-training with Tunix on TPUs- Google Developers Blog
- HeyGen x Google Cloud: Bringing Avatar IV to TPUs- Google Developers Blog
- Scaling Agentic RL: High-Throughput Agentic Training with Tunix- Google Developers Blog
- Run Ray on TPU, Part 1: The foundations- Google Developers Blog
- Building scalable AI agents with modular prompt transpilation- Google Developers Blog