deepspeedai / deepspeedai/DeepSpeed

[zero3] `register_external_parameter` to partition non ds-params

Open
#1,048 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

Currently, register_external_parameter handles non-ds-params correctly during forward, but if these same params are touched during model init (e.g. during a global init_weights) these break and require manual gathering. See: https://github.com/microsoft/DeepSpeed/issues/1045 for context.

So ideally register_external_parameter should partition its argument if it hasn't been so already.

I wonder if this should be True by default but having an option not to do it. There might be an edge case where a user might not need the pre-partitioning during init. Not 100% sure why.

It's already on @samyam's todo list, just logging it here so it's easier to track.

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 at the register_external_parameter entry point and read issue #1045 for the initialization context. Trace how non-ds-params are handled during forward and model initialization, then define and test the intended partitioning behavior, including whether an opt-out is 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
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.