Skip to content

[Bug]: qwen3_5_moe model type missing multimodal placeholder registration causing "Unknown modality: image" error #12271

Closed

Description

@zhouliang5266

System Info

  • TensorRT-LLM: commit 390a7fd
  • Model: Qwen3.5-35B-A3B
  • GPU: RTX 4090 x 2
  • Backend: _autodeploy

Who can help?

No response

Information

  • The official example scripts
  • My own modified scripts

Tasks

  • An officially supported task in the examples folder (such as GLUE/SQuAD, ...)
  • My own task or dataset (give details below)

Reproduction

Problems:
When serving Qwen3.5 MoE vision-language models (e.g., Qwen3.5-35B-A3B) using trtllm-serve with _autodeploy backend, multimodal image/video requests fail with: Exception: Error code: 400 - {'object': 'error', 'message': 'Unknown modality: image', 'type': 'BadRequestError', 'param': None, 'code': 400}

Root Cause:
The qwen3_5_moe model type is not registered in MULTIMODAL_PLACEHOLDER_REGISTRY, so add_multimodal_placeholders() in tensorrt_llm/inputs/utils.py throws "Unknown modality" error.
Although Qwen3_5MoeForConditionalGeneration in tensorrt_llm/_torch/auto_deploy/models/custom/modeling_qwen3_5_moe.py implements full vision-language capabilities (pixel_values,
image_grid_thw, etc.), it model type lacks multimodal placeholder registration required by the serving layer.

Expected behavior

Add @register_input_processor decorator to Qwen3_5MoeForConditionalGeneration class to register image/video placeholders:
@register_input_processor(
BaseMultimodalInputProcessor,
model_type="qwen3_5_moe",
placeholder_metadata=MultimodalPlaceholderMetadata(
placeholder_map={
"image": "<|vision_start|><|image_pad|><|vision_end|>",
"video": "<|vision_start|><|video_pad|><|vision_end|>",
},
placeholder_placement=MultimodalPlaceholderPlacement.BEFORE_TEXT,
placeholders_separator="",
),
)
class Qwen3_5MoeForConditionalGeneration(Qwen3_5MoePreTrainedModel):
# ... existing code ...

actual behavior

None of that was added now.

additional notes

Nothing to add

Before submitting a new issue...

  • Make sure you already searched for relevant issues, and checked the documentation and examples for answers to frequently asked questions.

Activity

  1. added
    bug
    on Mar 17, 2026
  2. added
    Multimodal
    on Mar 17, 2026
  3. suyoggupta commented on Mar 17, 2026

    @suyoggupta
    Collaborator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Multimodalbug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions