deepspeedai / deepspeedai/DeepSpeed
[REQUEST] Does sequence parallel need all-reduce for gradients before optimizer.step()?
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 43.1k
- Forks
- 5k
- Avg merge
- 4d 15h
- Merged PRs (30d)
- 112
Description
Hi,
I am reading the implementation code of sequence parallelism recently and didn't find the all-reduce of gradients after backward finishes. Because the sequence is split to sub-sequences before fed into network, I wonder should there be an all-reduce for gradients before optimizer.step()? Similar to data parallelism?
In https://github.com/microsoft/Megatron-DeepSpeed/blob/main/megatron/training.py#L638:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the referenced megatron/training.py line 638 and trace sequence-parallel gradient handling through backward completion and optimizer.step(). Compare that path with data-parallel gradient synchronization; done means establishing whether an all-reduce is required and documenting the conclusion or identifying the implementation change needed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- distributed-systems, machine-learning
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100