transformers
fb9e183e - [distributed] Sequence parallelism with tensor parallelism

Commit
7 hours ago
[distributed] Sequence parallelism with tensor parallelism FSDP2 composes the mesh it shards over (`sp`, or `fsdp_sp` with `fsdp_size > 1`) with the `tp` mesh the parameters are already sharded on, and torch only composes meshes built from the same root: both are dims of the dense mesh, or of the `fsdp_sp` root mesh it is unflattened from. Under TP this rank holds `num_heads / tp_size` heads and Ulysses splits those across the sp group, so `sp_size * tp_size` must divide the attention and key/value heads.
Author
Committer
Parents
Loading