System Design
19. AI System Design and LLM InfrastructureAnimated
Model Sharding
Splitting model weights across devices.
The idea
Each device holds a shard; requests flow across them.
Watch it work
Press play, pause, or step through. Some animations have settings you can change.
- 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
- 1Partition the weights
- 2Load shards on devices
- 3Route computation
- 4Gather the results
Where it is used
Models too big for one GPU.
Watch out for
Network overhead.