fix(client): add Qwen35Renderer to _build_mm_features dispatch#45
Open
eligotts wants to merge 1 commit into
Open
fix(client): add Qwen35Renderer to _build_mm_features dispatch#45eligotts wants to merge 1 commit into
eligotts wants to merge 1 commit into
Conversation
Qwen35Renderer is a MultimodalRenderer and emits pixel_values + image_grid_thw matching the Qwen-VL family payload schema, but wasn't registered in renderers.client._build_mm_features — every multimodal generate() call through it raised NotImplementedError. Add it to the existing issubclass check, reusing _build_qwen_vl_features with the same spatial_merge_size=2 default (the Qwen-VL family convention, matched by every in-tree image processor). Parametrizes the existing test_generate_serializes_multimodal_features test over both Qwen3VLRenderer and Qwen35Renderer to guard the dispatch on both branches, matching the parametrize-over-models pattern in test_bridge.py and test_roundtrip.py. Fixes #39.
60b72f9 to
6dfd643
Compare
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._build_mm_featuresdispatches by renderer class toserialize a renderer-emitted
MultiModalDatainto vLLM's/inference/v1/generatefeatures payload. OnlyQwen3VLRendererwasregistered;
Qwen35Renderer— which is also aMultimodalRendererandships the same
pixel_values + image_grid_thwpayload — fell throughto
raise NotImplementedError(...). Every multimodal call routedthrough a Qwen3.5 / Qwen3.6 model failed before reaching the engine.
Fix
Add
Qwen35Rendererto the existingissubclasscheck, reusing_build_qwen_vl_featureswith the samespatial_merge_size=2default.This matches the Qwen-VL family convention — every Qwen-VL image
processor in tree (Qwen2-VL, Qwen3-VL, Qwen3.5, Qwen3.6) ships with
merge_size=2, which is a vision-tower architectural parameter (setat training time, not a runtime config).
Test plan
test_generate_serializes_multimodal_features_for_qwen3_vlto also cover
Qwen35Renderer, mirroring the parametrize-over-modelspattern in
test_bridge.pyandtest_roundtrip.py. Both cases pass.Qwen/Qwen3.5-2B: rendered a realmultimodal prompt (
{user: [text, image_url]}), confirmed thepreviously-failing
_build_mm_features(renderer, rendered.multi_modal_data)now returns a valid features payload (
mm_hashes,mm_placeholders,kwargs_dataall populated as expected).Fixes #39.