Skip to content

Qwen3.5#4351

Open
grimoire wants to merge 13 commits intoInternLM:mainfrom
grimoire:qwen3.5
Open

Qwen3.5#4351
grimoire wants to merge 13 commits intoInternLM:mainfrom
grimoire:qwen3.5

Conversation

@grimoire
Copy link
Collaborator

@grimoire grimoire commented Feb 11, 2026

Support Qwen3.5-397B-A17B

Copilot AI review requested due to automatic review settings February 11, 2026 10:40
@grimoire grimoire marked this pull request as draft February 11, 2026 10:44
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +20 to +32
@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
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
@grimoire grimoire changed the title [WIP] Qwen3.5 Qwen3.5 Feb 16, 2026
@grimoire grimoire marked this pull request as ready for review February 16, 2026 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant