deepspeedai / deepspeedai/DeepSpeed
Opinion on Refactoring Ulysses
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- Python
- Stars
- 43.1k
- Forks
- 5k
- Avg merge
- 4d 15h
- Merged PRs (30d)
- 112
Description
Is your feature request related to a problem? Please describe.
Hi, I am suggesting my ideas on refactoring Ulysses.
post_all2all_funcand.permute()seems unnecessary if we opt out for regularall_to_allfunction instead ofall_to_all_single. Afterall_to_all, we cantorch.catalong thegather_idxdimension to concatenate agnostically.- Double nested if loops due to
batch_dim_idxmakes code very hard to read. I'm thinking that splitting input tensor agnostic tobatch_dim_idxand usingall_to_allcan also alleviate this?
Questions from Commit 17ed7c7
- So interestingly, fusing QKV actually degrades performance if concat and slices are necessary?
- Do you think you can elaborate on pipelining QKV comm and GEMM? Is this referring to doing GEMM with data that stays during all2all?
Appreciate your feedback!
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
Review commit 17ed7c7 and the implementations of post_all2all_func, permute(), all_to_all, and all_to_all_single. The issue asks for opinions about a possible refactor and QKV communication rather than defining a patch or completion criteria, so seek maintainer direction before coding.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- distributed-systems, machine-learning
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100