deepspeedai / deepspeedai/DeepSpeed

cpu memory out of use when infering on 30b model

Open
#3,192 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

The memory of my machine is 500GB. When I want to run opt-30b from huggingface on 4 cards, in the initialization of DSPipeline, the overall cpu memory runs out of use(each subprocess consumes 130GB for model loading).

Is there a way to reduce the overall cpu memory use of all the subprocesses before tensor slicing?

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 DSPipeline initialization and trace how each subprocess loads the opt-30b model before tensor slicing. Reproduce the four-card Hugging Face inference setup, measure per-process CPU memory, and determine whether the overall memory usage can be reduced without exhausting the 500GB machine.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.