deepspeedai / deepspeedai/DeepSpeed

[REQUEST] Can I specify certain parameters' grads and optimizer states not being partitioned in stage 3?

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

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.
I can exclude certain small parameters from being partitioned by setting the 'persistence_threshold' config. However, it seems that their gradients and optimizer states are still partitioned in stage 3. Given that existing PEFT methods, like LoRA, have already achieved relatively low memory demands for both gradients and optimizer states, I'm wondering if there's a solution to keep their gradients and optimizer states intact.

Describe the solution you'd like
Due to the cost of grads and optim states are also related to the params' size, can deepspeed also refrain the grads and optim states of specified params from being partitioned?

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

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 tracing DeepSpeed ZeRO stage 3 handling of the persistence_threshold configuration and how it partitions gradients and optimizer states. Compare the behavior for persisted parameters with the requested LoRA or PEFT use case. Done means a supported way to specify parameters whose gradients and optimizer states remain unpartitioned, with validation for stage 3 behavior.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.