fix(config): add deepstack_visual_indexes to Qwen3_5MoeVisionConfig#45379
Open
hijingsong wants to merge 1 commit intohuggingface:mainfrom
Open
fix(config): add deepstack_visual_indexes to Qwen3_5MoeVisionConfig#45379hijingsong wants to merge 1 commit intohuggingface:mainfrom
hijingsong wants to merge 1 commit intohuggingface:mainfrom
Conversation
The @strict decorator on Qwen3_5MoeVisionConfig silently dropped the deepstack_visual_indexes field during config loading because it was not declared as a class attribute. Every Qwen3.5 MoE model ships with this field in its config.json (e.g. Qwen/Qwen3.5-35B-A3B-Base). Override the AttributeError sentinel inherited from Qwen3_5VisionConfig with a proper typed field defaulting to an empty tuple. Fixes huggingface#45375
Contributor
|
[For maintainers] Suggested jobs to run (before merge) run-slow: qwen3_5_moe |
Member
|
cc @zucchini-nlp, more stuff related to #41250! |
Member
|
@hijingsong see the comment under issue, not reproducible for me so I am guessing something is different env-setup |
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.
Problem
The
@strictdecorator onQwen3_5MoeVisionConfigsilently drops thedeepstack_visual_indexesfield during config loading because it is not declared as a class attribute. Every Qwen3.5 MoE model on HuggingFace ships with this field in its config.json (e.g.Qwen/Qwen3.5-35B-A3B-Base).Root Cause
Qwen3_5MoeVisionConfiginherits fromQwen3_5VisionConfig, which overridesdeepstack_visual_indexeswith anAttributeError()sentinel (inherited from the parent chain). The generatedconfiguration_qwen3_5_moe.pydoes not include the field at all, so@strictrejects it when deserializing from config.json.Fix
Override
deepstack_visual_indexesas a properly typed class attribute onQwen3_5MoeVisionConfigwith default(), matching the type annotation used inQwen3VLVisionConfig. This ensures:config.vision_config.deepstack_visual_indexesreturns the value from config.jsonVerification
Fixes #45375
Changes
modular_qwen3_5_moe.py: Adddeepstack_visual_indexesfield override with docstringconfiguration_qwen3_5_moe.py: Adddeepstack_visual_indexesfield with docstring (generated)