Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds initial (WIP) support for Qwen3.5 multimodal models across LMDeploy’s VL adapter layer and PyTorch engine, including module mappings and configuration building, plus documentation updates.
Changes:
- Introduces new Qwen3.5 PyTorch model implementations (dense + MoE) and registers them in the model module map.
- Adds a VL model wrapper for Qwen3.5 and registers it in the VL model builder.
- Adds a Qwen3.5 config builder and updates docs/README to list Qwen3.5 as supported.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| lmdeploy/vl/model/qwen3_5.py | Adds VL-side Qwen3.5 wrapper/registration and preprocessor setup. |
| lmdeploy/vl/model/builder.py | Ensures Qwen3.5 VL wrapper is imported/registered. |
| lmdeploy/pytorch/nn/norm.py | Updates type annotations to use ` |
| lmdeploy/pytorch/models/qwen3_5.py | Adds main PyTorch implementation for Qwen3.5 VLM (vision + text + generation utilities). |
| lmdeploy/pytorch/models/qwen3_5_moe.py | Adds MoE variant wiring and expert weight-loading logic. |
| lmdeploy/pytorch/models/module_map.py | Registers HF architecture names to LMDeploy Qwen3.5 model entrypoints. |
| lmdeploy/pytorch/configurations/qwen3_5.py | Adds config builder for Qwen3.5(+MoE), including state shapes for linear-attn layers. |
| docs/zh_cn/supported_models/supported_models.md | Adds Qwen3.5 row to supported models table. |
| docs/en/supported_models/supported_models.md | Adds Qwen3.5 row to supported models table. |
| README.md / README_zh-CN.md / README_ja.md | Lists Qwen3.5 among supported models. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @VISION_MODELS.register_module() | ||
| class Qwen3_5Model(Qwen3VLModel): | ||
| """Qwen3_5 model.""" | ||
|
|
||
| _arch = ['Qwen3_5ForConditionalGeneration', 'Qwen3_5MoeForConditionalGeneration'] | ||
|
|
||
| def build_preprocessor(self): | ||
| check_transformers() | ||
| self.processor = AutoProcessor.from_pretrained(self.model_path) | ||
| tokenizer = self.processor.tokenizer | ||
| self.image_token = self.processor.image_token | ||
| self.image_token_id = tokenizer.encode(self.image_token)[-1] | ||
| self.mm_processor_kwargs = None |
There was a problem hiding this comment.
New Qwen3.5 VL preprocessor/model registration is added, but there are existing processor tests for Qwen3-VL (tests/test_lmdeploy/test_vl/test_qwen3vl_processor.py) and none for Qwen3.5. Please add an analogous unit test to validate build_preprocessor() + preprocess() behavior (including mm_processor_kwargs min/max pixel handling) so regressions are caught early.
Support Qwen3.5-397B-A17B