Skip to content

fix(inference): validate keep_module_on_host mode - #8363

Open
FU-max-boop wants to merge 2 commits into
deepspeedai:masterfrom
FU-max-boop:fix/keep-module-on-host-mode-validation
Open

fix(inference): validate keep_module_on_host mode#8363
FU-max-boop wants to merge 2 commits into
deepspeedai:masterfrom
FU-max-boop:fix/keep-module-on-host-mode-validation

Conversation

@FU-max-boop

Copy link
Copy Markdown
Contributor

Summary

  • reject keep_module_on_host=True before serving when no injection or AutoTP mode can place the retained host weights
  • validate after MPU resolution so the check uses the effective tensor-parallel size
  • preserve injection-policy, kernel-injection, AutoTP, and deprecated mp_size configurations

Testing

  • PYTHONPATH=. .venv/bin/python -m pytest -q -m inference tests/unit/inference/test_inference_config.py — 11 passed
  • pre-commit run --files deepspeed/inference/engine.py tests/unit/inference/test_inference_config.py — passed

Fixes #8338

Signed-off-by: FU-max-boop <ht3fudatou@163.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 30, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-08-30T05:11:16.222985Z 6168f38 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ce5058ff3b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread deepspeed/inference/engine.py
Comment thread deepspeed/inference/engine.py
Signed-off-by: FU-max-boop <ht3fudatou@163.com>
@FU-max-boop

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6168f3802c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread deepspeed/inference/engine.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] DeepSpeed generation fails with a CPU/CUDA device mismatch when keep-module-on-host is enabled

1 participant