Lightning-AI / Lightning-AI/pytorch-lightning

Support get optimizer and lr_schedulers from deepspeed config

Open
#19,860 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature lr scheduler optimizer strategy: deepspeed
Dominant language
Python
Stars
31.4k
Forks
3.8k
Avg merge
6d 7h
Merged PRs (30d)
6

Description

### Description & Motivation

Currently it's not supported. However in huggingface/accelerate, users can specify `DummyOptimizer` and `DummyScheduler` to indicate they want them to be replaced by those from deepspeed config.

### Pitch

Lightning should have some way to let people use optimizers from deepspeed config, like `OneBitAdam` or something else that cannot be manually instantiated.
https://github.com/Lightning-AI/pytorch-lightning/blob/90d04b5b86f37994cdceccc6de32f0e93b1cc7f0/src/lightning/fabric/strategies/deepspeed.py#L330

### Alternatives

_No response_

### Additional context

_No response_

cc @lantiga @borda

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 in src/lightning/fabric/strategies/deepspeed.py around the referenced optimizer handling and compare the requested behavior with Hugging Face Accelerate's DummyOptimizer and DummyScheduler. Determine how DeepSpeed-configured optimizers and schedulers should be selected, then add coverage showing that supported configuration values are used successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
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.