deepspeedai / deepspeedai/DeepSpeed

[OOM] Stage 3

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

Nobody has claimed this yet.

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

Description

When I run step three I get an out of memory error. the program error location is 1072 line in /usr/local/lib/python3.10/dist-packages/deepspeed-0.10.1+cbf2f61a-py3.10.egg/deepspeed/runtime/engine.py (if not self.dont_change_device:
self.module.to(self.device))
The program completely copied the model onto the gpu causing a memory overflow.What's the solution
I used the A100 machine and used offload and offload_reference_model when I resubmitted the program.
and I used 32 machines and the gpu was 80 gigabytes of memory.and zero3 strategy. I find that the model is whole model in “self.module.to(self.device)”. so out of memory error occurred.What I'm thinking about is how do I assign the model to different Gpus before that .look forward to your reply

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 with deepspeed/runtime/engine.py at line 1072 and inspect the Stage 3 path around self.module.to(self.device), including the offload and offload_reference_model settings described in the report. Reproduce the out-of-memory behavior on the stated A100 and ZeRO-3 setup, then establish a documented fix or confirmed explanation for why the model is copied to one GPU.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
distributed-systems, machine-learning
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
15/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.