Back to Learning

AI Next Labs / Learning

Tensor parallelism

Split every weight matrix across GPUs: column and row splits with real numbers, a TP transformer block, and what it costs in communication.

Published

Written by Jaydeep Raijada.

Instead of giving every GPU a whole layer, tensor parallelism (TP) cuts each weight matrix into pieces and keeps one piece on each GPU permanently. This works because matrix multiplication splits cleanly by rows and columns. The cost is a few all-reduces in every transformer block, which is why TP lives on the fast links inside a single node.

Part 2 of 8 in the 5D Parallelism series. Previous: Data parallelism. Next: Sequence parallelism.

Work through the interactive lesson below: step through each diagram, try the controls, and check yourself with the questions at the end.

References