fix(client): add Qwen35Renderer dispatch in _build_mm_features#43
Open
mvanhorn wants to merge 1 commit into
Open
Conversation
Qwen3.5 and Qwen3-VL share the Qwen2-VL multimodal payload shape (pixel_values + image_grid_thw with merge_size=2 across all seven Qwen3.5 sizes), so the same feature builder can serve both. Added a _build_qwen_vl_features helper and factored the dispatch so the renderer-class check covers both renderer types. Fixes PrimeIntellect-ai#39
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.
Summary
renderers/client.py:_build_mm_featuresonly dispatched to Qwen3-VL. Qwen3.5 emits the same Qwen2-VL-family multimodal payload (pixel_values + image_grid_thw, all seven current Qwen3.5 sizes use merge_size=2), so the same feature builder serves both. Added Qwen35Renderer to the dispatch.Why this matters
Without this dispatch, vLLM batches that include Qwen3.5 image messages fall through to the NotImplementedError branch at the bottom of
_build_mm_features. The hallerite issue thread confirmed the dispatch was missing because Qwen3.5 was added after the dispatch was written.Changes
renderers/client.py- extend_build_mm_featuresso the renderer class check matches both Qwen3VLRenderer and Qwen35Renderer; factor a_build_qwen_vl_featureshelper with merge_size as a parameter so both renderers reuse the same payload shape._FallbackPlaceholderRange,_FallbackMultiModalFieldElem,_FallbackMultiModalFeatureSpec) so the feature spec is usable on vLLM versions that haven't yet exposed the canonical types.This is a wider change than the issue strictly asked for; the dispatch could land as a 3-line edit alone, but the underlying feature builder was Qwen3-VL-shaped in a way that read as "this is what Qwen3-VL does" rather than "this is what the Qwen2-VL family does," so I factored it out. Happy to trim to the minimum dispatch if you prefer.
Testing
pytest tests/test_client_mm.py -k qwen35.Fixes #39