Skip to content

Fix broken models due to modeling/weight mapping#42468

Merged
Cyrilvallez merged 18 commits into
mainfrom
fix-models-and-mapping
Nov 28, 2025
Merged

Fix broken models due to modeling/weight mapping#42468
Cyrilvallez merged 18 commits into
mainfrom
fix-models-and-mapping

Conversation

@Cyrilvallez

Copy link
Copy Markdown
Member

What does this PR do?

As per the title. A few models got broken in #41580, but it was silent issues on the fast tests.
Mostly discovered in #42396, because the new tests added were not passing for those models, due to the models and not the logic of that PR.

@HuggingFaceDocBuilderDev

Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Comment thread src/transformers/core_model_loading.py Outdated
Comment thread src/transformers/models/lfm2_moe/modeling_lfm2_moe.py Outdated
Comment thread src/transformers/core_model_loading.py Outdated
@3outeille

3outeille commented Nov 28, 2025

Copy link
Copy Markdown
Member

actually needing this for #42456 for jamba + lfm2

@github-actions

Copy link
Copy Markdown
Contributor

[For maintainers] Suggested jobs to run (before merge)

run-slow: lfm2_moe, sam3, sam3_tracker, sam3_tracker_video

@ArthurZucker ArthurZucker left a comment

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.

is it missing a test that can help prevent this?

]
_checkpoint_conversion_mapping = {
"tracker_model.": "",
r"tracker_model.(.+)": r"\1", # the regex allows to remove the prefix, and add it back in revert mode

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.

good I like it!

@Cyrilvallez

Copy link
Copy Markdown
Member Author

Yes will enforce it with ast later for sure! Along with the post_init

@Cyrilvallez Cyrilvallez merged commit 2a61590 into main Nov 28, 2025
19 of 24 checks passed
@Cyrilvallez Cyrilvallez deleted the fix-models-and-mapping branch November 28, 2025 20:38
Sai-Suraj-27 pushed a commit to Sai-Suraj-27/transformers that referenced this pull request Nov 28, 2025
* lfm2

* fix

* config

* fixes

* fix prefixes

* finally

* copies

* oupsi

* rework key renaming

* fixes

* fix

* fix

* fix

* fix

* fix

* fix lfm2

* fix

* fix more bad mappings
sarathc-cerebras pushed a commit to sarathc-cerebras/transformers that referenced this pull request Dec 7, 2025
* lfm2

* fix

* config

* fixes

* fix prefixes

* finally

* copies

* oupsi

* rework key renaming

* fixes

* fix

* fix

* fix

* fix

* fix

* fix lfm2

* fix

* fix more bad mappings
SangbumChoi pushed a commit to SangbumChoi/transformers that referenced this pull request Jan 23, 2026
* lfm2

* fix

* config

* fixes

* fix prefixes

* finally

* copies

* oupsi

* rework key renaming

* fixes

* fix

* fix

* fix

* fix

* fix

* fix lfm2

* fix

* fix more bad mappings
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.

4 participants