Skip to content

fix gemma4 num attention head bugs (from #7975)#7990

Open
delock wants to merge 4 commits intomasterfrom
gma/fix_gemma4
Open

fix gemma4 num attention head bugs (from #7975)#7990
delock wants to merge 4 commits intomasterfrom
gma/fix_gemma4

Conversation

@delock
Copy link
Copy Markdown
Collaborator

@delock delock commented May 2, 2026

This PR is based on #7975 and fix CI errors. Thanks for @mingxiang1006 for providing the fix.

delock added 2 commits May 2, 2026 11:26
Signed-off-by: Guokai Ma <guokai.ma@intel.com>
Signed-off-by: Guokai Ma <guokai.ma@intel.com>
Copy link
Copy Markdown

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

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: cb84e9c444

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

# SPDX-License-Identifier: Apache-2.0
# DeepSpeed Team

from transformers import Gemma4Config
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Guard Gemma4Config import by transformers version

This module-level import makes test collection fail on environments that satisfy DeepSpeed’s declared minimum (transformers>=4.51.3) but do not yet include Gemma4Config (introduced much later), because pytest errors before any skip logic can run. In those setups, unrelated unit test runs that discover tests/unit/multimodal will fail at import time instead of executing normally, so this should be wrapped in a version gate or pytest.importorskip inside the test.

Useful? React with 👍 / 👎.

Signed-off-by: Guokai Ma <guokai.ma@intel.com>
@delock delock enabled auto-merge (squash) May 3, 2026 11:28
@@ -0,0 +1,31 @@
# SPDX-License-Identifier: Apache-2.0
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@delock please move: tests/unit/multimodal -> tests/unit/v1/multimodal

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

CI only targets tests/unit/v1

Signed-off-by: Guokai Ma <guokai.ma@intel.com>
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.

2 participants