Glossary

What is Model parallelism?

In Turkish: Model paralelliği · Topic: Hardware and infrastructure

A method that splits a model too large for one chip's memory, by layers or by the matrices inside layers, and places the pieces on several accelerators.

How does it work?

It comes in two common forms. In pipeline parallelism, consecutive layers of the model are assigned to different chips, and data flows from one chip to the next like an assembly line. In tensor parallelism, a large matrix multiplication inside a single layer is divided among several chips, each computing one part. Either way, the chips constantly pass intermediate results to each other, so fast links between them, such as the specialized connections inside a server, are essential.

Why does it matter?

Models with hundreds of billions of parameters do not fit in the memory of a single GPU. Model parallelism makes it possible to train and serve them. The downside is that chips can end up waiting for each other, so engineers choose how to split a model carefully, based on the hardware.

Example

A very large language model is run by spreading its layers across the eight GPUs in a server, so that no single GPU holds the entire model in memory.

FAQ

What is the difference between pipeline and tensor parallelism?

Pipeline parallelism divides the model into groups of layers and gives each group to a chip. Tensor parallelism splits the large computation inside one layer across several chips.

Is model parallelism only used for training?

No. When a very large model does not fit on one GPU, it is split across several chips in the same way when generating answers.

All terms