Skip to content

fix google/gemma-3-4b-it#1547

Merged
xin3he merged 3 commits intomainfrom
xinhe/3-15
Mar 16, 2026
Merged

fix google/gemma-3-4b-it#1547
xin3he merged 3 commits intomainfrom
xinhe/3-15

Conversation

@xin3he
Copy link
Contributor

@xin3he xin3he commented Mar 15, 2026

Description

The MTP missing tensor detection logic cannot handle gemma since the tensor name is using language_model.layers instead of model.language_model.layers.

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Performance improvement
  • Code refactoring
  • Other (please specify):

Related Issues

Fixes or relates to #

Checklist Before Submitting

  • My code has been tested locally.
  • Documentation has been updated as needed.
  • New or updated tests are included where applicable.

Signed-off-by: Xin He <xin3.he@intel.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR aims to fix missing-tensor (MTP) detection for Gemma models where tensor paths use language_model.layers.* instead of model.language_model.layers.*, so tensors aren’t incorrectly treated as missing and copied.

Changes:

  • Extend _is_truly_missing() to treat certain parent-layer paths as equivalent when only a leading prefix differs.

You can also share your feedback on Copilot code review. Take the survey.

@wenhuach21
Copy link
Contributor

better add an ut to test mtp layers in the future.

@xin3he
Copy link
Contributor Author

xin3he commented Mar 16, 2026

better add an ut to test mtp layers in the future.

We had many UTs in test_missing_tensors.py, it's just hard to handle all corner cases.

xin3he added 2 commits March 16, 2026 11:06
Signed-off-by: Xin He <xin3.he@intel.com>
@xin3he xin3he added this to the 0.12.0 milestone Mar 16, 2026
@xin3he xin3he merged commit b5fc172 into main Mar 16, 2026
29 checks passed
@xin3he xin3he deleted the xinhe/3-15 branch March 16, 2026 09:47
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.

3 participants