[Question] Does deepspeed support model parallelism via API "PipeModelDataParallelTopology"?
Describe the Question I just notice code in https://github.com/HuangLK/llama-deepspeed/blob/faedea514b11c18c695e1b2a6adb63b102ef001c/models/llama_pipeline_model.py#L174
It appears that the code is utilizing the PipeModelDataParallelTopology API.
I'm curious to know if it supports model parallelism during training.
I have extensively searched the Internet, documents, and issues, but unfortunately, I have been unable to find an answer to this question. Furthermore, it seems that there are no available documents providing an explanation or usage guide for this particular API.
Hi @chenyaofo , yes the PipeModelDataParallelTopology helps facilitate combining forms of parallelism for training (eg, 3D parallelism for LLMs). It's still up to the provided model to actually implement model parallelism, though. Those topology classes are used to coordinate distributed processes and establish a consistent mapping of ranks between parallel subgroups for the different parallelisms. This is important for situations like computing global norms for gradient clipping.
You'll also find this API used in our repo Megatron-DeepSpeed.