En 30 segundos
A speaker on The Cognitive Revolution compares three approaches to sharding AI models, highlighting their effects on model size, latency and implementation complexity.
- 1Three approachesSplit weights, input activations or model stages.
- 2Weight sharding has a costTensor parallelism can help size and latency, but introduces overhead.
- 3Attention complicates input shardingSplitting input requires care because tokens attend to one another.
Conclusiones
- Model weights, input activations and pipeline stages can each be split.
- Weight sharding can help latency and model size but adds overhead.
- Input sharding complicates attention; the speaker recommends minimizing unnecessary sharding.
Lee el texto editado por capítulos
Ways to shard
Compare weight, activation and pipeline approaches.
There are three broad ways to shard a model computation: split the model weights, split the input activations, or divide the model into stages, known as pipeline parallelism. The speaker says pipeline parallelism helps when a model is too large, but does not itself improve latency.
Sharding the weights, also called model or tensor parallelism, can address model size and help latency. But sharding has a cost, so there is a performance tradeoff.
Costs and attention
Input splitting complicates attention; shard as much as needed.
Input sharding is relatively cheap, but usually does not solve the model-size problem. Attention requires extra care: tokens attend to other tokens, so splitting them introduces additional complexity.
The speaker’s practical advice is to shard only as much as necessary. Sharding brings overhead, but some degree of it can be unavoidable when a model cannot otherwise fit.
Más de este canal
1:49:40EN
1:28:36EN
3:13:44EN
2:40:58EN
1:25:56EN
2:51:22EN