flâneur

How to Parallelize a Transformer for Training — an explorable explanation

ezyang.github.io · 10,300 words · saved by 1 readers

An interactive TPU/GPU adaptation of the JAX Scaling Book training rooflines: DP, FSDP, TP, mixed sharding, pipeline and expert parallelism.

Model D= F= L= E=·k=·shared= Hardware C= Wici= Batch B= tokens An explorable adaptation of Part 5 of “How to Scale Your Model” by Jacob Austin, Sholto Douglas, Roy Frostig, Anselm Levskaya, Charlie Chen, Sharad Vikram, Federico Lebron, Peter Choy, Vinay Ramasesh, Albert Webson & Reiner Pope (Google DeepMind). ✦ We begin with the original dense TPU schemes — data parallelism, FSDP, tensor parallelism, their mixed form, and pipelining — then splice in the GPU fabric model and expert parallelism for MoEs. For each, we ask when communication becomes the bottleneck. (This summary is the…

saved by

related reading