fix Qwen3_5MoeVisionConfig deepstack_visual_indexes silently dropped by @strict (Issue: https://github.com/huggingface/transformers/issues/45375)#45380
Closed
Brianzhengca wants to merge 1 commit intohuggingface:mainfrom
Conversation
Contributor
|
[For maintainers] Suggested jobs to run (before merge) run-slow: qwen3_5, qwen3_5_moe |
Author
|
Just realized the issue already has a PR that fixes it, my bad. Closing. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Fixes #45375 (issue)
Root Cause
In
modular_qwen3_5.py,Qwen3_5VisionConfigwas marked@strictbut also haddeepstack_visual_indexes = AttributeError(). That meant the field was effectively undeclared for strict loading, so when a real checkpoint config included"deepstack_visual_indexes": [], Transformers silently dropped it during config construction. SinceQwen3_5MoeVisionConfiginherits that shared Qwen3.5 vision config shape, the bug affected both plain Qwen3.5 and Qwen3.5-MoE configs.Fix
I restored
deepstack_visual_indexesas a real config attribute inmodular_qwen3_5.py, with an empty default so Qwen3.5 keeps deepstack disabled by default.Tests
Output: