irhum.github.io - Tensor Parallelism with jax.pjit
As of this writing in late-2022, large language models (LLMs) can now easily exceed 10B+ parameters (and the largest at 100B+ parameters). Pure data parallel strategies are no longer viable as the model itself no longer fits on single devices. Fortunately, research and engineering in scaling them have not slowed down; in the JAX (Bradbury et al., 2018) ecosystem in particular we now have pjit, enabling an orthogonal way to parallelize models called tensor parallelism. In this post, we’ll explore the mathematical underpinnings of tensor parallelism, and learn how to implement it for a 15B param language model using pjit. Until recently, large scale training of deep learning models have primarily used data parallelism: As long as a full copy of the model1 fits on device, this general strategy can scale gracefully to the typical maximum of 8 GPUs on a single host, and was the likely strategy used to train the “big” (213 million params) Transformer with in the original Attention is All You
irhum.github.io - Tensor Parallelism with jax.pjit As of this writing in late-2022, large language models (LLMs) can now easily exceed 10B+ parameters (and the largest at 100B+ parameters). Pure data parallel strategies are no longer viable as the model itself no longer fits on single devices. Fortunately, research and engineering in scaling them have not slowed down; in the JAX ( Bradbury et al., 2018 ) ecosystem in particular we now have pjit , enabling an orthogonal way to parallelize models called tensor parallelism. In this post, we’ll explore the mathematical underpinnings of tensor para
Explore this link on the map →saved by
related reading
- Training Deep Networks with Data Parallelism in Jaxmishalaskin.com
- How To Scale Your Modeljax-ml.github.io
- Paradigms of Parallelism | Colossal-AIcolossalai.org
- 5D parallelism in LLM training - gdymind's Bloggdymind.com
- Defeating Nondeterminism in LLM Inference - Thinking Machines Labthinkingmachines.ai
- Pipeline-Parallelism: Distributed Training via Model Partitioningsiboehm.com
- Visualizing 6D Mesh Parallelism · mainmain-horse.github.io
- Parallelism in Distributed Deep Learning · Better Tomorrow with Computer Scienceinsujang.github.io
- Transformer Math 101 | EleutherAI Blogblog.eleuther.ai
- Reiner Pope – The math behind how LLMs are trained and serveddwarkesh.com
- Computing sharding with einsum : ezyang's blogblog.ezyang.com
- Fully Sharded Data Parallel: faster AI training with fewer GPUs Engineering at Meta -engineering.fb.com