Megatron-LM tensor parallel MLP with column and row splits

Tensor Parallelism in Megatron-LM: Splitting Layers, Not Stacks

Tensor Parallelism in Megatron-LM: Splitting Layers, Not Stacks Pipeline parallelism splits a model by depth. Tensor parallelism splits the math inside one layer. Megatron-LM made tensor parallelism practical for Transformers by choosing split points that preserve local GEMMs and put collectives only where the algebra requires them. The original Megatron paper introduced the core intra-layer pattern (arXiv:1909.08053). The later Megatron-LM systems paper showed how that TP axis composes with data and pipeline parallelism at cluster scale (arXiv:2104.04473). ...

May 18, 2025 · 8 min · Duo An
Ring all-reduce reduce-scatter phase across four GPUs

Data Parallelism: From Parameter Server to Ring All-Reduce

Data Parallelism: From Parameter Server to Ring All-Reduce Data parallelism is the default scaling move because it preserves the model program. Every rank owns the same model, sees different examples, computes gradients, and applies the same update. The algorithm is simple. The system is not. The whole post is about removing one bottleneck: do not push all gradient traffic through one server when every GPU could be moving bytes at the same time. ...

April 6, 2025 · 9 min · Duo An