Skip to content
StackDecode
System Design
19. AI System Design and LLM InfrastructureAnimated

Tensor Parallelism

Split individual layers across devices.

The idea

Matrix multiplications are divided across GPUs, with communication to combine results.

Watch it work

Press play, pause, or step through. Some animations have settings you can change.

Model weightsGPU 1 (layers 1…GPU 2 (layers 9…GPU 3 (layers 1…Output
  • client
  • gateway / proxy
  • service
  • cache
  • data store
  • queue / stream

The model is too big for one GPU, so split the weights.

step:
1/4
at:
Model weights
1/9

The green dot is a request moving through the system.

Step by step

  1. 1Split weight matrices
  2. 2Each device computes a part
  3. 3All-reduce partial results
  4. 4Continue to the next layer

Where it is used

Very large layers.

Watch out for

Needs fast interconnects.

Related