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

Model Parallelism

Splitting a model across devices.

The idea

When a model does not fit on one GPU, parts of it live on different GPUs.

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. 1Divide the model
  2. 2Place parts on devices
  3. 3Pass activations between them
  4. 4Combine outputs

Where it is used

Very large models.

Watch out for

Devices wait on each other if split poorly.

Related