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
saved by
related reading
- Training Deep Networks with Data Parallelism in Jaxmishalaskin.com
- How to Parallelize a Transformer for Training — an explorable explanationezyang.github.io
- 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
- Async RL in Pure JAXdivyamakkar0.github.io
- Pipeline-Parallelism: Distributed Training via Model Partitioningsiboehm.com
- Parallelism methods · Hugging Facehuggingface.co
- Reiner Pope – The math behind how LLMs are trained and serveddwarkesh.com
- Visualizing 6D Mesh Parallelism · mainmain-horse.github.io
- Parallelism in Distributed Deep Learning · Better Tomorrow with Computer Scienceinsujang.github.io