deepspeedai / deepspeedai/DeepSpeed

[REQUEST] An option to only save the model state_dict when save_checkpoint(), and how to manually save & load the model state_dict when using ZERO3

Open
#2,304 4 comments 0 reactions 1 assignee View on GitHub

@tjruwase is already working on this.

Since Nov 7, 2022.

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

Description

In my training code, I only save & load the model state_dict (no optimizer states). I find this is good enough with a few steps of warmup, and saves lots of space when training a large model (as I have to save very frequently, like once per hour).

However one can't directly save the model state_dict when using ZERO3.

May I know how I can manually request all GPUs to save their partitioned state_dict, And how to manually load these state_dict to each GPU?

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.