deepspeedai / deepspeedai/DeepSpeed

[BUG] apply_tensor_parallelism() is not executed in Zero3 without self.mpu

Open
#4,080 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Describe the bug

In Hybrid Engine, the apply_tensor_parallelism() is not called when model inference container requires tp > 1 but self.mpu is None. For example, for a large model in Zero3, the apply_tensor_parallelism() is not called.

Log output

To Reproduce
https://github.com/microsoft/DeepSpeed/blob/a7fe3bcc353c072846e4f86acff5cbfd758e2ec9/deepspeed/runtime/hybrid_engine.py#L206

To reproduce - call any large model, say Llama 30b using Zero 3 + Hybrid Engine.

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 deepspeed/runtime/hybrid_engine.py around line 206 and trace the conditions that control apply_tensor_parallelism(). Reproduce with a large model such as Llama 30b using Zero3 and Hybrid Engine, then verify that tensor parallelism is applied when inference requires tp > 1 and self.mpu is None.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
distributed-systems, machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.