The AI Gazette

Listen to this story

5 min · read by an AI voice

Google

Google opens Pathways, the system that trains Gemini, to cloud customers: one Python client describes the whole job, and a failed machine no longer sends the run back to a checkpoint

Pathways is now generally available on Google Cloud. A post from the team explains where the usual way of training on many accelerators runs out, and what changes when a single controller coordinates every chip.

Almost every large model is trained the same way. A copy of the training script runs on every accelerator, all copies move in lockstep, and they stay in sync through collective operations such as AllReduce, which averages the gradients. PyTorch users know this as DDP or FSDP. The general name is Single Program, Multiple Data, or SPMD. It suits a job that is one uniform program filling the hardware it was given: the model is written as if for one device, and the collectives do the rest.

Google's post of 9 November describes three places where that stops working. The first is the network. Inside one tightly connected group of TPU v5p chips, each chip has 1,200 GB/s of bandwidth to its neighbours, but only 50 gigabits per second, about 6 GB/s, to the rest of the datacenter. Every step waits for its collectives, so a job that spans many groups spends a growing share of each step moving data. The second is work that is not uniform. In reinforcement learning after pre-training, a sampler generates attempts, a reward model scores them and a trainer updates the weights. These are three different programs that should overlap, or two of them sit idle while the third works. The third is failure. Hardware faults interrupted the training of Gemini 2.5 several times an hour, and under SPMD one lost machine stops every process and sends the run back to its last checkpoint.

Pathways is the system Google built for this and uses to train Gemini. With it, the whole computation is defined from a single Python client that runs on an ordinary CPU machine. The program is written against virtual devices. A resource manager maps those onto real chips, and a worker on each accelerator host runs the compiled programs it is sent. The job becomes a graph: each block is a compiled program for one group of chips, and each edge is a tensor that the runtime has to deliver, over the fast links inside a group and over the datacenter network between groups.

Because the code never names a physical chip, the runtime has room to move. If a host dies, the resource manager remaps the work onto healthy chips and the run continues. A stage that needs more chips, such as the samplers in a reinforcement learning loop, gets them by asking for more virtual devices. One cluster can serve several people: with the Shared Pathways Service it stays up, and each client connects from a laptop, takes a slice of chips and hands it back on disconnect. To keep the chips busy, the runtime prepares each launch ahead of time. While one block is still computing, the shapes of its outputs are already known, so the buffers for the next block are allocated and the transfer is scheduled before the data exists. A central scheduler puts the operations of all programs into one order so that groups do not stall waiting for each other.

The single client also restores an ordinary development loop. It is one Python process whether it drives one host or thousands, so a breakpoint and a shell work as they do on one machine, and when something hangs there is one place that knows what is queued on every device. The post addresses the obvious comparison with Ray, the open-source framework for running Python workloads on clusters. Ray provisions the cluster and schedules tasks, but the training job inside each worker still runs as SPMD. Pathways changes how the training step itself executes, so the two can be used together. The limits: Pathways runs JAX programs on TPUs, and this first post of a series explains the design without publishing benchmark results.

From other editions

Say hi.