流水線并行
中間的bubble是 向前傳播以后,等向后傳播的時(shí)間。越是靠前的層次等得越久。

image.png
張量并行
優(yōu)點(diǎn)是沒有bubble浪費(fèi)。缺點(diǎn)是需要針對(duì)不同網(wǎng)絡(luò)結(jié)構(gòu)不同設(shè)計(jì)。
Cons: Different blocks are better split differently, lots of customizations
需要的通信:All-gather of partial activations and gradients for each split tensor(所有激活、梯度都要全部匯集)
兩者也可以結(jié)合用
(2021)
參考
Scaling Up LLM Pretraining: Parallel Training
Chenyan Xiong
11-667