deepspeedai / deepspeedai/DeepSpeed

[REQUEST] Partitioning the model states and optimizer states separately when resuming from checkpoint

Open
#3,661 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'm currently working on fine-tuning an LLM using LoRA, but the deepspeed checkpoints save the partitioned model states and optimizer states, which are incredibly large (I would only like to store the adapter model + optimizer states). I want to be able to load a checkpoint using my frozen PLM + adapter weights, partition those weights, and then load my optimizer states and LR_scheduler states saved. Currently, if we try to load the checkpoint directory without *model_states.pt, we reach an assertion error since the model states aren't there: https://github.com/lm-sys/FastChat/pull/1280

Describe the solution you'd like
I would like to be able to load from checkpoint-x and global_stepx using only the zero_pp_rank_x_mp_rank_xx_optim_states.pt and providing a model path with the frozen PLM weights (not partitioned).

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 checkpoint-loading path that raises an assertion when *model_states.pt is absent, using the zero_pp_rank_x_mp_rank_xx_optim_states.pt files and global_stepx as inputs. Trace how the frozen PLM and adapter weights are partitioned, then verify that optimizer and LR_scheduler states can resume without partitioned model-state files.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.