deepspeedai / deepspeedai/DeepSpeed

[QUESTION] How to manually do states partition and all-gather communication during training

Open
#4,082 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
43.1k
Forks
5k
Avg merge
4d 15h
Merged PRs (30d)
112

Description

Hi everyone! I am running deepspeed with multi-GPUs. I want to store and use some extra information EXTRA_STATES related to the model states during training, which is quite huge and takes up a lot of memory. The thing I wanna optimize is to eliminate redundant memory. Specifically, due to the exactly same EXTRA_STATES retained in each of the multiple processes, there are quite lots of memory are wasted, and what I am thinking is whether I can do some partitioning and all-gather of the EXTRA_STATES.

I think perhaps this is similar to what's happening to the optimizer states and what ZeRO stage-1 does. So I am wondering if there is backend communication interface in DeepSpeed to manually handle this EXTRA_STATES partitioning and all-gather, or if there are some tricks by which I can take advantages of the existing DeepSpeedZeroOptimizer.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by examining the DeepSpeedZeroOptimizer and the backend communication interface mentioned in the question. Determine whether these provide a supported way to partition and all-gather EXTRA_STATES during multi-GPU training, and document the applicable approach or clarify that the capability is unavailable.

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
15/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.